WO2012150637A1 - 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置 - Google Patents

抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置 Download PDF

Info

Publication number
WO2012150637A1
WO2012150637A1 PCT/JP2011/060559 JP2011060559W WO2012150637A1 WO 2012150637 A1 WO2012150637 A1 WO 2012150637A1 JP 2011060559 W JP2011060559 W JP 2011060559W WO 2012150637 A1 WO2012150637 A1 WO 2012150637A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
character
file
information processing
compression
Prior art date
Application number
PCT/JP2011/060559
Other languages
English (en)
French (fr)
Inventor
片岡 正弘
量 松村
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to PCT/JP2011/060559 priority Critical patent/WO2012150637A1/ja
Priority to JP2013513060A priority patent/JPWO2012150637A1/ja
Priority to EP11864780.9A priority patent/EP2706466A4/en
Publication of WO2012150637A1 publication Critical patent/WO2012150637A1/ja
Priority to US14/068,855 priority patent/US20140059075A1/en
Priority to US15/208,129 priority patent/US20160321282A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation

Definitions

  • the present invention relates to an extraction method, an information processing method, an extraction program, an information processing program, an extraction device, and an information processing device.
  • index information indicating which of a plurality of files includes predetermined character information is compressed and the predetermined character information is searched, the compressed index information is expanded, and the expanded index information is referred to.
  • index information indicating which of a plurality of files includes predetermined character information is compressed and the predetermined character information is searched, the compressed index information is expanded, and the expanded index information is referred to.
  • the search when updating any one of a plurality of files to be searched using index information, the search can be executed using index information corresponding to the plurality of updated files after starting the update process.
  • the purpose is to reduce the processing time until.
  • the first information indicating whether or not each of the plurality of files includes predetermined character information is compressed and stored in the storage unit, and a file included in the plurality of files is updated.
  • the second information indicating whether or not the updated certain file includes the predetermined character information is stored in the storage means, and the third information indicating that the certain file is excluded from the search target.
  • compressed information obtained by compressing first information indicating whether or not predetermined character information is included for each of a plurality of files is stored in a storage unit, and is included in the plurality of files.
  • the second information indicating whether or not the updated certain file includes the predetermined character information is stored in the storage unit, and the third file can be specified.
  • the first information obtained by decompressing the compressed information among the plurality of files and the updated file is obtained.
  • the index information corresponding to the plurality of files after the update process is started. It is possible to reduce the processing time until the search by can be executed.
  • FIG. 1 is an explanatory diagram illustrating an example of target file update.
  • FIG. 2 is a block diagram of a hardware configuration example of the information processing apparatus according to the embodiment.
  • FIG. 3 is an explanatory diagram showing a system configuration example according to the present embodiment.
  • FIG. 4 is a block diagram illustrating a functional configuration example 1 of the information processing apparatus according to the present embodiment.
  • FIG. 5 is an explanatory diagram showing the flow of processing from the counting unit to the second compression unit of the information processing apparatus shown in FIG.
  • FIG. 6 is an explanatory diagram showing an example of the totalization by the totalization unit 401 and the creation of the compression code map M by the creation unit 404.
  • FIG. 7 is an explanatory diagram showing details of (1) counting the number of appearances.
  • FIG. 1 is an explanatory diagram illustrating an example of target file update.
  • FIG. 2 is a block diagram of a hardware configuration example of the information processing apparatus according to the embodiment.
  • FIG. 3 is an explanatory diagram showing a system
  • FIG. 10 is an explanatory diagram showing a correction result for each character information.
  • FIG. 13 is an explanatory diagram showing a leaf structure.
  • FIG. 14 is an explanatory diagram showing a structure of specific single characters.
  • FIG. 15 is an explanatory diagram of a divided character code structure.
  • FIG. 16 is an explanatory diagram showing a basic word structure.
  • FIG. 17 is an explanatory diagram of an example of generating the compression code map M.
  • FIG. 18 is a flowchart illustrating an example of a compression code map creation processing procedure by the creation unit 404.
  • FIG. 19 is a flowchart illustrating a detailed processing procedure example of the aggregation processing (step S1801) illustrated in FIG.
  • FIG. 20 is a flowchart illustrating a detailed processing procedure example of the target file Fi aggregation processing (step S1903) illustrated in FIG.
  • FIG. 21 is an explanatory diagram of a character appearance frequency tabulation table.
  • FIG. 22 is a flowchart showing a detailed processing procedure example of the basic word totaling process (step S2002) shown in FIG.
  • FIG. 23 is an explanatory diagram of a basic word appearance frequency totaling table.
  • FIG. 24 is a flowchart showing a detailed processing procedure of the longest match search process (step S2201) shown in FIG.
  • FIG. 25 is a flowchart showing a detailed processing procedure example of the map allocation number determination processing (step S1802) shown in FIG.
  • FIG. 26 is a flowchart illustrating a detailed processing procedure example of the recounting process (step S1803) illustrated in FIG.
  • FIG. 27 is a flowchart illustrating a detailed processing procedure example of the recalculation processing (step S2603) of the target file Fi.
  • FIG. 28 is an explanatory diagram of an upper divided character code appearance frequency totaling table.
  • FIG. 29 is an explanatory diagram of a lower divided character code appearance frequency totaling table.
  • FIG. 30 is a flowchart showing a detailed processing procedure of the bi-gram character string specifying process (step S2706) shown in FIG.
  • FIG. 31 is an explanatory diagram of a bi-gram character string appearance frequency totaling table.
  • FIG. 32 is a flowchart showing a detailed processing procedure example of the Huffman tree generation processing (step S1804) shown in FIG.
  • FIG. 33 is a flowchart illustrating a detailed processing procedure example of the branch number specifying process (step S3204) illustrated in FIG.
  • FIG. 34 is a flowchart showing a detailed processing procedure of the construction process (step S3205) shown in FIG.
  • FIG. 35 is a flowchart showing a detailed processing procedure of the leaf pointer generation processing (step S3403) shown in FIG.
  • FIG. 36 is a flowchart showing a detailed processing procedure example of the map creation processing (step S1805) shown in FIG.
  • FIG. 37 is a flowchart showing a detailed processing procedure of the map creation processing (step S3603) of the target file Fi shown in FIG.
  • FIG. 38 is a flowchart showing a detailed processing procedure example of the basic word appearance map creation processing (step S3702) shown in FIG.
  • FIG. 39 is a flowchart showing a detailed processing procedure example of the specific single character appearance map creation processing (step S3803) shown in FIG.
  • FIG. 40 is a flowchart showing a detailed processing procedure example of the divided character code appearance map creation processing (step S4003) shown in FIG.
  • FIG. 41 is a flowchart showing a detailed processing procedure example of the bi-gram character string map creation processing (step S3704) shown in FIG.
  • FIG. 42 is a flowchart illustrating a detailed processing procedure example of the bi-gram character string appearance map generation process (step S4104).
  • FIG. 43 is an explanatory diagram of a specific example of compression processing using the 2 N- branch nodeless Huffman tree H.
  • FIG. 44 is a flowchart illustrating an example of a compression processing procedure of the target file group Fs using the 2 N- branch nodeless Huffman tree H by the first compression unit 403.
  • FIG. 45 is a flowchart (part 1) showing a detailed processing procedure of the compression processing (step S4403) shown in FIG. FIG.
  • FIG. 46 is a flowchart (part 2) illustrating a detailed processing procedure of the compression processing (step S4403) illustrated in FIG.
  • FIG. 47 is a flowchart (part 3) showing a detailed processing procedure of the compression processing (step S4403) shown in FIG.
  • FIG. 48 is an explanatory diagram showing the relationship between the appearance rate and the appearance rate area.
  • FIG. 49 is an explanatory diagram of a compression pattern table having compression patterns for each appearance rate area.
  • FIG. 50 is an explanatory diagram showing compression patterns in the case of the B region and the B ′ region.
  • FIG. 51 is an explanatory diagram showing compression patterns for the C region and the C ′ region.
  • FIG. 52 is an explanatory diagram showing compression patterns in the case of the D region and the D ′ region.
  • FIG. 53 is an explanatory diagram showing compression patterns for the E region and the E ′ region.
  • FIG. 54 is a flowchart showing a compression code map M compression processing procedure.
  • FIG. 55 is a block diagram showing a functional configuration example 2 of the information processing apparatus 400 according to the present embodiment.
  • FIG. 56 is an explanatory diagram of a file decompression example (G1).
  • FIG. 57 is an explanatory diagram of a file decompression example (G2).
  • FIG. 58 is an explanatory diagram (part 1) of a specific example of the decompression process in FIG. 56 and
  • FIG. 59 is an explanatory diagram (part 2) of a specific example of the decompression process in FIG. 56 and
  • FIG. 60 is a flowchart showing a search processing procedure according to the present embodiment.
  • FIG. 61 is a flowchart (part 1) showing a detailed processing procedure of the file narrowing process (step S6002) shown in FIG.
  • FIG. 62 is a flowchart (part 2) showing a detailed processing procedure of the file narrowing process (step S6002) shown in FIG.
  • FIG. 63 is a flowchart (No. 1) showing a detailed processing procedure example of the decompression process (step S6003) using the 2 N- branch nodeless Huffman tree H shown in FIG.
  • FIG. 64 is a flowchart (part 2) of a detailed process procedure example of the decompression process (step S6003) using the 2 N- branch nodeless Huffman tree H depicted in FIG.
  • FIG. 65 is an explanatory diagram of a specific example of the update process.
  • FIG. 61 is a flowchart (part 1) showing a detailed processing procedure of the file narrowing process (step S6002) shown in FIG.
  • FIG. 62 is a flowchart (part 2) showing a detailed processing procedure of the
  • FIG. 66 is a flowchart of the update process procedure shown in FIG.
  • FIG. 67 is a flowchart (first half) showing a detailed processing procedure of the map update processing (step S6609) of the additional file shown in FIG.
  • FIG. 68 is a flowchart (second half) showing a detailed processing procedure of the map update processing (step S6609) of the additional file shown in FIG.
  • character information refers to single characters, basic words, divided character codes, and the like that constitute text data.
  • the target file group is, for example, electronic data such as a document file, a Web page, and an e-mail, and is, for example, electronic data in a text format, an HTML (HyperText Markup Language) format, or an XML (Extensible Markup Language) format.
  • HTML HyperText Markup Language
  • XML Extensible Markup Language
  • single character is a character expressed by one character code.
  • the character code length of a single character varies depending on the character code type.
  • UTF Unicode Transform Format 16 is 16-bit code
  • ASCII American Standard Code for Information Interchange
  • Shift JIS Japanese Industrial Standard bit
  • Japanese characters with a shift JIS code two 8-bit codes are combined.
  • “basic words” refer to basic words learned at elementary and junior high schools and reserved words expressed in specific character strings. Taking the English text of “This is a ...” as an example, it is a word such as “This”, “is”, “a”, etc., and is classified into a thousand word level, a two thousand word level, and a several thousand word level. The dictionary is marked with “***”, “**”, and “*”.
  • the reserved word is a predetermined character string, and includes, for example, an HTML tag (for example, ⁇ br>).
  • the “division character code” is each code obtained by dividing a single character into an upper code and a lower code.
  • a single character may be divided into an upper code and a lower code.
  • the character code of a single character “turf” is represented by “9D82”, but is divided into an upper divided character code “0x9D” and a lower divided character code “0x82”.
  • “gram” is a character unit. For example, for a single character, one character is 1 gram. With regard to the divided character code, the divided character code alone is 1 gram. Therefore, the single character “turf” is 2 grams.
  • UTF16 will be described as an example of a character code.
  • bit when “bit is ON”, the value of the bit is “1”, and when “bit is OFF”, the value of the bit is “0”.
  • bit when “bit is ON”, the value of the bit may be “0”, and when “bit is OFF”, the value of the bit may be “1”.
  • “Appearance map” is a bit string obtained by concatenating a pointer that specifies character information and a bit string that indicates whether or not the character information exists in each target file. At the time of search processing, this bit string can be used as an index indicating whether or not to include character information to be searched according to ON / OFF of bits.
  • a pointer for designating character information for example, a compression code of character information is employed.
  • the character information itself may be used as the pointer for designating the character information.
  • the “compression code map” is a bitmap in which appearance maps for each character information indicated by the pointers of the compression codes are collected.
  • the compression code map of the bi-gram character string is a compression code string that combines the compression code of the first gram and the compression code of the second gram.
  • “2-gram character string” is a character string in which 1-gram character codes are concatenated.
  • the character string “doll play” includes two consecutive characters “doll”, “form turf”, and “play”. Since the two-character “doll” “person” and “shape” are single characters that are not divided, the two-character “doll” is a 2-gram character string as it is.
  • the target file group When the target file group is compressed by basic words, it is possible to access with one pass when generating or searching the compression symbol map. If the target file group is not compressed, the character code of the character information may be used as it is as a pointer for specifying the character information.
  • FIG. 1 is an explanatory diagram illustrating an example of target file update.
  • the character information is written for the compression code of the character information serving as a pointer for designating the character information.
  • a deletion map D is set in the compression code map M.
  • the deletion map D is an index indicating the existence or deletion of the target file Fi as a bit string.
  • the target file Fi is excluded from the search target by turning off the deletion map corresponding to the target file Fi without deleting the target file Fi itself. be able to.
  • the appearance map in the compression symbol map M is compressed and held.
  • the compression code map M may be compressed by a bit string unit corresponding to each character information, for example, by compression using a Huffman tree.
  • the compression code map M may be compressed with respect to the compression map M excluding the deletion map D.
  • the number of digits in the compressed compression code map M is equal to or less than the number of target files. 1 (A) and 1 (C), for convenience, the compressed bit string is shorter than before compression by displaying the display area of each bit string small.
  • the compression code map M is expanded by the Huffman tree used for compression when narrowing down the target file group. For example, when the search character string is “doll”, the bits of the character information “person”, “shape”, “doll” are ON in the target file F3, and the bit of the deletion map D is also ON. . Therefore, the AND result of these three bits is “1”. Therefore, the target file F3 is searched.
  • the target file F2 since the bits of the character information “people”, “form”, and “doll” are ON, but the bit of the deletion map D is OFF, the AND result of these three bits is “ 0 ". Therefore, the target file F2 is not searched.
  • the bit of the target file F3 of the deletion map D is changed from ON to OFF. Thereby, the target file F3 is excluded from the search target like the target file F2.
  • the target file F3 is updated.
  • a character string “I saw a puppet show” is described in the target file F3, and “character”, “form”, and “paper” do not exist in character strings other than the character string. .
  • “doll” is rewritten to “paper”.
  • the bit of the file number n + 1 is set in each appearance map. Further, the bit of the deletion map D of the file number n + 1 is set to ON.
  • the target file F (n + 1) by deleting “doll”, the bits of the character information “person”, “shape”, “doll” are turned OFF, and the bit of the character information “paper” is turned ON.
  • the target file F (n + 1) can be set as a search target.
  • the bit of the deletion map D of the file number 3 changes from ON to OFF.
  • the target file F3 can be excluded from the search target.
  • the update source target file F3 may be deleted. In this case, memory saving can be achieved.
  • the target file F3 may be left as it is. In this case, if it is desired to return to the state before the update, it can be restored.
  • a pointer indicating the storage location of the target file F3 may be used as a pointer indicating the storage location of the updated file F (n + i). That is, the target file F3 itself may be rewritten, and the rewritten file may be used as the target file F (n + i).
  • the compressed appearance maps of the file numbers 1 to n can be held without updating the contents in the compressed state.
  • the bit strings in the compression area of the compression code map M are arranged in advance in descending order of the file number p of the target file group Fs from the head position to the tail position.
  • the search process using the compression code map M and the update process of the compression code map M described with reference to FIG. 1 are effective not only for Japanese but also for other languages.
  • the target file Fi including the sentence “I watched marionette performance.” Corresponds to “watch”, “marionette”, and “performance” in the compression code map M, respectively.
  • the bit to be turned ON For example, when a search character string “marionette performance” is received, a search is performed for a target file whose AND result of the bit corresponding to each of “marionette” and “performance” and the deletion map D is “1”. The range is narrowed down.
  • the bit of the compression symbol map corresponding to F (n + i) is set to ON for each of “watch”, “acrobatic”, and “performance”. To do. If the target file Fi does not include the word “marionette” after the update, the bit of F (n + i) corresponding to “marionette” is set to OFF. Further, the deletion map D corresponding to the target file F (n + i) is turned ON, and the deletion map D corresponding to Fi is turned OFF. Thereby, the update process of the compression symbol map M is also performed for English in accordance with the update of the target file Fi.
  • FIG. 2 is a block diagram of a hardware configuration example of the information processing apparatus (including the extraction apparatus) according to the embodiment.
  • the information processing apparatus includes a CPU (Central Processing Unit) 201, a ROM (Read Only Memory) 202, a RAM (Random Access Memory) 203, a magnetic disk drive 204, a magnetic disk 205, and an optical disk drive 206.
  • Each component is connected by a bus 200.
  • the CPU 201 controls the entire information processing apparatus.
  • the ROM 202 stores a program such as a boot program.
  • the ROM 202 stores a program for generating and managing the compression code map M and a program for performing a search using the compression code map M or the code map.
  • the RAM 203 is used as a work area for the CPU 201, and the CPU 201 can read a program stored in the ROM 202 into the RAM 203 and execute it.
  • the magnetic disk drive 204 controls reading / writing of data with respect to the magnetic disk 205 according to the control of the CPU 201.
  • the magnetic disk 205 stores data written under the control of the magnetic disk drive 204.
  • the optical disc drive 206 controls reading / writing of data with respect to the optical disc 207 according to the control of the CPU 201.
  • the optical disk 207 stores data written under the control of the optical disk drive 206, and causes the information processing apparatus to read data stored on the optical disk 207.
  • the display 208 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
  • a CRT a CRT
  • a TFT liquid crystal display a plasma display, or the like can be adopted.
  • I / F An interface 209 is connected to a network 214 such as a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet through a communication line, and others are connected via this network 214. Connected to other devices.
  • the I / F 209 controls an internal interface with the network 214 and controls data input / output from an external device.
  • a modem or a LAN adapter may be employed as the I / F 209.
  • the keyboard 210 includes keys for inputting characters, numbers, various instructions, and the like, and inputs data. Moreover, a touch panel type input pad or a numeric keypad may be used.
  • the mouse 211 performs cursor movement, range selection, window movement, size change, and the like. A trackball or a joystick may be used as long as they have the same function as a pointing device.
  • the scanner 212 optically reads an image and takes in the image data into the information processing apparatus.
  • the scanner 212 may have an OCR (Optical Character Reader) function.
  • OCR Optical Character Reader
  • the printer 213 prints image data and document data.
  • a laser printer or an ink jet printer can be employed as the printer 213, for example, a laser printer or an ink jet printer can be employed.
  • the information processing apparatus may be a portable terminal such as a mobile phone, a smartphone, an electronic book terminal, or a notebook personal computer, in addition to a server or a stationary personal computer. Further, the present embodiment may be implemented according to a plurality of computers.
  • FIG. 3 is an explanatory diagram showing a system configuration example according to the present embodiment.
  • the system includes information processing apparatuses 301 to 303, a network 304, a switch 305, and a radio base station 307 that can include the hardware shown in FIG.
  • the I / F included in the information processing apparatus 303 has a wireless communication function.
  • the information processing apparatus 301 executes processing for generating a compression code map M for content including a plurality of files, and distributes the information to the information processing apparatus 302 and the information processing apparatus 303. You may perform the search process about the content delivered by each.
  • the information processing device 301 executes processing for generating a compression code map M for content including a plurality of files, and the information processing device 301 receives a search request for content from the information processing device 302 or the information processing device 303.
  • the search process may be executed, and the result of the executed search process may be returned to each of the information processing apparatus 302 and the information processing apparatus 303.
  • each of the information processing apparatuses 301 to 303 may be a portable terminal such as a mobile phone, a smartphone, an electronic book terminal, or a notebook personal computer in addition to a server or a stationary personal computer. .
  • FIG. 4 is a block diagram showing a functional configuration example 1 of the information processing apparatus according to the present embodiment, and FIG. 5 shows the processing from the totaling unit to the second compression unit of the information processing apparatus shown in FIG. It is explanatory drawing which shows a flow.
  • the information processing apparatus 400 includes a totaling unit 401, a first generation unit 402, a first compression unit 403, a creation unit 404, a second generation unit 405, and a second compression unit 406. .
  • the totaling unit 401 to the second compression unit 406 realize their functions by causing the CPU 201 to execute programs stored in a storage device such as the ROM 202, the RAM 203, and the magnetic disk 205 shown in FIG. To do. Note that the totaling unit 401 to the second compression unit 406 write the execution results to the storage device and read the execution results of other units, respectively, and execute the calculations.
  • the summary unit 401 to the second compression unit 406 will be briefly described below.
  • the totaling unit 401 totalizes the number of appearances of character information in the target file group. Specifically, for example, the counting unit 401 counts the number of appearances of character information in the target file group Fs as shown in FIG. The totaling unit 401 counts the number of appearances for each specific single character, upper divided character code, lower divided character code, bi-gram character, and basic word. Detailed processing contents of the counting unit 401 will be described later.
  • generation part 402 produces
  • the 2 N- branching nodeless Huffman tree H is a Huffman tree in which 2 N branches branch from the root, and the leaf is directly pointed by one or a plurality of branches. There are no nodes (inner nodes). Since there is no node and it hits the leaf directly, the expansion speed can be increased compared to a normal Huffman tree having nodes.
  • a leaf is a structure including corresponding character information and its compression code. Also called a leaf structure. The number of branches assigned to the leaf depends on the compression code length of the compression code existing in the assignment destination leaf. Detailed processing contents of the first generation unit 402 will be described later.
  • the first compression unit 403 compresses each target file of the target file group Fs using the 2 N branching no-node Huffman tree H to form a compressed file group fs (FIG. 5C). Detailed processing contents of the first compression unit 403 will be described later.
  • the creating unit 404 creates a compression code map M based on the summation result of the summation unit 401 and the compression code assigned for each character information in the 2 N -branch nodeless Huffman tree H.
  • the creation unit 404 also creates the compression code map M for each specific single character, upper divided character code, lower divided character code, bi-gram character, and basic word.
  • the creation unit 404 turns ON the bit of the file number when the corresponding character information in the compression code map M appears even once in one target file (FIG. 5D). In the initial state, the deletion map D is all turned on for each target file. Detailed processing contents of the creation unit 404 will be described later.
  • the second generation unit 405 generates a Huffman tree h that compresses the appearance map based on the appearance probability of the character information (FIG. 5 (E)). Detailed processing contents of the second generation unit 405 will be described later.
  • the second compression unit 406 compresses each appearance map using the Huffman tree generated by the second generation unit 405 (FIG. 5F). Detailed processing contents of the second compression unit 406 will be described later.
  • FIG. 6 is an explanatory diagram showing an example of the totalization by the totalization unit 401 and the creation of the compression code map M by the creation unit 404.
  • the information processing apparatus 400 counts the number of appearances of character information existing in the target file group Fs.
  • the tabulation results are sorted in descending order of the number of appearances, and the ascending order is given in descending order of the number of appearances.
  • the information processing apparatus 400 calculates the compression code length for each character information on the basis of the tabulation results obtained in (1). Specifically, the information processing apparatus 400 calculates an appearance rate for each character information. The appearance rate is obtained by dividing the number of appearances of character information by the total number of appearances of all character information. Then, the information processing apparatus 400 obtains an occurrence probability corresponding to the appearance rate, and derives a compression code length from the occurrence probability.
  • the probability of occurrence is expressed by 1/2 x .
  • x is a power number.
  • the compression code length is a power number x of the occurrence probability. Specifically, the compression code length is determined depending on which range of the occurrence rate is below the occurrence probability.
  • AR is the appearance rate. 1/2 0 > AR ⁇ 1/2 1 ...
  • the compression code length is 1 bit. 1/2 1> AR ⁇ 1/2 2 ⁇ compression code length 2 bits. 1/2 2 > AR ⁇ 1/2 3 ...
  • the compression code length is 3 bits. 1/2 3 > AR ⁇ 1/2 4 ...
  • the compression code length is 4 bits. ⁇ ⁇ ⁇ 1/2 N-1> AR ⁇ 1 /2 N ⁇ compression code length N bits.
  • the information processing apparatus 400 specifies the number of leaves for each compression code length by counting the number of leaves for each compression code length.
  • the maximum compression code length is 17 bits.
  • the number of leaves is the number of types of character information. Therefore, when the number of leaves of the compression code length of 5 bits is 2, this indicates that there are two character information to which a 5-bit compression code is assigned.
  • the information processing apparatus 400 assigns the number of branches per leaf for each compression code length. Specifically, the number of branches per leaf is determined as 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 , 16 in descending order with respect to the corrected compression code length.
  • the total number (number of leaves) of character information to which a compression code having a compression code length of 11 bits is assigned is 1215, but the number of branches per leaf is one.
  • the total number (number of leaves) of character information to which a compression code having a compression code length of 6 bits is assigned is 6, but the number of branches per leaf is 32.
  • 32 branches are assigned.
  • the leaf structure is a data structure in which character information, a compression code length thereof, and a compression code corresponding to the compression code length are associated with each other.
  • the compression code length of the character “0” that appears first is 6 bits, and the compression code is “000000”.
  • a pointer to a leaf is a bit string obtained by concatenating a bit string corresponding to a number corresponding to the number of branches per leaf to a compression code in the leaf structure that is the point destination. For example, since the compression code length of the compression code “000000” assigned to the character “0” that is the leaf L1 is 6 bits, the number of branches per leaf L1 is 32.
  • the first 6 bits of the pointer to the leaf L1 are the compression code “000000”.
  • the number of branches per leaf is one, there is one pointer to the leaf, and the compression code and the pointer to the leaf are the same bit string.
  • the information processing apparatus 400 constructs a 2 N- branch nodeless Huffman tree H.
  • a 2 N -branch nodeless Huffman tree H that directly specifies a leaf structure is constructed by using the leaf pointer as a root.
  • the compression code string is an 11-bit bit string whose leading 6 bits are “000000”
  • the character “0” is generated by the 2 N- branch nodeless Huffman tree H regardless of which of the 32 types of bit strings is the subsequent 5 bits.
  • FIG. 7 is an explanatory diagram showing details of (1) counting the number of appearances.
  • the information processing apparatus 400 executes three phases: (A) aggregation from the target file group Fs, (B) sorting in descending order of appearance frequency, and (C) extraction up to the rank of the target appearance rate. .
  • A aggregation from the target file group Fs
  • B sorting in descending order of appearance frequency
  • C extraction up to the rank of the target appearance rate.
  • the information processing apparatus 400 reads the target file group Fs and counts the appearance frequency (number of appearances) of basic words.
  • the information processing apparatus 400 refers to the basic word structure, and when a character string that matches the basic word in the basic word structure exists in the target file, the appearance frequency of the basic word (initial value is 0) 1 is added.
  • the basic word structure is a data structure in which basic words are described.
  • the information processing apparatus 400 sorts the basic word appearance frequency aggregation table in descending order of appearance frequency. That is, sorting is performed in descending order of appearance frequency, and ranking is performed from the basic words having the highest appearance frequency.
  • the information processing apparatus 400 reads the target file group Fs and counts the appearance frequency of a single character. Specifically, the information processing apparatus 400 adds 1 to the appearance frequency (initial value is 0) of a single character.
  • the information processing apparatus 400 sorts the single character appearance frequency aggregation table in descending order of appearance frequency. That is, sorting is performed in descending order of appearance frequency, and ranking is performed from a single character having the highest appearance frequency.
  • the information processing apparatus 400 refers to the basic word appearance frequency tabulation table after sorting (B1), and extracts basic words ranked up to the target appearance rate Pw. Specifically, the information processing apparatus 400 uses the sum of the appearance frequencies of all basic words (total appearance frequency) as a denominator, accumulates the appearance frequencies in descending order from the basic word ranked first, and makes each rank up to each rank. The appearance rate Pw of is calculated.
  • the target appearance rate Pw is 75 [%]
  • the information processing apparatus 400 refers to the single character appearance frequency tabulation table after sorting (B2), and extracts single characters of ranks up to the target appearance rate Pc. Specifically, the information processing apparatus 400 uses the sum of the appearance frequencies of all the single characters (total appearance frequency) as the denominator, accumulates the appearance frequencies in descending order from the single character with the highest rank, and sets the numerator. The appearance rate of is calculated.
  • the target appearance rate Pc is 80 [%]
  • single characters up to the y-th place are extracted.
  • the single character extracted in (C21) is referred to as “specific single character (group)” in order to distinguish it from the original single character group.
  • non-specific single character (group) since a single character excluded from the specific single character group (hereinafter, “non-specific single character (group)”) in the single character group has a lower appearance frequency than each specific single character, its character code Split. Specifically, the character code of a non-specific single character is divided into a character code of upper bits and a character code of lower bits.
  • any divided character code is expressed by a code of 0x00 to 0xFF.
  • the upper bit character code is the upper divided character code
  • the lower bit character code is the lower divided character code.
  • the character information table of FIG. 8 is a table reflecting the total result in (1) of FIG. 6, and rank items, decompression type items, code items, character items, appearance count items, total count items, An appearance rate item, an occurrence probability item before correction, and a compression code length item are set. Among them, information from the ranking item to the total number of items is information obtained as a result of the re-sorting.
  • the rank (ascending order) is written in descending order of the number of appearances of the character information.
  • the character information type is written in the decompression type item. “16” indicates a 16-bit code (a single character thereof). “8” indicates an 8-bit divided character code. “Base” indicates a basic word.
  • Specified single character or divided character code is written in the code item among the character information items. Leave blank for basic words. Of the character information items, characters and basic words are written in the character items. Leave blank for split character codes. In the appearance number field, the number of appearances of character information in the target file group Fs is written. In the total number field, the total number of appearances of all character information is written.
  • the appearance rate item a value obtained by dividing the number of appearances by the total number is written as the appearance rate.
  • the occurrence probability corresponding to the appearance rate is written in the occurrence probability item of the item before correction.
  • the compression code length item the compression code length corresponding to the occurrence probability, that is, the power y of the occurrence probability 1/2 y is written as the compression code length.
  • the result of totaling the number of leaves (total number of character information types) in the compression code length unit in the character information table of FIG. 8 is the number of leaves before correction in FIG.
  • the correction A the compression code length upper length N (i.e., the maximum branch number 2 N number N powers of the 2 N branch-free node Huffman tree H) the number of leaves assigned to more compression code length
  • the correction is concentrated to the upper limit length N of the compression code length.
  • the information processing apparatus 400 determines whether the total occurrence probability is 1 or less.
  • Correction B is a correction for updating the number of leaves without changing the compression code length group (5 to 12 bits) in correction A. Specifically, the correction is performed when the total occurrence probability in the correction A is not greater than or equal to the threshold value t and not greater than 1. More specifically, there are two types of correction B.
  • correction B + when the total occurrence probability is less than the threshold t, a correction that increases the total occurrence probability until the total occurrence probability reaches a maximum value of 1 or less, for example, converges to the maximum asymptotic value.
  • correction B + when the total occurrence probability is greater than 1, the total occurrence probability is decreased until the maximum value less than 1 is obtained after the total occurrence probability is reduced to 1 or less, for example, until convergence to the maximum asymptotic value. Correction (hereinafter, correction B ⁇ ).
  • the correction B - 1 st (correction B - 1) in the number of leaves of the correction A in each of the compression code length, in the last correction sum of occurrence probabilities (in this case, the correction A) (1.146)
  • the number of leaves is updated by dividing. The decimal part may be rounded down or rounded off.
  • the upper limit length N of the compression code length is obtained.
  • the information processing apparatus 400 determines whether or not the total occurrence probability with the correction B - 1 has converged to the maximum asymptotic value of 1 or less. If probability sum of 1 has not converged to the maximum asymptotic value of 1 or less, the correction B - - Correction B shifts to - the second (2 Correction B). When it converges to the maximum asymptotic value, it does not shift to the correction B - 2 and is determined by the number of leaves for each compression code length at this time. Since the total occurrence probability “1.042” updated by the correction B - 1 is larger than 1, it does not converge to the maximum asymptotic value, and the process proceeds to the correction B - 2.
  • correction B - 2 the number of leaves is divided by dividing the number of leaves in correction B - 1 for each compression code length by the total occurrence probability (1.042) of the previous correction (in this case, correction B - 1). Update. The decimal part may be rounded down or rounded off.
  • the upper limit length N of the compression code length is obtained by subtracting the total number of leaves (excluding the upper limit length N of the compression code length) of the compression code length in the correction B - 2 from the total number of leaves (1305). Find the number of leaves. In this case, there are 1215.
  • the information processing apparatus 400 obtains the total occurrence probability with the correction B - 2 by the same calculation process as that with the correction B - 1. Then, the information processing apparatus 400 determines whether or not the total occurrence probability with the correction B - 2 has converged to the maximum asymptotic value of 1 or less. If probability sum for 2 has not converged to the maximum asymptotic value of 1 or less, the correction B - - Correction B shifts to - third (3 Correction B). When it converges to the maximum asymptotic value, it does not shift to the correction B - 3, but is determined by the number of leaves for each compression code length at this time. The total occurrence probability “0.982” updated with the correction B - 2 is 1 or less, but since it is unknown whether it has converged to the maximum asymptotic value, the process proceeds to the correction B - 3.
  • the number of leaves is calculated by dividing the number of leaves in the correction B - 2 for each compression code length by the total occurrence probability (0.982) of the previous correction (in this case, the correction B - 2). Update. The decimal part may be rounded down or rounded off.
  • the upper limit length N of the compression code length is obtained by subtracting the total number of leaves (excluding the upper limit length N of the compression code length) of the compression code length in the correction B - 3 from the total number of leaves (1305). Find the number of leaves. In this case, there are 1215.
  • the information processing apparatus 400 obtains the total occurrence probability with the correction B - 3 by the same calculation process as that with the correction B - 2. Then, the information processing apparatus 400, the correction B - probability sum for 3 determines whether converged to maximum asymptotic value of 1 or less. If probability sum of the three has not converged to the maximum asymptotic value of 1 or less, the correction B - - Correction B shifts to - fourth (4 Correction B). When it converges to the maximum asymptotic value, it does not shift to the correction B - 4, but is determined by the number of leaves for each compression code length at this time.
  • the total occurrence probability “0.982” updated with the correction B - 3 is the same value as the total occurrence probability “0.982” updated with the correction B - 2. That is, the number of leaves of each compression code length in the correction B - 3 and the number of leaves of each compression code length in the correction B - 2 are the same. In this case, the information processing apparatus 400 determines that the total occurrence probability has converged to the maximum asymptotic value, and determines the number of leaves.
  • the correction B ⁇ is continued until the number of leaves is determined.
  • the number of leaves for each compression code length is determined by the correction B - 3.
  • the information processing apparatus 400 calculates the number of branches per leaf for each compression code length.
  • the number of branches per leaf will be assigned as 5 and 26 .
  • the subtotal of the number of branches is a multiplication result obtained by multiplying the number of branches per leaf by the determined number of leaves for each compression code length.
  • FIG. 10 is an explanatory diagram showing a correction result for each character information.
  • correction results from correction A and correction B - 1 to correction B - 2 are added to the character information table.
  • a short compression code length is assigned from the first character information in the ranking item.
  • the number of leaves is 6 when the compression code length is 6 bits
  • the number of leaves is 18 when the compression code length is 7 bits
  • the number of leaves is 1215 when the compression code length is 11 bits. Therefore, 6-bit compression code length is used for character information with ranks 1 to 6 (for 6 leaves), and 7 for character information with ranks 7 to 24 (for 18 leaves).
  • the compression code length of bits ..., Is assigned a compression code length of 11 bits for character information (for 1215 leaves) whose rank is from 91st to 1305th.
  • the information processing apparatus 400 assigns a compression code for each character information based on the character information, the compression code length assigned to the character information, and the number of leaves for each compression code length, and generates a leaf structure. It becomes. For example, since the single character “0” with the first appearance rate is assigned a compression code length of 5 bits, the compression code is “000000”. Therefore, a structure of the leaf L1 including the compression code “000000”, the compression code length “6”, and the character information “0” is generated.
  • the compression code length is 5 bits to 11 bits.
  • the compression code map M of the bi-gram character string may be divided, correction is performed so that the compression code length is an even number of bits. May be. Specifically, for example, the compression code length of 5 bits and 7 bits of character information is 6 bits, 9 bits of character information is 8 bits, and 11 bits of character information is 10 bits.
  • FIG. 11 shows a pointer to a leaf when the upper limit N of the compression code length is 11 bits.
  • N 11
  • the compression code length is 6 bits and the number of leaves is 6, “000000” to “000101” are assigned as the compression codes.
  • the first 6 bits of the pointer to the leaf are a compression code and the subsequent 5 bits are 32 types of bit strings. Therefore, 32 types of leaf pointers are generated for each compression code having a compression code length of 6 bits.
  • the compression code length is 7 bits and the number of leaves is 18, compression codes “0001100” to “0011111” are assigned.
  • the first 7 bits of the pointer to the leaf are a compression code and the subsequent 4 bits are 16 types of bit strings. Therefore, 16 types of pointers to leaves are generated for each compression code having a compression code length of 7 bits.
  • compression code length is 9 bits and the number of leaves is 23, compression codes “010101110” to “011000100” are assigned.
  • the leading 9 bits of the pointer to the leaf are a compression code
  • the subsequent 2 bits are four types of bit strings. Therefore, four types of pointers to leaves are generated for each compression code having a compression code length of 9 bits.
  • the compression code length is 10 bits and the number of leaves is 20, compression codes “01100001001” to “0110011101” are assigned.
  • the first 10 bits of the pointer to the leaf are a compression code and the subsequent 1 bit is two types of bit strings. Therefore, two types of pointers to leaves are generated for each compression code having a compression code length of 10 bits.
  • the root structure stores a pointer to a leaf.
  • the pointer to the leaf can specify the structure of the leaf pointed to.
  • 32 pointers to the leaf are generated for the leaf structure in which the compression code length of 6 bits is stored. Accordingly, for the structure of the leaf L1, 32 pointers L1P (1) to L1P (32) to the leaf L1 are stored in the root structure. The same applies to the structure of the leaf L2 to the structure of the leaf L6.
  • the structures after the leaf L7 are as shown in FIG.
  • FIG. 13 is an explanatory view showing a leaf structure.
  • the leaf structure is a data structure having a first area to a fourth area.
  • a compression code and a compression code length thereof are stored in the first area.
  • the second area stores a leaf label, an extension type (see FIG. 8), and an appearance rate (see FIG. 10).
  • the third area stores a 16-bit character code that is a specific single character according to the decompression type, an 8-bit divided character code obtained by dividing the character code of a non-specific single character, or a pointer to a basic word. .
  • a basic word in the basic word structure is specified by a pointer to the basic word.
  • a collation flag is also stored. The collation flag is “0” by default. In the case of “0”, the decompressed character is written in the decompression buffer as it is, and in the case of “1”, it is sandwiched between the ⁇ color> tag and the ⁇ / color> tag and written into the decompression buffer.
  • the appearance rate of the stored character information and the appearance rate area are stored.
  • the appearance rate is the appearance rate of the character information shown in FIG.
  • the appearance rate area will be described with reference to FIGS. 48 and 49.
  • FIG. the code type and the code classification are stored in the fourth area.
  • the code type is information for identifying whether a character code corresponds to a number, an alphabetic character, a special symbol, katakana, hiragana, or a kanji, or a pointer to a basic word.
  • the code classification is information for identifying whether the character code is 16 bits or 8 bits. In the case of a 16-bit character code or a reserved word, “1” is assigned as a code division, and in the case of an 8-bit divided character code, “0” is assigned as a code division.
  • step S3205 information in the first area to the fourth area is stored in a construction process (step S3205) described later.
  • FIG. 14 is an explanatory diagram showing a structure of specific single characters.
  • a specific single character structure 1400 is a data structure that stores a specific single character code e # and a pointer to its leaf L #.
  • the information processing apparatus 400 stores the specific single character code e # in the specific single character structure 1400 when the tabulation result is obtained from the target file group Fs. To do. Then, when the 2 N -branch nodeless Huffman tree H is constructed, the information processing apparatus 400 specifies a specific single code corresponding to the compression code stored in the structure of each leaf in the 2 N -branch nodeless Huffman tree H. A pointer to the specific character code e # in the one-character structure 1400 is stored.
  • the information processing apparatus 400 corresponds to each specific single character code e # in the 2 N -branch nodeless Huffman tree H.
  • the pointer to the leaf is stored in association with the corresponding specific single character code e # in the specific single character structure 1400. Thereby, the structure 1400 of the specific single character is generated.
  • FIG. 15 is an explanatory diagram of a divided character code structure.
  • the divided character code structure 1500 stores a divided character code and a pointer to its leaf L #.
  • the information processing apparatus 400 stores the divided character code in the divided character code structure 1500 when the aggregation result from the target file group Fs is obtained. Then, when the 2 N -branching nodeless Huffman tree H is constructed, the information processing apparatus 400 divides the divided characters corresponding to the compression codes stored in the structure of each leaf in the 2 N -branching nodeless Huffman tree H. A pointer to a divided character code in the code structure 1500 is stored.
  • the information processing apparatus 400 stores the pointers to the leaves corresponding to the divided character codes in the 2 N branching no-node Huffman tree H.
  • the divided character code structure 1500 is stored in association with the corresponding divided character code. As a result, a divided character code structure 1500 is generated.
  • FIG. 16 is an explanatory diagram showing a basic word structure.
  • the basic word structure 1600 is a data structure that stores a basic word and a pointer to its leaf L #.
  • the basic word structure 1600 stores basic words in advance.
  • the information processing apparatus 400 has a basic word structure corresponding to the compression code stored in each leaf structure in the 2 N -branching nodeless Huffman tree H. Stores a pointer to the base word in the field 1600.
  • the information processing apparatus 400 converts the pointer to the leaf corresponding to each basic word in the 2 N- branch nodeless Huffman tree H to the basic word. Are stored in association with the corresponding bases in the structure 1600 of the other.
  • the generation unit 404 compresses the single character compression code map M, the upper divided character code compression code map M, and the lower divided character code compression.
  • a code map M, a word compression code map M, and a 2-gram character string compression code map M are created.
  • a detailed example of creating a compression code map M for a single character, a compression code map M for an upper divided character code, a compression code map M for a lower divided character code, and a compression code map M for a two-gram character string will be described.
  • the basic word compression code map M is omitted because it is performed in the same manner as the single character compression code map M.
  • FIG. 17 is an explanatory diagram showing an example of generating the compression code map M.
  • FIG. 17 it is assumed that a character string “Ryoma has disappeared” is described in the target file Fi.
  • the first character “dragon” is the target character. Since the target character “dragon” is a specific single character, the compression code of the specific single character “dragon” is acquired by accessing the 2 N- branch nodeless Huffman tree H, and the appearance map of the specific single character “dragon” is specified. To do. If it has not been generated, an appearance map of the specific single character “dragon” is generated with the compression code of the specific single character “dragon” as a pointer and the bit string indicating the existence of the target file set to all 0. Then, the bit of the target file Fi is turned ON (“0” ⁇ “1”) for the appearance map of the specific single character “dragon”.
  • the target character is shifted by 1 gram to make the target character “horse”. Since the target character “horse” is a specific single character, the compression code of the specific single character “horse” is obtained by accessing the 2 N- branch nodeless Huffman tree H, and the appearance map of the specific single character “horse” is specified. To do. If not generated, an appearance map of the specific single character “horse” is generated with the compression code of the specific single character “horse” as a pointer and the bit string indicating the existence of the target file set to all zeros. Then, the bit of the target file Fi is turned ON (“0” ⁇ “1”) for the appearance map of the specific single character “horse”.
  • (C) Next, the target character is shifted by 1 gram to change the target character to “ha”.
  • the target character “ha” is processed in the same manner as in (B), so that the bit of the target file Fi is turned ON (“0” ⁇ “1”) for the appearance map of the specific single character “ha”. Similarly, the bit of the target file Fi is turned ON (“0” ⁇ “1”) in the appearance map of the bi-gram character string “Hamaha”.
  • the target character is shifted by 1 gram, and the target character is set to “Remove”. Since the target character “O” is not a specific single character, the character code “0x811” of the target character “O” is divided into an upper divided character code “0x81” and a lower divided character code “0x31”. Then, the target character is set to the upper divided character code “0x81”. The upper divided character code “0x81” is processed in the same manner as the specific single character, so that the bit of the target file Fi is turned ON (“0” ⁇ “1”) for the appearance map of the upper divided character code “0x81”. . Similarly, the bit of the target file Fi is turned ON (“0” ⁇ “1”) in the appearance map of the bi-gram character string “ha 0x81”.
  • the target character is shifted by 1 gram, and the lower divided character code “0x31” of the character “deletion” is set as the target character.
  • the lower divided character code “0x31” is processed in the same manner, so that the bit of the target file Fi is turned ON (“0” ⁇ “1”) for the appearance map of the lower divided character code “0x31”. Similarly, the bit of the target file Fi is turned ON (“0” ⁇ “1”) in the appearance map of the bi-gram character string “0x81 0x31”.
  • FIG. 18 is a flowchart showing an example of a compression code map creation processing procedure by the creation unit 404.
  • the information processing apparatus 400 executes a totaling process (step S1801), a map allocation number determination process (step S1802), a recounting process (step S1803), a Huffman tree generation process (step S1804), and a map creation process (step S1805).
  • the totaling unit 401 executes the totaling process (step S1801) to the recounting process (step S1803).
  • the first generation unit 402 executes a Huffman tree generation process (step S1804), and the generation unit 404 executes a map generation process (step S1805).
  • the tabulation process (step S1801) is a process of counting the number of appearances (also referred to as appearance frequency) of single characters and basic words in the target file group Fs.
  • the map allocation number determination process (step S1802) is a process of determining the map allocation number for the single characters and basic words totaled in the totaling process (step S1801). The single character and the basic word of the appearance order corresponding to the map allocation number become the specific single character and the basic word, respectively.
  • the re-counting process is a process of dividing non-specific single characters other than the specific single character among the single characters into upper divided character codes and lower divided character codes, and totaling the number of appearances of each. Further, in the recounting process (step S1803), the number of appearances of the bi-gram character string is also counted.
  • the Huffman tree generation process (step S1804) is a process for generating a 2 N -branch nodeless Huffman tree H as shown in FIGS.
  • the map creation process (step S1805) is a process for generating a compression code map M for a specific single character, basic word, upper divided character code, lower divided character code, and bi-gram character string.
  • FIG. 19 is a flowchart illustrating a detailed processing procedure example of the aggregation processing (step S1801) illustrated in FIG.
  • step S1904 If i> n is not satisfied (step S1904: NO), the information processing apparatus 400 increments i (step S1905) and returns to step S1902. On the other hand, if i> n (step S1904: YES), the information processing apparatus 400 proceeds to the map allocation number determination process (step S1802) shown in FIG. 18 and ends the aggregation process (step S1801). According to this tabulation process (step S1801), the tabulation process (step S1903) of the target file Fi can be executed for each target file Fi.
  • FIG. 20 is a flowchart illustrating a detailed processing procedure example of the target file Fi aggregation processing (step S1903) illustrated in FIG.
  • the information processing apparatus 400 sets the target character as the first character of the target file Fi (step S2001), and executes basic word tabulation processing (step S2002). Details of the basic word counting process (step S2002) will be described with reference to FIG. Thereafter, the information processing apparatus 400 increases the number of appearances of the target character by 1 in the character appearance frequency tabulation table (step S2003).
  • FIG. 21 is an explanatory diagram showing a character appearance frequency tabulation table.
  • the character appearance frequency totaling table 2100 is stored in a storage device such as the RAM 203 and the magnetic disk 205, and increases the number of appearances by one each time a corresponding character appears.
  • the information processing apparatus 400 determines whether the target character is the last character of the target file Fi (step S2004). If the target character is not the end character of the target file Fi (step S2004: No), the information processing apparatus 400 shifts the target character by one character toward the end (step S2005), and returns to step S2002.
  • step S2004 when the target character is the last character of the target file Fi (step S2004: Yes), the information processing apparatus 400 proceeds to step S1904 and ends the aggregation processing of the target file Fi (step S1903).
  • step S1903 of the target file Fi the appearance frequencies of basic words and single characters existing in the target file group Fs can be totaled.
  • FIG. 22 is a flowchart showing a detailed processing procedure example of the basic word totaling process (step S2002) shown in FIG.
  • the information processing apparatus 400 executes the longest match search process (step S2201) and determines whether there is a longest matching basic word (step S2202). Details of the longest match search process (step S2202) will be described with reference to FIG. If there is a longest matching basic word (step S2202: Yes), the information processing apparatus 400 increments the longest matching basic word appearance count in the basic word appearance frequency totaling table by 1 (step S2203), and the process proceeds to step S2003. To do.
  • FIG. 23 is an explanatory diagram showing a basic word appearance frequency totaling table.
  • the basic word appearance frequency totaling table 2300 is stored in a storage device such as the RAM 203 and the magnetic disk 205, and increases the number of appearances by one each time the corresponding basic word appears.
  • step S2002 the basic word totaling process
  • step S2002 since the basic words can be counted by the longest match search process (step S2201), basic words having a long character string can be preferentially counted.
  • FIG. 24 is a flowchart showing a detailed processing procedure of the longest match search process (step S2201) shown in FIG.
  • the information processing apparatus 400 searches for a basic word that matches forward with the target character string from the target character to the c-th character (step S2402). Then, the information processing apparatus 400 determines whether or not there is a basic word by searching (step S2403). When the basic word is not hit by the binary search (step S2403: No), the process proceeds to step S2406.
  • step S2403 when the basic word is hit by the binary search (step S2403: Yes), the information processing apparatus 400 determines whether or not the hit basic word and the target character string completely match (step S2404). If they do not completely match (step S2404: NO), the process proceeds to step S2406. On the other hand, if there is a complete match (step S2404: Yes), the information processing apparatus 400 holds the longest match candidate in the storage device (step S2405), and proceeds to step S2406.
  • step S2406 the information processing apparatus 400 determines whether the binary search has been completed for the target character string (step S2406). Specifically, the information processing apparatus 400 determines whether a binary search has been performed up to the last basic word. If the binary search has not ended (step S2406: No), the information processing apparatus 400 proceeds to step S2402 and continues until the binary search ends.
  • step S2406 determines whether the binary search is completed for the target character string (step S2406: YES).
  • the information processing apparatus 400 determines whether the c-th character is the last character of the target file Fi (step S2407). .
  • the process proceeds to step S2410.
  • step S2407: No determines whether the information processing apparatus 400 determines whether c> cmax is satisfied (step S2408).
  • cmax is a preset value, whereby the upper limit number of characters of the target character string is set.
  • step S2408 determines whether there is a longest match candidate (step S2410). Specifically, the information processing apparatus 400 determines whether at least one longest match candidate is held in the memory in step S2405.
  • step S2410: Yes the information processing apparatus 400 determines the longest character string among the longest match candidates as the longest matching basic word (step S2411). Then, control goes to a step S2202. On the other hand, if there is no longest match candidate in step S2410 (step S2410: No), the process proceeds to step S2202. Thus, the longest match search process (step S2201) is completed. According to this longest match search process (step S2201), it is possible to search for the longest character string as a basic word in the character string that is completely matched from the basic words in the basic word structure.
  • FIG. 25 is a flowchart showing a detailed processing procedure example of the map allocation number determination processing (step S1802) shown in FIG.
  • Aw is the total number of appearances of the aggregated basic words.
  • step S2504 the information processing apparatus 400 increments the appearance rank Rw (step S2505) and returns to step S2503. That is, the appearance rank Rw is continuously lowered until the above formula (1) is satisfied.
  • the map assignment number Nw is the number of basic words assigned to the basic word appearance map generated in the map creation process (step S1805), and means the number of records (number of lines) in the basic word appearance map.
  • step S2509: NO the information processing apparatus 400 increments the appearance rank Rc (step S2510) and returns to step S2508. That is, the appearance rank Rc is continuously lowered until the above formula (2) is satisfied.
  • step S2509 YES
  • the map allocation number Nc is the number of specific single characters assigned to the specific single character appearance map generated in the map creation process (step S1805), and means the number of records (number of lines) of the specific single character appearance map. To do. Thereafter, the process proceeds to the recounting process (step S1803), and the map allocation number determining process (step S1802) is terminated.
  • the basic word appearance map can be generated for the number of basic words corresponding to the target appearance rate Pw in the map creation process (step S1805). Therefore, it is not necessary to perform map assignment for all basic words, and the map size can be optimized because it is determined according to the target appearance rate Pw.
  • the compression code map M of specific single characters can be generated for the number of single characters corresponding to the target appearance rate Pc in the map creation process (step S1805). Therefore, it is not necessary to perform map assignment for all single characters, and the map size can be optimized because it is determined according to the target appearance rate Pc.
  • FIG. 26 is a flowchart illustrating a detailed processing procedure example of the recounting process (step S1803) illustrated in FIG.
  • step S2604: NO If i> n is not satisfied (step S2604: NO), the information processing apparatus 400 increments i (step S2605) and returns to step S2602. On the other hand, if i> n (step S2604: Yes), the information processing apparatus 400 proceeds to the Huffman tree generation process (step S1804) illustrated in FIG. 18 and ends the recounting process (step S1803). According to this recounting process (step S1803), the recounting process (step S2603) of the target file Fi can be executed for each target file Fi.
  • FIG. 27 is a flowchart illustrating a detailed processing procedure example of the recalculation processing (step S2603) of the target file Fi.
  • the information processing apparatus 400 sets the target character as the first character of the target file Fi (step S2701), and determines whether the target character is a specific single character (step S2702). When it is a specific single character (step S2702: Yes), it transfers to step S2704 without dividing
  • step S2702 the information processing apparatus 400 divides the character code of the target character into an upper divided character code and a lower divided character code (step S2703). Then, control goes to a step S2704.
  • step S2704 the information processing apparatus 400 adds 1 to the upper divided character code appearance frequency tabulation table, the number of appearances of the same divided character code as the upper divided character code obtained in step S2703 (step S2704).
  • FIG. 28 is an explanatory diagram showing an upper divided character code appearance frequency tabulation table.
  • the upper divided character code appearance frequency totaling table 2800 is stored in a storage device such as the RAM 203 or the magnetic disk 205, and increases the number of appearances by one each time the corresponding upper divided character code appears.
  • the information processing apparatus 400 adds 1 to the lower divided character code appearance frequency tabulation table, the number of appearances of the same divided character code as the lower divided character code obtained in step S2703 (step S2705).
  • FIG. 29 is an explanatory diagram showing a lower divided character code appearance frequency tabulation table.
  • the lower divided character code appearance frequency totaling table 2900 is stored in a storage device such as the RAM 203 and the magnetic disk 205, and increases the number of appearances by one each time the corresponding lower divided character code appears.
  • the information processing apparatus 400 executes a bi-gram character string specifying process (step S2706).
  • a bi-gram character string specifying process step S2706
  • a bi-gram character string having the target character as a base point is specified. Details of the bi-gram character string specifying process (step S2706) will be described with reference to FIG.
  • the information processing apparatus 400 adds 1 to the number of appearances of the bi-gram character string specified in the bi-gram character string identification process (step S2706) to the bi-gram character string appearance frequency tabulation table (step S2707).
  • FIG. 30 is a flowchart showing a detailed processing procedure of the bi-gram character string specifying process (step S2706) shown in FIG.
  • the information processing apparatus 400 determines whether the target character is divided with respect to the target character (step S3001). That is, the information processing apparatus 400 determines whether the target character is a divided character code. If it is not divided (step S3001: No), that is, if it is a single character, the information processing apparatus 400 determines whether there is a previous character (step S3002).
  • step S3003 the information processing apparatus 400 determines whether the previous character is divided. That is, the information processing apparatus 400 determines whether the previous character is a divided character code.
  • step S3003: No the character is not divided
  • step S3004 the information processing apparatus 400 converts a character string composed of the single character immediately preceding the target character and the target character (single character) into a bi-gram character.
  • the column is determined (step S3004). Then, control goes to a step S2707.
  • step S3003 if the previous character is divided in step S3003 (step S3003: Yes), that is, if it is a divided character code, the divided character code that is the previous character is the lower divided character code. Become. Therefore, the information processing apparatus 400 determines a character string made up of the lower divided character code, which is the previous character, and the target character as a bi-gram character string (step S3005). Then, control goes to a step S2707.
  • step S3002 when there is no previous character (step S3002: No), only the target character is obtained, and the process proceeds to step S2707 without determining the bi-gram character string.
  • step S3001 If the target character is divided in step S3001 (step S3001: Yes), that is, if it is a divided character code, the information processing apparatus 400 determines whether the divided character code is an upper divided character code or a lower divided character code. It is determined whether or not there is (step S3006).
  • step S3006 If it is a high-order divided character code (step S3006: high-order), the information processing apparatus 400 determines whether or not the previous character has been divided (step S3007). That is, it is determined whether or not the previous character is a divided character code. If the character is not divided (step S3007: No), that is, if it is a single character, the information processing apparatus 400 obtains a character string composed of a single character preceding the target character and a higher-order divided character code divided from the target character. A bi-gram character string is determined (step S3008). Then, control goes to a step S2707.
  • step S3007 if the previous character is divided in step S3007 (step S3007: Yes), that is, if it is a divided character code, the divided character code that is the previous character is the lower divided character code. Become. Therefore, the information processing apparatus 400 determines a character string including the lower divided character code which is the previous character and the upper divided character code divided from the target character as a bi-gram character string (step S3009). Then, control goes to a step S2707.
  • step S3006 if the character code is a lower divided character code (step S3006: lower), the information processing apparatus 400 converts a character string composed of the upper divided character code and the lower divided character code divided from the target character into a bi-gram character. The column is determined (step S3010). Then, control goes to a step S2707.
  • this bi-gram character string specifying process (step S2706), it is possible to specify a bi-gram character string even when the target character is divided. Further, since the bi-gram character string is specified according to the 1-character shift, it can be generated simultaneously with the compression code map M of the basic word and the compression code map M of the specific single character.
  • the number of basic words and the number of single characters to be created are limited by the target appearance rates Pw and Pc.
  • Map size optimization can be realized at the same time.
  • a plurality of types of map creation can be executed concurrently by shifting one character, and the efficiency of the creation of a plurality of types of maps used for high-precision search can be improved.
  • FIG. 31 is an explanatory diagram showing a 2-gram character string appearance frequency tabulation table.
  • the bi-gram character string appearance frequency totaling table 3100 is stored in a storage device such as the RAM 203 or the magnetic disk 205, and increases the number of appearances by one each time the corresponding bi-gram character string appears.
  • step S2708 determines whether or not a subsequent character of the target character exists in the target file Fi (step S2708). If there is a subsequent character (step S2708: Yes), the subsequent character is set as the target character. Set (step S2709), the process returns to step S2702. On the other hand, when there is no subsequent character (step S2708: No), the recounting process (step S2603) of the target file Fi is terminated, and the process proceeds to step S2604.
  • the upper divided character code, the lower divided character code, and the number of appearances of the bi-gram character string existing in the target file Fi can be totaled.
  • FIG. 32 is a flowchart showing a detailed processing procedure example of the Huffman tree generation processing (step S1804) shown in FIG.
  • the information processing apparatus 400 determines the upper limit length N of the compression code length (step S3201).
  • the information processing apparatus 400 executes correction processing (step S3202).
  • the correction process is a process of correcting the occurrence probability and the compression code length for each character information using the upper limit length N of the compression code length, as described with reference to FIGS.
  • step S3203 the information processing apparatus 400 generates a leaf structure for each character information. Then, the information processing apparatus 400 executes branch number specifying processing (step S3206). In the branch number specifying process (step S3204), the number of branches per leaf is specified for each compression code length. Details of the branch number specifying process (step S3204) will be described with reference to FIG.
  • step S3205 Since the number of branches for each leaf structure is specified by the branch number specifying process (step S3204), first, the information processing apparatus 400 generates a pointer group for the number of branches for each leaf structure. . Then, a group of pointers to leaves for each generated leaf structure is aggregated to form a root structure. As a result, a 2 N -branch nodeless Huffman tree H is generated. The generated 2 N- branch nodeless Huffman tree H is stored in a storage device (such as the RAM 203 or the magnetic disk 205) in the information processing apparatus 400. Thereafter, the process proceeds to the map creation process (step S1805) in FIG.
  • FIG. 33 is a flowchart showing a detailed processing procedure example of the branch number specifying process (step S3204) shown in FIG.
  • the information processing apparatus 400 calculates the total branch number B (L) of the compression code length CL (step S3305).
  • step S3306 the information processing apparatus 400 increments j, decrements the compression code length CL (step S3306), returns to step S3303, and determines whether j after the increment is j> D.
  • N 11
  • FIG. 34 is a flowchart showing a detailed processing procedure of the construction process (step S3205) shown in FIG.
  • the information processing apparatus 400 determines whether there is an unselected leaf with the compression code length CL (step S3402). If there is an unselected leaf (step S3402: YES), the information processing apparatus 400 executes a leaf pointer generation process (step S3403) and returns to step S3402.
  • a leaf pointer group corresponding to the number of branches corresponding to the compression code length CL is generated for each leaf structure. Details of the leaf pointer generation processing (step S3403) will be described with reference to FIG.
  • step S3402 determines whether CL> N is satisfied (step S3404). If CL> N is not satisfied (step S3404: NO), the information processing apparatus 400 increments CL (step S3405) and returns to step S3402. On the other hand, if CL> N (step S3404: YES), the 2 N- branch nodeless Huffman tree H is constructed, and the process proceeds to step S1805. Information in the first area to the fifth area is stored in this construction process (step S3205).
  • FIG. 35 is a flowchart showing a detailed processing procedure of the leaf pointer generation processing (step S3403) shown in FIG.
  • the information processing apparatus 400 sets the bit length of the subsequent bit string of the pointer PL (k) to the selected leaf as a difference obtained by subtracting the compression code length CL of the selected leaf from the maximum compression code length N, and the initial value of the subsequent bit string Is set to all 0 (step S3504).
  • the information processing apparatus 400 stores the pointer PL (k) to the selected leaf in the root structure (step S3505). Thereafter, the information processing apparatus 400 determines whether k> b (CL) is satisfied (step S3506).
  • b (CL) is the number of branches per leaf of the compression code length CL of the selected leaf. If k> b (CL) is not satisfied (step S3506: NO), since the pointers to the leaves are not generated for all branches assigned to the selected leaf, the information processing apparatus 400 increments k (step S3507). .
  • step S3508 the information processing apparatus 400 increments the current subsequent bit string and concatenates the subsequent bit string after the increment to the end of the preceding bit string, thereby newly generating a pointer PL (k) to the selected leaf (step). S3508).
  • the information processing apparatus 400 stores the pointer PL (k) to the selected leaf in the root structure (step S3509), and returns to step S3506.
  • step S3506 a group of pointers to leaves is generated for the number of branches per leaf.
  • step S3506 if k> b (CL) is satisfied (step S3506: Yes), the process proceeds to step S3402.
  • the maximum branch number 2 N of 2 N branch-free node Huffman tree H can be set to the optimum number, 2 N min
  • the size of the branchless node Huffman tree H can be optimized.
  • the 2 N branchless nodeless Huffman tree with good compression efficiency H can be generated.
  • the information processing apparatus 400 converts each leaf structure of the 2 N- branch nodeless Huffman tree H, a basic word structure, a specific character code structure, and a divided character code structure into FIG.
  • the leaf structure stores a specific character corresponding to the compression code stored in the leaf, a divided character code, a pointer to the leaf, and a pointer to the basic word.
  • the information processing apparatus 400 stores a pointer to a leaf storing a corresponding compression code for each basic word of the basic word structure.
  • the information processing apparatus 400 stores a pointer to a leaf storing a corresponding compression code for each specific character of the specific character code structure.
  • the information processing apparatus 400 stores a pointer to a leaf storing a corresponding compression code for each divided character code of the divided character code structure.
  • FIG. 36 is a flowchart showing a detailed processing procedure example of the map creation processing (step S1805) shown in FIG.
  • the information processing apparatus 400 executes map creation processing for the target file Fi (step S3603). Details of the map creation processing (step S3603) of the target file Fi will be described with reference to FIG. Thereafter, the information processing apparatus 400 determines whether or not the file number i is i> n (n is the total number of the target files F1 to Fn) (step S3604).
  • step S3604 If i> n is not satisfied (step S3604: NO), the information processing apparatus 400 increments i (step S3605) and returns to step S3602. On the other hand, if i> n is satisfied (step S3604: YES), the map creation process (step S1805) ends. According to this map creation process (step S1805), the map creation process (step S3603) of the target file Fi can be executed for each target file Fi.
  • FIG. 37 is a flowchart showing a detailed processing procedure of the map creation processing (step S3603) of the target file Fi shown in FIG.
  • the information processing apparatus 400 sets the target character as the first character of the target file Fi (step S3701), basic word appearance map creation processing (step S3702), specific single character appearance map creation processing (step S3703), and a two-gram character string.
  • An appearance map creation process (step S3704) is executed.
  • step S3702 Details of the basic word appearance map creation process (step S3702) will be described with reference to FIG. Details of the specific single character appearance map creation process (step S3703) will be described with reference to FIG. Details of the bi-gram character string appearance map creation process (step S3704) will be described with reference to FIG.
  • the information processing apparatus 400 determines whether the target character is the last character of the target file Fi (step S3705). If the target character is not the end character of the target file Fi (step S3705: No), the information processing apparatus 400 shifts the target character by one character toward the end (step S3706), and returns to step S3702. On the other hand, when the target character is the last character of the target file Fi (step S3705: Yes), the process proceeds to step S3604, and the map creation process of the target file Fi (step S3603) is ended.
  • the basic word appearance map, the specific single character appearance map, and the bi-gram character string appearance map are generated in parallel while shifting the target character one character at a time. be able to.
  • FIG. 38 is a flowchart showing a detailed processing procedure example of the basic word appearance map creation processing (step S3702) shown in FIG.
  • the information processing apparatus 400 executes the longest match search process for the target character (step S3801).
  • the detailed processing procedure of the longest match search process (step S3801) is the same as the longest match search process (step S2201) shown in FIG.
  • the information processing apparatus 400 determines whether there is a longest matching basic word, that is, a basic word (step S3802). If there is no longest matching basic word (step S3802: No), the process proceeds to a specific single character appearance map creation process (step S3703). On the other hand, when there is a longest matching basic word (step S3802: Yes), the information processing apparatus 400 determines whether a basic word appearance map has been set for the longest matching basic word (step S3803). .
  • step S3803: YES If already set (step S3803: YES), the process proceeds to step S3806. On the other hand, if it has not been set (step S3803: No), the information processing apparatus 400 accesses the leaf of the longest matching basic word in the 2 N- branch nodeless Huffman tree H and acquires its compression code (step S3804). ). Then, the information processing apparatus 400 sets the acquired compression code as a pointer to a basic word appearance map for the longest matching basic word (step S3805), and proceeds to step S3806. Thereafter, in step S3806, the information processing apparatus 400 turns on the bit of the target file Fi of the basic word appearance map for the longest matching basic word (step S3806).
  • step S3702 the basic word appearance map creation process (step S3702) is terminated, and the process proceeds to the specific single character appearance map creation process (step S3703).
  • this basic word appearance map creation processing step S3702
  • a map can be created as the basic word with the longest matching basic word for each target character.
  • FIG. 39 is a flowchart showing a detailed processing procedure example of the specific single character appearance map creation processing (step S3703) shown in FIG.
  • the information processing apparatus 400 performs a binary search for the target character with respect to the structure of the specific single character (step S3901), and determines whether or not they match (step S3902). If there is no matching single character (step S3902: No), the information processing apparatus 400 executes a divided character code appearance map creation process (step S3903) and proceeds to a bi-gram character string appearance map creation process (step S3704). Transition. Details of the divided character code appearance map creation processing (step S3903) will be described with reference to FIG.
  • step S3902 when there is a single character that matches the target character in the binary search in step S3902 (step S3902: Yes), the information processing apparatus 400 performs the binary search in the 2 N- branch nodeless Huffman tree H. A single character leaf is accessed to obtain the compression code (step S3904). Then, the information processing apparatus 400 determines whether or not a specific single character appearance map has been set for the acquired compressed code (step S3905). If already set (step S3905: YES), the process proceeds to step S3907.
  • step S3905 the information processing apparatus 400 sets the acquired compression code as a pointer to the specific single character appearance map for the single character searched for in two (step S3906). Then, the process proceeds to step S3907. Thereafter, in step S3907, the bit of the target file Fi of the specific single character appearance map for the single character searched for in two is turned ON (step S3907).
  • step S3703 This completes the specific single character appearance map creation process (step S3703) and proceeds to the bi-gram character string appearance map creation process (step S3704).
  • this specific single character appearance map creation process it is possible to create a map as the specific single character for the target character searched in a binary manner.
  • FIG. 40 is a flowchart showing a detailed processing procedure example of the divided character code appearance map creation processing (step S4003) shown in FIG.
  • the information processing apparatus 400 divides the target character (step S4001), accesses the upper divided character code leaf in the 2 N- branch nodeless Huffman tree H, and obtains a compression code (step S4002). Then, the information processing apparatus 400 determines whether or not an upper divided character code appearance map has been set for the acquired compressed code (step S4003).
  • step S4003 If it has been set (step S4003: Yes), the process proceeds to step S4005. On the other hand, if it has not been set (step S4003: No), the information processing apparatus 400 sets the acquired compression code as a pointer to the appearance map of the upper divided character code (step S4004), and proceeds to step S4005. Thereafter, in step S4005, the information processing apparatus 400 turns on the bit of the target file Fi in the appearance map of the upper divided character code divided from the target character (step S4005).
  • the information processing apparatus 400 accesses the leaf of the lower-order divided character code in the 2 N- branch nodeless Huffman tree H and acquires a compression code (step S4006). Then, the information processing apparatus 400 determines whether or not the appearance map of the lower divided character code has been set for the acquired compressed code (step S4007). When it has been set (step S4007: Yes), the process proceeds to step S4009.
  • step S4007 the information processing apparatus 400 sets the acquired compression code as a pointer to the appearance map of the lower divided character code (step S4008), and proceeds to step S4009. Thereafter, in step S4009, the information processing apparatus 400 turns on the bit of the target file Fi of the appearance map of the lower divided character code divided from the target character (step S4009).
  • step S4003 the divided character code appearance map creation process (step S4003) is terminated, and the process proceeds to the bi-gram character string appearance map creation process (step S3704).
  • this divided character code appearance map creation process (step S4003) a single character lower than the rank corresponding to the target appearance rate Pc has a low appearance frequency, and therefore many OFF bits appear.
  • map sizes of the compression symbol map M of the specific single character are not performed for the single character lower than the rank corresponding to the target appearance rate Pc, from the generation target of the appearance map of the specific single character. Can do. Further, by dividing, for single characters lower than the rank corresponding to the target appearance rate Pc, map sizes such as the compression code map M of the upper divided character code and the compression code map M of the lower divided character code are fixed. Set to the map. Therefore, regardless of the appearance rate set as the target appearance rate Pc, an increase in the map size can be prevented and memory saving can be achieved.
  • FIG. 41 is a flowchart showing a detailed processing procedure example of the bi-gram character string map creation processing (step S3704) shown in FIG.
  • the information processing apparatus 400 executes bigram character string specifying processing (step S4101).
  • the detailed processing procedure of the bi-gram character string specifying process (step S4101) is the same as the bi-gram character string specifying process (step S2706) shown in FIG.
  • the information processing apparatus 400 determines whether or not the bi-gram character string has been identified by the bi-gram character string identification process (step S4101) (step S4102). When not specified (step S4102: No), it transfers to step S3705 of FIG.
  • step S4102 if it is specified (step S4102: Yes), the information processing apparatus 400 executes a bi-gram character string appearance map generation process (step S4103), and proceeds to step S3705.
  • FIG. 42 is a flowchart illustrating a detailed processing procedure example of the bi-gram character string appearance map generation process (step S4103).
  • the information processing apparatus 400 determines 2 N for the first gram (specific single character or divided character code) of the bi-gram character string specified by the bi-gram character string specifying process (step S4101) of FIG.
  • the leaves of the branchless nodeless Huffman tree H are accessed to obtain a compression code (step S4201).
  • the information processing apparatus 400 accesses the leaves of the 2 N -branch nodeless Huffman tree H for the second gram (specific single character or divided character code) and acquires a compression code (step S4202).
  • step S4203 the information processing apparatus 400 concatenates the compression code of the first gram and the compression code of the second gram. Then, the information processing apparatus 400 determines whether or not an appearance map with the linked compression code as a pointer has been set (step S4204). If already set (step S4204: YES), the process proceeds to step S4206.
  • step S4204 the information processing apparatus 400 sets the concatenated compression code as a pointer to the identified bigram character string appearance map (step S4205). Thereafter, in step S4206, the information processing apparatus 400 turns on the bit of the target file Fi of the identified bi-gram character string appearance map (step S4206).
  • step S4103 This completes the bi-gram character string appearance map generation process (step S4103), and proceeds to step S3705.
  • the appearance map of the bi-gram character string can be directly designated by the concatenated compression code of the bi-gram character string.
  • FIG. 43 is an explanatory diagram of a specific example of compression processing using the 2 N- branch nodeless Huffman tree H.
  • the information processing apparatus 400 acquires the compression target character code of the first character from the target file group Fs and holds the position on the target file Fi.
  • the information processing apparatus 400 performs a binary tree search on the basic word structure 1600. Since the basic word is a character code string of two or more characters, when the compression target character code of the first character is hit, the second character code is acquired as the compression target character code.
  • the character code of the second character is searched from the position where the compression target character code of the first character is hit. Even after the third character, the binary tree search is repeated until a mismatched character code to be compressed appears.
  • a matching basic word ra (a is a leaf number) is searched, the structure of the leaf La is accessed by a pointer to the leaf La associated with the basic word structure 1600. Then, the information processing apparatus 400 searches for the compression code of the basic word ra stored in the structure of the access destination leaf La and stores it in the compression buffer 4300.
  • the information processing apparatus 400 sets the compression target character code of the first character in the register again, and performs a binary tree search for the structure 1400 of the specific single character.
  • the information processing apparatus 400 accesses the structure of the leaf Lb by using a pointer to the leaf Lb. Then, the information processing apparatus 400 searches for the compression code of the character code eb stored in the structure of the access destination leaf Lb and stores it in the compression buffer 4300.
  • the information processing apparatus 400 divides the upper 8 bits and the lower 8 bits. Then, the information processing apparatus 400 performs a binary tree search for the divided character code structure 1500 with respect to the upper 8-bit divided character code.
  • a matching divided character code Dc1 (c1 is a leaf number) is searched, the information processing apparatus 400 accesses the structure of the leaf Lc1 using a pointer to the leaf Lc1. Then, the information processing apparatus 400 searches for the compression code of the divided character code Dc1 stored in the structure of the access destination leaf Lc1, and stores it in the compression buffer 4300.
  • the information processing apparatus 400 performs a binary tree search for the divided character code structure with respect to the divided 8-bit divided character code.
  • a matching divided character code Dc2 (c2 is a leaf number) is searched
  • the information processing apparatus 400 accesses the structure of the leaf Lc2 using a pointer to the leaf Lc2.
  • the information processing apparatus 400 searches for the compression code of the divided character code Dc2 stored in the structure of the access destination leaf Lc2, and stores it in the compression buffer 4300. As a result, the target file Fi is compressed.
  • FIG. 44 is a flowchart illustrating an example of a compression processing procedure of the target file group Fs using the 2 N- branch nodeless Huffman tree H by the first compression unit 403.
  • the information processing apparatus 400 executes a compression process (step S4403) and increments the file number: p (step S4404). Details of the compression processing (step S4403) will be described with reference to FIG.
  • the information processing apparatus 400 determines whether p> n is satisfied (step S4405). n is the total number of the target file group Fs. If p> n is not satisfied (step S4405: NO), the process returns to step S4402. On the other hand, if p> n (step S4405: Yes), the compression processing of the target file group Fs is terminated.
  • FIG. 45 is a flowchart (part 1) showing the detailed processing procedure of the compression processing (step S4403) shown in FIG.
  • the information processing apparatus 400 first determines whether or not there is a compression target character code in the target file group Fs (step S4501). If there is (step S4501: Yes), the information processing apparatus 400 acquires the compression target character code and sets it in the register (step S4502). Then, the information processing apparatus 400 determines whether or not it is the first compression target character code (step S4503).
  • the first character code to be compressed is the character code of the uncompressed first character.
  • the information processing apparatus 400 acquires a pointer that is the position (head position) of the compression target character code on the target file group Fs (step S4504), and proceeds to step S4505. .
  • the process proceeds to step S4505 without acquiring the head position.
  • step S4505 the information processing apparatus 400 performs a binary tree search for the basic word structure 1600 (step S4505). If the compression target character codes match (step S4506: Yes), the information processing apparatus 400 determines whether or not the continuously matched character code strings correspond to the basic word (character code string) (step S4507). ). If not applicable (step S4507: NO), the information processing apparatus 400 returns to step S4502 and acquires the subsequent character code as the compression target character code. In this case, since the subsequent character code is not the head, the head position is not acquired.
  • step S4507 If it corresponds to the basic word in step S4507 (step S4507: Yes), the information processing apparatus 400 accesses the structure of the leaf L # by using a pointer to the leaf L # of the corresponding basic word (step S4508). . The information processing apparatus 400 extracts the compression code of the basic word stored in the structure of the pointed leaf L # (step S4509).
  • step S4510 stores the extracted compressed code in the compression buffer 4300 (step S4510) and returns to step S4501.
  • This loop is the flow of the basic word compression process. If there is no compression target character code in step S4501 (step S4501: No), the information processing apparatus 400 outputs the compressed file fp compressed from the target file Fp from the compression buffer 4300 and stores it (step S4511). Then, the process proceeds to step S4404. On the other hand, if no match is found in step S4506 (step S4506: No), a 16-bit character code compression processing loop is entered.
  • FIG. 46 is a flowchart (part 2) showing a detailed processing procedure of the compression processing (step S4403) shown in FIG.
  • the information processing apparatus 400 refers to the pointer at the head position acquired in step S4604, acquires the compression target character code from the target file group Fs, and sets it in the register (step S4601).
  • the information processing apparatus 400 performs a binary tree search for the specific single character structure 1400 for the compression target character code (step S4602). If they match (step S4603: YES), the information processing apparatus 400 accesses the structure of the leaf L # with a pointer to the leaf L # of the corresponding character (step S4604). The information processing apparatus 400 extracts the compression code of the compression target character code stored in the structure of the pointed leaf L # (step S4605).
  • step S4606 the information processing apparatus 400 stores the searched compression code in the compression buffer 4300 (step S4606) and returns to step S4501.
  • This loop is a flow of compression processing of a 16-bit character code.
  • step S4603 NO
  • the process enters a loop for dividing character code compression.
  • step S4403 is a flowchart (part 3) showing a detailed processing procedure of the compression processing (step S4403) shown in FIG.
  • the information processing apparatus 400 divides the compression target character code into upper 8 bits and lower 8 bits (step S4701), and extracts the upper 8 bits of the divided character code (step S4702).
  • the information processing apparatus 400 performs a binary tree search on the divided character code structure 1500 (step S4703).
  • the information processing apparatus 400 accesses the structure of the leaf L # by using the pointer to the leaf L # of the searched divided character code (step S4704). Then, the information processing apparatus 400 extracts the compression code of the divided character code stored in the pointed leaf L # structure (step S4705). Thereafter, the information processing apparatus 400 stores the searched compression code in the compression buffer 4300 (step S4706).
  • step S4707 determines whether or not the low-order 8 bits have been searched. If the low-order 8 bits have not been searched (step S4707: No), the information processing apparatus 400 displays the low-order 8 bits of divided character code. Are extracted (step S4708), and steps S4703 to S4706 are executed. On the other hand, if the lower 8 bits have already been searched (step S4707: YES), the process returns to step S4601 to enter the basic word compression processing loop.
  • the structure of the leaf L # in which the compression target character code is stored can be immediately specified by the basic word structure, the specific single character code structure, and the divided character code structure. Therefore, it is not necessary to search for the leaves of the 2 N- branch nodeless Huffman tree H, and the compression process can be speeded up. Further, by dividing the low-order character code into the upper bit code and the lower bit code, the non-specific single character can be compressed into 256 types of divided character code compression codes. Therefore, the compression rate can be improved.
  • the second compression unit 406 compresses the appearance map in the compression area, and does not compress the appearance map in the non-compression area.
  • the compression area is a bit string of an appearance map up to a file number of ⁇ ⁇ (n / ⁇ quotient) when file numbers 1 to n are numbered.
  • the bit strings from file numbers (2 ⁇ + 1) to n are uncompressed areas and are not compressed.
  • the number of consecutive “0” s in the bit string increases as the file total number ⁇ increases.
  • an appearance rate area is set.
  • the appearance rate area is a range of appearance rates.
  • the Huffman tree h for appearance map compression is assigned according to the appearance rate area.
  • FIG. 48 is an explanatory diagram showing the relationship between the appearance rate and the appearance rate area. If the appearance rate is in the range of 0 to 100%, as shown in FIG. 48, the area can be divided into areas A to E and A ′ to E ′. Accordingly, the Huffman tree h for appearance map compression is assigned as a compression pattern in accordance with the appearance rate area specified in the areas A to E and A ′ to E ′.
  • FIG. 49 is an explanatory diagram showing a compression pattern table having compression patterns for each appearance rate area. Since the appearance rate is stored in the fifth area of the structure of the leaf L #, as shown in FIG. 13, the structure of the leaf L # is designated, so that the compression pattern table 4900 is referred to. The compression pattern is specified. Note that the A region and the A ′ region are not compressed, so there is no Huffman tree that becomes a compression pattern.
  • FIG. 50 is an explanatory diagram showing compression patterns in the case of the B region and the B ′ region.
  • the compression pattern 5000 is a Huffman tree h having 16 types of leaves.
  • FIG. 51 is an explanatory diagram showing a compression pattern in the case of the C region and the C ′ region.
  • the compression pattern 5100 is a Huffman tree h of 16 types + 1 types of leaves.
  • the code word “00” is assigned to a bit string whose value is “0” continuously for 16 bits.
  • FIG. 52 is an explanatory diagram showing compression patterns in the case of the D region and the D ′ region.
  • the compression pattern 5200 is a Huffman tree with 16 types and 1 type of leaves.
  • the code word “00” is assigned to a bit string whose value is “0” continuously for 32 bits.
  • FIG. 53 is an explanatory diagram showing a compression pattern in the case of the E region and the E ′ region.
  • the compression pattern 5300 is a Huffman tree with 16 types and 1 type of leaves.
  • the code word “00” is assigned to a bit string whose value is “0” for 64 consecutive bits.
  • the number of consecutive “0” s indicating that there is no character code increases in accordance with the appearance rate area, so that the compression efficiency of the compression symbol map M is improved according to the appearance rate of the character code. be able to.
  • compression symbol map compression processing is a process for compressing a bit string in a compression area. Specifically, the bit string in the compression area of the compression code map M is compressed using the compression pattern table 4900 shown in FIG. 49 and the compression patterns 5000 to 5300 (Huffman tree h) shown in FIGS. Hereinafter, the compression symbol map compression processing procedure will be described.
  • FIG. 54 is a flowchart showing a compression code map M compression processing procedure. 54, first, the information processing apparatus 400 determines whether or not there is a pointer to an unselected appearance map in the compression symbol map M group Ms (step S5401). If there is an unselected address (step S5401: YES), the information processing apparatus 400 selects the unselected address and accesses the structure of the leaf L # (step S5402), A character code is acquired from one area (step S5403). Then, the information processing apparatus 400 acquires the appearance rate area from the fifth area of the structure of the access destination leaf L #, thereby specifying the appearance rate area of the acquired character code (step S5404).
  • the information processing apparatus 400 refers to the compression pattern table of FIG. 52 to determine whether or not the identified appearance rate region is a non-compressed region (for example, the appearance rate regions A and A ′) ( Step S5405). If it is an uncompressed area (step S5405: YES), the process returns to step S5401, and the next address is selected.
  • a non-compressed region for example, the appearance rate regions A and A ′
  • step S5405 if it is not an uncompressed area (step S5405: No), the information processing apparatus 400 corresponds to one of the compressed patterns 5000 to 5300 (Huffman tree h) shown in FIGS. 50 to 53 depending on the specified appearance rate area.
  • a compression pattern (Huffman tree h) to be selected is selected (step S5406). Further, the information processing apparatus 400 extracts a bit string of the compression area in the appearance map of the acquired character code to be compressed (step S5407).
  • the information processing apparatus 400 determines whether the appearance rate of the acquired character code is 50% or more (step S5408).
  • the appearance rate is a value in which the total number of files in the target file group Fs is a population (denominator) and the number of files in which the character information exists is a numerator. Since the appearance rate area is determined according to the appearance rate (see FIG. 48), when the appearance rate area is A to E, it is determined that the appearance rate of the acquired character code is not 50% or more. On the other hand, when the appearance rate area is A ′ to E ′, the information processing apparatus 400 determines that the appearance rate of the acquired character code is 50% or more.
  • step S5408 If the appearance rate is 50% or more (step S5408: Yes), the information processing apparatus 400 inverts the bit string extracted in step S5407 in order to increase the compression efficiency (step S5409). For example, when the extracted bit string is “1110”, it is set to “0001” and the number of “0” is increased. Then, the information processing apparatus 400 compresses the inverted bit string using the Huffman tree selected in step S5406 and stores the compressed bit string in a storage device (for example, flash memory or magnetic disk 205) (step S5410). Then, the process returns to step S5401. In this way, by performing bit string inversion, it is not necessary to prepare the Huffman tree h for the appearance rate areas A ′ to E ′, so that memory saving can be achieved.
  • a storage device for example, flash memory or magnetic disk 205
  • step S5408 when the appearance rate is not 50% or more in step S5408 (step S5408: No), the information processing apparatus 400 performs the bit string extracted in step S5407 without performing the bit string inversion (step S5409) in step S5406. Compression is performed using the selected Huffman tree (step S5410), and the process returns to step S5401. In step S5401, if there is no unselected address (step S5401: NO), the compression symbol map compression process is terminated.
  • the bit string in the compression area is compressed according to the appearance rate for each character information.
  • the compression efficiency of the compression code map M is improved according to the appearance rate of character information. be able to.
  • the target file is added later, when compressing the added target file, it is necessary to add a bit string indicating whether or not there is a character to the compression code map M.
  • the bit strings of the appearance maps of the file numbers 1 to n are compressed by the compression patterns 5000 to 5300, and the code lengths differ for each record. That is, since it has a variable length, it becomes a compression region.
  • the beginning (file number n side) of the compression code string is aligned, but the end (file number 1 side) is not aligned.
  • a sequence of bit strings is assigned in the order of file numbers: 1 to n from the pointer (compression code of character information) side to the compression code map M
  • the bit string of the additional file is inserted at the end of the compression code string.
  • the compression code string and the bit string of the additional file are discontinuous. Therefore, the bit strings in the compression area of the compression code map M group Ms are arranged in descending order of the file number p of the target file group Fs from the head position to the tail position in advance.
  • an uncompressed area is set between the pointer to the appearance map (compressed code of character information) and the compressed area.
  • the file number: n + 1 is assigned to the file number; 1 to n, on the side where the compression code string is aligned.
  • the bit string can be continued in the order of the file number even if the uncompressed file number: n + 1 to 2n is inserted.
  • the target file can be narrowed down accurately.
  • FIG. 55 is a block diagram showing a functional configuration example 2 of the information processing apparatus 400 according to the present embodiment.
  • the information processing apparatus 400 includes a designation unit 5501, a first decompression unit 5502, a first compression unit 403, an input unit 5503, an extraction unit 5504, a second decompression unit 5505, and a specification unit 5506.
  • the specification unit 5501 to the update unit 5507 realize their functions by causing the CPU 201 to execute programs stored in a storage device such as the ROM 202, the RAM 203, and the magnetic disk 205 shown in FIG.
  • the designation unit 5501 to the update unit 5507 respectively write the execution results to the storage device and read the execution results of the other units, and execute the respective calculations.
  • the designation unit 5501 to update unit 5507 will be briefly described below.
  • the designation unit 5501 accepts an open designation of any target file in the target file group Fs. Specifically, when the user operates a keyboard, a mouse, and a touch panel, the designation unit 5501 accepts an open designation for the target file Fi. When the open designation is accepted, a pointer to the compressed file fi associated with the file number i of the target file Fi designated for opening is designated in the compression symbol map M. As a result, the compressed file fi of the target file Fi designated to be opened, which is stored at the point destination address, is read out.
  • the designation unit 5501 receives a save designation for the opened target file Fi. Specifically, when the user operates a keyboard, a mouse, and a touch panel, the designation unit 5501 receives a designation for saving the target file Fi. When the saving designation is accepted, the saving designated target file Fi is compressed by the first compression unit 403 with the 2 N branching no-node Huffman tree H and saved as a compressed file fi in the storage device.
  • the first decompressing unit 5502 decompresses the compressed file fi of the target file Fi with the 2 N- branch nodeless Huffman tree H. Specifically, for example, the first decompressing unit 5502 decompresses the compressed file fi of the target file Fi that is specified to be opened by the designating unit 5501 with the 2 N- branch nodeless Huffman tree H. Further, the target file Fi specified by the specifying unit 5506, which will be described later, is also expanded by the 2 N- branch nodeless H. A specific example of expansion will be described later.
  • the input unit 5503 accepts input of a search character string. Specifically, when the user operates a keyboard, a mouse, and a touch panel, the input unit 5503 receives an input of a search character string.
  • the extraction unit 5504 extracts the compression code of the character information in the search character string input by the input unit 5503 from the 2 N branching no-node Huffman tree H. Specifically, for example, the extraction unit 5504 extracts corresponding character information from among the specific single character, the upper divided character code, the lower divided character code, the bi-gram character string, and the basic word from the search character string.
  • the extracting unit 5504 identifies the compression code of the extracted character information by the 2 N branching no-node Huffman tree H, and extracts the corresponding appearance map of the compression code map M. For example, a compressed appearance map of a specific single character “person”, a compressed appearance map of “shape”, and a compressed appearance map of a bi-gram character string “doll” are extracted.
  • the second decompression unit 5505 decompresses the compressed appearance map extracted by the extraction unit 5504. Specifically, since the appearance rate region can be specified from the appearance rate of the character information, the second decompressing unit 5505 uses the map Huffman tree corresponding to the specified appearance rate region to compress the compressed appearance map. Elongate. For example, in the above example, as shown in FIG. 1B, the compressed appearance map of the specific single character “person”, the compressed appearance map of “shape”, and the two-gram character string “doll” And the compressed appearance map of are decompressed.
  • the identifying unit 5506 identifies the compressed file of the target file including the character information in the search character string from the compressed file group by performing an AND operation on the appearance map group and the deletion map D after decompression by the second decompressing unit 5505. To do.
  • the specifying unit 5506 includes the compressed appearance map of the specific single character “person”, the compressed appearance map of “shape”, and the bi-gram character string. An AND operation is performed on the compressed appearance map of “doll” and the deletion map D.
  • the processing up to the specifying unit 5506 is processing in the extraction device in the information processing device 400.
  • the first decompressing unit 5502 decompresses the compressed file identified by the identifying unit 5506 (the compressed file f3 in the above example) with the 2 N branching no-node Huffman tree H.
  • the update unit 5507 assigns a new file number and sets a bit for the new file number for the compression code map M and the deletion map D when the open target file is updated and saved. It is “0” (OFF) in the compression code map M, and “1” (ON) in the deletion map D.
  • the character information in the target file to be updated is aggregated by the aggregation unit 401, and for the character information that appears even once, the newly assigned file number bit is turned ON. Further, the bit of the file number when opened in the deletion map D is turned OFF.
  • the update unit 5507 associates the address of the updated compressed file as a pointer. As a result, when a newly assigned file number is designated after the update, the designation unit 5501 designates the updated compressed file. Details of the update unit 5507 will be described later.
  • FIG. 56 is an explanatory diagram showing a file decompression example (G1).
  • the process shown in the file decompression example (G1) is executed by the designation unit 5501 and the first decompression unit 5502.
  • file number 3 is designated to be open.
  • reference numeral 5600 denotes a management area of the compression code map M.
  • a pointer that specifies the storage destination of the compressed file fi specified by the file number i is stored in association with the file number i. Therefore, when the file number i is designated, the compressed file fi can be pointed and read.
  • the designation unit 5501 designates opening of the target file F3.
  • the file number 3 of the compression code map M is associated with a pointer to the compression file f3 of the target file F3.
  • the compressed file f3 is extracted by the pointer.
  • the extracted compressed file f3 is expanded by the 2 N branching no-node Huffman tree H. Detailed decompression processing will be described later.
  • FIG. 57 is an explanatory diagram of a file decompression example (G2).
  • the processing shown in the file expansion example (G2) is executed by the input unit 5503, the extraction unit 5504, the second expansion unit 5505, the specifying unit 5506, and the first expansion unit 5502.
  • the search character string “doll” is input by the input unit 5503, the character “person” and “shape” constituting the search character string “doll” are divided into two parts with respect to the structure 1400 of the specific single character.
  • the specific single character structure 1400 is associated with a pointer to a leaf (specific single character) of the 2 N -branch nodeless Huffman tree H. Therefore, if a hit is made with a structure of a specific single character, the leaves of the 2 N -branch nodeless Huffman tree H can be directly specified.
  • the decompressed target file F3 is opened by collating and decompressing the extracted compressed file f3 in a compressed state.
  • the collation flag is ON for the “human” and “shaped” leaf structures, so when “human” and “shaped” are expanded, the character string is replaced and expanded.
  • “person” and “form” whose collation flag is ON are displayed in bold by expanding between ⁇ B> ⁇ / B> tags. Characters for which the collation flag is OFF are expanded as they are without being sandwiched by ⁇ B> ⁇ / B> tags.
  • a compression code string is set in a register, and a compression code is extracted using a mask pattern.
  • the extracted compression code is searched from the root of the 2 N -branch nodeless Huffman tree H in one pass (access for one branch). Then, the character code stored in the accessed structure of the leaf L # is read and stored in the decompression buffer.
  • the mask position of the mask pattern is offset.
  • the initial value of the mask pattern is “0xFFF00000”.
  • This mask pattern is a bit string in which the first 12 bits are “1” and the subsequent 20 bits are “0”.
  • FIGS. 56 and 57 are explanatory diagrams showing specific examples of the decompression process in FIGS. 56 and 57.
  • FIG. FIG. 58 shows an extension example (A) for a specific single character “person”.
  • the CPU calculates a bit address abi, a byte offset byos, and a bit offset bios.
  • the bit address abi is a value indicating the bit position of the extracted compression code
  • the current bit address abi is a value obtained by adding the compression code length leg of the previously extracted compression code to the previous bit address abi.
  • a block in the memory indicates a 1-byte bit string, and an internal number indicates a byte position that is a byte boundary.
  • the compression code string of 4 bytes (shaded in the figure) from the beginning of the compression code string held in the memory is set in the register.
  • the character code “0xBA4E” is stored in the structure of the leaf L97, the character code “0xBA4E” is extracted and stored in the decompression buffer.
  • the character code “0xBA4E” is set to the ⁇ B> ⁇ / B> tag. Put it in and store it.
  • the mask pattern is “0x3FFC0000”. Therefore, an AND result is obtained by performing an AND operation on the compression code string set in the register and the mask pattern “0x3FFC0000”.
  • the character code “0x625F” is stored in the structure of the leaf L105, the character code “0x625F” is extracted and stored in the decompression buffer.
  • the file decompression example (G1) it is stored in the decompression buffer as it is, but in the case of the file decompression example (G2), since the collation flag is ON, the character code “0x625F” is set to the ⁇ B> ⁇ / B> tag. Put it in and store it.
  • FIG. 60 is a flowchart showing a search processing procedure according to the present embodiment.
  • the information processing apparatus 400 waits for input of a search character string (step S6001: No).
  • a search character string is input (step S6001: Yes)
  • file narrowing processing step S6002
  • decompression processing step S6003 ).
  • the file narrowing process step S6002 narrows down the compressed file fi of the target file Fi in which character information constituting the search character string exists from the compressed file group fs. Details of the file narrowing process (step S6002) will be described with reference to FIGS. 61 and 62.
  • FIG. 60 Details of the file narrowing process
  • step S6003 collates the compression code string to be decompressed with the compressed character string of the search character string in the process of decompressing the compressed file fi narrowed down by the file narrowing process (step S6002). Details of the decompression process (step S6003) will be described with reference to FIGS.
  • FIG. 61 is a flowchart (part 1) showing a detailed processing procedure of the file narrowing process (step S6002) shown in FIG.
  • the information processing apparatus 400 sets a search character string as a target character string (step S6101) and executes a longest match search process (step S6102).
  • the longest match search process (step S6102) is the same process as the longest match search process (step S3801) shown in FIG.
  • the information processing apparatus 400 searches the longest match search result obtained in the longest match search process (step S6102) in the basic word structure in a binary manner (step S6103).
  • the longest match search result is searched for in the basic word structure (step S6103: Yes)
  • the basic word appearance map is acquired from the basic word appearance map group (step S6103). S6104).
  • step S6105 determines whether or not there is a subsequent character string. If there is a continuation (step S6105: Yes), the information processing apparatus 400 sets the subsequent character string as the target character string (step S6106), and returns to the longest match search process (step S6102). On the other hand, if there is no following (step S6105: No), the target file is narrowed down by AND operation of the appearance map groups acquired so far (step S6107). Thereby, the file narrowing process (step S6002) ends, and the process proceeds to the decompression process (step S6003).
  • step S6103 when the longest match search result is not searched for in the basic word structure (step S6103: No), the process proceeds to step S6201 in FIG. Specifically, if the longest match search result is not registered in the basic word structure, or if there is no longest match candidate in the longest match search (step S6103: No), the process proceeds to step S6201 in FIG. To do.
  • FIG. 62 is a flowchart (part 2) showing a detailed processing procedure of the file narrowing process (step S6002) shown in FIG.
  • FIG. 62 shows a process for acquiring an appearance map for each character constituting the target character string.
  • the information processing apparatus 400 sets the first character of the target character string as the target character (step S6201).
  • the information processing apparatus 400 searches the target character in two in the structure of the specific single character (step S6202).
  • the information processing apparatus 400 acquires the appearance map of the target character from the compression symbol map M of the specific single character (step S6204).
  • step S6203 determines whether search is made in step S6203 (step S6203: No). If no search is made in step S6203 (step S6203: No), the information processing apparatus 400 divides the target character into upper 8 bits and lower 8 bits (step S6205). Then, the information processing apparatus 400 obtains the appearance map of the upper divided character code obtained by the division in step S6205 from the compression code map M of the upper divided character code (step S6206).
  • the information processing apparatus 400 acquires the appearance map of the lower divided character code obtained by the division in step S6205 from the compression code map M of the lower divided character code (step S6207). Further, the information processing apparatus 400 accesses the leaves of the 2 N -branch nodeless Huffman tree H for the target character and the divided character code divided in step S6205, and turns on the collation flag (step S6208). Thereafter, the information processing apparatus 400 executes a bi-gram character string specifying process (step S6209).
  • the bi-gram character string specifying process (step S6209) is the same process as the bi-gram character string specifying process (step S2706) shown in FIG.
  • step S6209 If the bi-gram character string is not specified in the bi-gram character string specifying process (step S6209) (step S6210: No), the information processing apparatus 400 returns to step S6105 in FIG.
  • step S6210: Yes the information processing apparatus 400 acquires an appearance map of the bi-gram character string (step S6211). Specifically, for example, the information processing apparatus 400 acquires and concatenates the compression code of the first gram and the compression code of the second gram by accessing the 2 N branching no-node Huffman tree H, and obtains a 2-gram character string. The appearance map specified by the concatenated compression code is acquired from the compression code map M. Then, the process returns to step S6105 in FIG.
  • the appearance map group for the target character and the appearance map group for the bi-gram character string can be acquired by the processing procedure shown in FIG. Therefore, the compressed file fi can be narrowed down by the AND operation in step S6107 of FIG.
  • FIG. 63 is a flowchart (No. 1) showing a detailed processing procedure example of the decompression process (step S6003) using the 2 N- branch nodeless Huffman tree H shown in FIG.
  • the information processing apparatus 400 sets the compression code string from the position of the byte offset byos in the register r1 (step S6304).
  • the information processing apparatus 400 shifts the mask pattern set in the register r2 toward the end by the bit offset bios (step S6305), and performs an AND operation with the compression code string set in the register r1 (step S6305). Step S6306). Thereafter, the information processing apparatus 400 calculates the register shift number rs (step S6307), and shifts the register r2 after the AND operation to the end by the register shift number rs (step S6308).
  • FIG. 64 is a flowchart (part 2) of a detailed process procedure example of the decompression process (step S6003) using the 2 N- branch nodeless Huffman tree H depicted in FIG.
  • the information processing apparatus 400 extracts the last N bits from the shifted register r2 as a target bit string (step S6401).
  • the information processing apparatus 400 specifies a pointer from the root structure of the 2 N- branch nodeless Huffman tree H to the leaf L # (step S6402), and 1 is added to the structure of the leaf L # that is the point destination. Access is made with a path (step S6403).
  • information processing apparatus 400 determines whether or not the collation flag of the structure of access destination leaf L # is ON (step S6404).
  • step S6404 If the collation flag is ON (step S6404: YES), the information processing apparatus 400 writes the replacement character for the character information in the structure of the access destination leaf L # into the decompression buffer (step S6405), and proceeds to step S6407. To do. On the other hand, if the collation flag is OFF (step S6404: NO), the information processing apparatus 400 writes the character information (expanded character) in the structure of the access destination leaf L # into the expansion buffer (step S6406), and step S6407. Migrate to
  • step S6407 the information processing apparatus 400 extracts the compression code length leg from the structure of the access destination leaf L # (step S6407), and updates the bit address abi (step S6408). Thereafter, the information processing apparatus 400 determines whether or not there is a compression code string in the memory, specifically, whether or not there is a compression code string that has not been subjected to mask processing using a mask pattern (step S6409). . For example, the determination is made based on whether there is a byte position corresponding to the byte offset byos. If there is a compression code string (step S6409: YES), the process returns to step S6302 of FIG. On the other hand, if there is no compression code string (step S6409: No), the decompression process (step S6003) is terminated.
  • step S6003 collation and decompression can be performed in the compressed state, and the decompression speed can be increased.
  • FIG. 65 is an explanatory diagram showing a specific example of the update process.
  • the compressed file f3 is decompressed from the compressed file group fs by the file decompression example (G1) in FIG. 56 or the file decompression example (G2) in FIG. 57, and the target file F3 after decompression is stored in the main memory (for example, the RAM 203).
  • the main memory for example, the RAM 203.
  • the target file F (n + 1) is compressed with the 2 N branching no-node Huffman tree H to form a compressed file f (n + 1), which is stored in the storage device.
  • the compressed file f (n + 1) is overwritten and saved on the compressed file f3 in the storage device.
  • the presence / absence of character information can be detected by counting the character information of the target file F (n + 1) on the main memory by the counting unit 401. Therefore, the newly assigned bit of the file number n + 1 is added to the appearance map of each character information (default is OFF), and the bit where the character information appears is turned ON. Further, the bit of the file number n + 1 is added to the deletion map D (default is ON). Further, the bit of the file number 3 of the target file F3 that is the update source in the deletion map D is turned OFF.
  • the compressed file f (n + 1) is overwritten with respect to the compressed file f3.
  • the compressed file f (n + 1) may be stored separately without being overwritten.
  • a new pointer designating a free area is assigned to the file number n + 1 instead of a pointer to the compressed file f3.
  • the compressed file f3 remains, but the file number 3 is changed to OFF in the deletion map D, so that the search is not affected.
  • the compressed file f3 can be specified via the file number 3, so that the target file F3 can be obtained by decompression.
  • FIG. 66 is a flowchart showing the update processing procedure shown in FIG.
  • the information processing apparatus 400 waits for an update request to be accepted (step S6601: No). If the update request is accepted (step S6601: Yes), the information processing apparatus 400 determines that the target file for which the update request has been made. The file number i of Fi is specified (step S6602).
  • the information processing apparatus 400 turns off the bit of the specified file number i in the deletion map D (step S6603).
  • the target file Fi of the file number i of the specific destination is not searched, and the search accuracy can be improved.
  • the information processing apparatus 400 updates the file number i of the target file Fi (step S6604). That is, a file number obtained by adding 1 to the last file number at the present time is assigned and assigned to the target file. For example, as shown in FIG. 65, the file number n + 1 is assigned and given to the target file F3 on the main memory (RAM 203) to be the target file F (n + 1). In this way, a target file to which a newly assigned file number is assigned is referred to as an additional file.
  • the information processing apparatus 400 compresses the additional file F (n + 1) with the 2 N branching no-node Huffman tree H and stores it as a compressed file (step S6605).
  • the information processing apparatus 400 associates a pointer to the compressed file of the additional file F (n + 1) in the management area 5600 of the compression code map M in association with the file number (n + 1) of the additional file F (n + 1) (step S6606).
  • the information processing apparatus 400 determines whether or not the total file number (last file number) is a multiple of n (step S6607). If it is a multiple of n (step S6607: YES), since all the bits of the compression code map M become the compression region, each appearance map of the compression code map M is compressed (step S6608). As a result, the size of the compression code map M can be reduced.
  • step S6607 No
  • the map update process of the additional file F (n + 1) is executed (step S6609), and the series of processes is terminated. Details of the map update processing (step S6609) of the additional file F (n + 1) will be described with reference to FIGS.
  • FIG. 67 is a flowchart (first half) showing a detailed processing procedure of the map update processing (step S6609) of the additional file shown in FIG.
  • the information processing apparatus 400 sets the bit of the file number of the additional file in the compression code map M and the deletion map D (step S6701). Specifically, for the appearance map, the OFF bit is set for the file number of the additional file, and for the deletion map D, the ON bit is set for the file number of the additional file.
  • the information processing apparatus 400 sets the first character in the additional file as the target character (step S6702), and executes the longest match search process for the target character (step S6703).
  • the longest match search process is the same process as the process shown in FIG.
  • step S6704 determines whether the longest matching basic word is in the basic word structure 1600 (step S6704). If not present (step S6704: NO), the process proceeds to step S6801 in FIG. On the other hand, if there is one (step S6704: Yes), the information processing apparatus 400 identifies the compression code of the longest matching basic word from the 2 N -branch nodeless Huffman tree H, and uses the compression code to find the longest matching basic word. Is specified (step S6705). Then, the information processing apparatus 400 turns on the bit corresponding to the file number of the additional file in the specified appearance map (step S6706). Thereafter, the process proceeds to step S6801 in FIG.
  • FIG. 68 is a flowchart (second half) showing a detailed processing procedure of the map update processing (step S6609) of the additional file shown in FIG.
  • the information processing apparatus 400 determines whether or not the target character is a specific single character (step S6801). Specifically, for example, the information processing apparatus 400 determines whether or not the target character has hit with a structure of a specific single character.
  • step S6801 When the target character is a specific single character (step S6801: Yes), the information processing apparatus 400 specifies the compression code of the specific single character that has been hit from the 2 N- branch nodeless Huffman tree H, and the compression code An appearance map of a specific single character hit is designated (step S6802). The information processing apparatus 400 turns on the bit corresponding to the file number of the additional file in the designated appearance map (step S6803). Thereafter, the process proceeds to step S6809.
  • the information processing apparatus 400 divides the target character into an upper divided character code and a lower divided character code (step S6804). Then, the information processing apparatus 400 specifies the compression code of the upper divided character code hit in the divided character code structure from the 2 N branching no-node Huffman tree H, and uses the compressed code to determine the upper divided character code hit. Is specified (step S6805). The information processing apparatus 400 turns on the bit corresponding to the file number of the additional file in the designated appearance map (step S6806).
  • the information processing apparatus 400 specifies the compression code of the lower divided character code hit in the divided character code structure from the 2 N branching no-node Huffman tree H, and uses the compressed code to find the lower divided character that is hit A code appearance map is designated (step S6807). Then, the information processing apparatus 400 turns on the bit corresponding to the file number of the additional file in the designated appearance map (step S6808). Thereafter, the process proceeds to step S6809.
  • step S6809 the information processing apparatus 400 executes bi-gram character string specifying processing (step S6809).
  • the bi-gram character string specifying process (step S6809) is the same process as the process shown in FIG.
  • the information processing apparatus 400 generates a compression code for the first gram character (for example, “people”) and a compression code for the last gram character (for example, “shape”) in the 2-gram character string (for example, “doll”). Connect (step S6810).
  • the information processing apparatus 400 designates an appearance map of a bi-gram character string using a concatenated compression code (step S6811).
  • the information processing apparatus 400 turns on the bit corresponding to the file number of the additional file in the designated appearance map (step S6812), and ends the series of processes.
  • a pointer to the compressed file of the updated target file is given to the added file number. Therefore, when the file number of the additional file is designated / searched after the update, the compressed file of the additional file can be quickly designated and decompressed.
  • the map can be updated by adding the appearance map and deletion map D bit for the file number n + 1 and changing the deletion map D bit. That is, it is not necessary to execute processing such as decompressing the compressed area of the appearance map and deleting the deleted file number i bit, and performing efficient map updating.
  • bit string in the compression area of the compression code map M is arranged in descending order of the file number p of the target file group Fs from the head position to the tail position in advance.
  • the compression code map M needs to be compressed each time a target file is added by making the compression area of the compression code map M a bit string of the maximum multiple of a predetermined number (for example, the maximum multiple of the predetermined number of files 256). There is no. Thereby, the calculation load of the information processing apparatus 400 can be reduced.
  • the compression code map M is compressed by the Huffman tree h. Is done. Thereby, memory saving can be achieved. As described above, since compression is performed in units of a predetermined number of files (for example, 256), it is possible to simultaneously reduce the calculation load and save memory.
  • the information processing method described in the present embodiment can be realized by executing a program prepared in advance by an information processing apparatus 400 such as a personal computer or a workstation.
  • the information processing program is recorded on a recording medium readable by the information processing apparatus 400 such as a hard disk, a flexible disk, a CD-ROM, an MO, or a DVD, and is executed by being read from the recording medium by the information processing apparatus 400.
  • the information processing program may be distributed through a network such as the Internet.

Abstract

 たとえば、対象ファイル(F3)に「人形芝居を見た。」という文字列が記述されており、このうち、「人形」を「紙」に書き換えたとする。この場合、対象ファイル(F3)には、あたらしいファイル番号#=n+1が割り当てられ、更新により対象ファイル(F(n+1))として保存される。圧縮符号マップ(M)には、ファイル番号n+1のビットが各出現マップに設定される。ファイル番号n+1の削除マップ(D)のビットはONに設定される。対象ファイル(F(n+1))の場合、「人形」の削除により、文字情報「人」、「形」、「人形」のビットがOFFになり、文字情報「紙」のビットがONになる。一方、ファイル番号3の削除マップ(D)のビットがONからOFFになる。

Description

抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置
 本発明は、抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置に関する。
 複数のファイルのいずれが所定の文字情報を含むかを示すインデックス情報を圧縮しておき、所定の文字情報を検索する場合に、圧縮されたインデックス情報を伸張し、伸張したインデックス情報を参照して所定の文字情報を含むファイルを特定する技術がある。
国際公開第2006/123448号パンフレット
 しかしながら、上述した従来技術では、インデックス情報を用いた検索の対象となる複数のファイルのいずれかが更新された場合、インデックス情報の内容も更新する必要がある。たとえば、更新元のファイルに「人形芝居」と記述されている場合に「人形芝居」を「紙芝居」に更新したとすると、文字「人」および「形」のビットをOFFにし、「紙」のビットをONにするといったインデックス情報の更新処理が必要となる。したがって、ファイルの更新処理を開始してから、更新後の複数のファイルに対応したインデックス情報による検索を実行可能とするまでに時間がかかるという問題がある。
 本発明は、インデックス情報を用いた検索の対象となる複数のファイルのいずれかを更新する場合に、更新処理を開始してから、更新後の複数のファイルに対応したインデックス情報による検索を実行可能とするまでの処理時間を低減することを目的とする。
 本発明の一側面によれば、複数のファイルのそれぞれについて所定の文字情報を含むかを示す第1の情報を圧縮して記憶手段に記憶し、前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを検索対象から除く旨を示す第3の情報を前記記憶手段に記憶する、情報処理方法、情報処理プログラム、および情報処理装置が提案される。
 本発明の一側面によれば、複数のファイルのそれぞれについて所定の文字情報を含むか否かを示す第1の情報を圧縮した圧縮情報を記憶手段に記憶し、前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを特定可能な第3の情報を前記記憶手段に記憶し、前記所定の文字情報についての検索要求を受けた場合に、前記複数のファイル及び前記更新されたファイルのうち、前記圧縮情報を伸張して得られる前記第1の情報又は前記第2の情報によって前記所定の文字情報が含まれない旨を示されたファイル、及び、前記第3の情報によって特定される前記あるファイルを除外したファイルを抽出する、抽出方法、抽出プログラム、および抽出装置が提案される。
 本発明の一側面によれば、インデックス情報を用いた検索の対象となる複数のファイルのいずれかを更新する場合に、更新処理を開始してから、更新後の複数のファイルに対応したインデックス情報による検索を実行可能とするまでの処理時間を低減することができるという効果を奏する。
図1は、対象ファイル更新例を示す説明図である。 図2は、実施の形態にかかる情報処理装置のハードウェア構成例を示すブロック図である。 図3は、本実施の形態にかかるシステム構成例を示す説明図である。 図4は、本実施の形態にかかる情報処理装置の機能的構成例1を示すブロック図である。 図5は、図4に示した情報処理装置の集計部~第2圧縮部までの処理の流れを示す説明図である。 図6は、集計部401による集計および作成部404による圧縮符号マップMの作成例を示す説明図である。 図7は、(1)出現回数の集計の詳細を示す説明図である。 図8は、図6の(2)圧縮符号長算出の詳細(N=11)を示す説明図である。 図9は、図6の(3)葉数特定~(5)葉の構造体生成の詳細(N=11)を示す説明図である。 図10は、文字情報ごとの補正結果を示す説明図である。 図11は、図6の(6)葉へのポインタ生成の詳細(N=11)を示す説明図である。 図12は、図6の(7)2N分枝無節点ハフマン木Hの構築の詳細(N=11)を示す説明図である。 図13は、葉の構造体を示す説明図である。 図14は、特定単一文字の構造体を示す説明図である。 図15は、分割文字コードの構造体を示す説明図である。 図16は、基礎単語の構造体を示す説明図である。 図17は、圧縮符号マップMの生成例を示す説明図である。 図18は、作成部404による圧縮符号マップ作成処理手順例を示すフローチャートである。 図19は、図18に示した集計処理(ステップS1801)の詳細な処理手順例を示すフローチャートである。 図20は、図19に示した対象ファイルFiの集計処理(ステップS1903)の詳細な処理手順例を示すフローチャートである。 図21は、文字出現頻度集計テーブルを示す説明図である。 図22は、図20に示した基礎単語集計処理(ステップS2002)の詳細な処理手順例を示すフローチャートである。 図23は、基礎単語出現頻度集計テーブルを示す説明図である。 図24は、図22に示した最長一致検索処理(ステップS2201)の詳細な処理手順を示すフローチャートである。 図25は、図18に示したマップ割当数決定処理(ステップS1802)の詳細な処理手順例を示すフローチャートである。 図26は、図18に示した再集計処理(ステップS1803)の詳細な処理手順例を示すフローチャートである。 図27は、対象ファイルFiの再集計処理(ステップS2603)の詳細な処理手順例を示すフローチャートである。 図28は、上位分割文字コード出現頻度集計テーブルを示す説明図である。 図29は、下位分割文字コード出現頻度集計テーブルを示す説明図である。 図30は、図27で示した2グラム文字列特定処理(ステップS2706)の詳細な処理手順を示すフローチャートである。 図31は、2グラム文字列出現頻度集計テーブルを示す説明図である。 図32は、図18に示したハフマン木生成処理(ステップS1804)の詳細な処理手順例を示すフローチャートである。 図33は、図32に示した枝数特定処理(ステップS3204)の詳細な処理手順例を示すフローチャートである。 図34は、図32に示した構築処理(ステップS3205)の詳細な処理手順を示すフローチャートである。 図35は、図34に示した葉へのポインタ生成処理(ステップS3403)の詳細な処理手順を示すフローチャートである。 図36は、図30に示したマップ作成処理(ステップS1805)の詳細な処理手順例を示すフローチャートである。 図37は、図36に示した対象ファイルFiのマップ作成処理(ステップS3603)の詳細な処理手順を示すフローチャートである。 図38は、図37で示した基礎単語出現マップ作成処理(ステップS3702)の詳細な処理手順例を示すフローチャートである。 図39は、図37で示した特定単一文字出現マップ作成処理(ステップS3803)の詳細な処理手順例を示すフローチャートである。 図40は、図39で示した分割文字コード出現マップ作成処理(ステップS4003)の詳細な処理手順例を示すフローチャートである。 図41は、図37に示した2グラム文字列マップ作成処理(ステップS3704)の詳細な処理手順例を示すフローチャートである。 図42は、2グラム文字列出現マップ生成処理(ステップS4104)の詳細な処理手順例を示すフローチャートである。 図43は、2N分枝無節点ハフマン木Hを用いた圧縮処理の具体例を示す説明図である。 図44は、第1圧縮部403による2N分枝無節点ハフマン木Hを用いた対象ファイル群Fsの圧縮処理手順例を示すフローチャートである。 図45は、図44に示した圧縮処理(ステップS4403)の詳細な処理手順を示すフローチャート(その1)である。 図46は、図44に示した圧縮処理(ステップS4403)の詳細な処理手順を示すフローチャート(その2)である。 図47は、図44に示した圧縮処理(ステップS4403)の詳細な処理手順を示すフローチャート(その3)である。 図48は、出現率と出現率領域との関係を示す説明図である。 図49は、出現率領域別の圧縮パターンを有する圧縮パターンテーブルを示す説明図である。 図50は、B領域およびB´領域の場合の圧縮パターンを示す説明図である。 図51は、C領域およびC´領域の場合の圧縮パターンを示す説明図である。 図52は、D領域およびD´領域の場合の圧縮パターンを示す説明図である。 図53は、E領域およびE´領域の場合の圧縮パターンを示す説明図である。 図54は、圧縮符号マップM圧縮処理手順を示すフローチャートである。 図55は、本実施の形態にかかる情報処理装置400の機能的構成例2を示すブロック図である。 図56は、ファイル伸長例(G1)を示す説明図である。 図57は、ファイル伸長例(G2)を示す説明図である。 図58は、図56および図57での伸長処理の具体例を示す説明図(その1)である。 図59は、図56および図57での伸長処理の具体例を示す説明図(その2)である。 図60は、本実施の形態にかかる検索処理手順を示すフローチャートである。 図61は、図60に示したファイル絞込み処理(ステップS6002)の詳細な処理手順を示すフローチャート(その1)である。 図62は、図60に示したファイル絞込み処理(ステップS6002)の詳細な処理手順を示すフローチャート(その2)である。 図63は、図60に示した2N分枝無節点ハフマン木Hを用いた伸長処理(ステップS6003)の詳細な処理手順例を示すフローチャート(その1)である。 図64は、図60に示した2N分枝無節点ハフマン木Hを用いた伸長処理(ステップS6003)の詳細な処理手順例を示すフローチャート(その2)である。 図65は、更新処理の具体例を示す説明図である。 図66は、図65に示した更新処理手順を示すフローチャートである。 図67は、図66に示した追加ファイルのマップ更新処理(ステップS6609)の詳細な処理手順を示すフローチャート(前半)である。 図68は、図66に示した追加ファイルのマップ更新処理(ステップS6609)の詳細な処理手順を示すフローチャート(後半)である。
 以下に添付図面を参照して、本発明の実施の形態を詳細に説明する。なお、本明細書において、「文字情報」とは、テキストデータを構成する、単一文字、基礎単語、分割文字コードなどである。対象ファイル群は、たとえば、文書ファイル、Webページ、電子メールなどの電子データであり、たとえば、テキスト形式、HTML(HyperText Markup Language)形式、XML(Extensible Markup Language)形式の電子データである。
 また、「単一文字」とは、1つの文字コードで表現される文字である。単一文字の文字コード長は、文字コード種により異なる。
 たとえば、UTF(Unicode Transformation Format)16の場合は16ビットコード、ASCII(American Standard Code for Information Interchange)コードの場合は8ビットコード、シフトJIS(Japanese Industrial Standard)コードの場合は8ビットコードである。シフトJISコードで日本語の文字を表現する場合は、2個の8ビットコードを組み合わせることとなる。
 また、「基礎単語」とは、小・中学校で学習する基本的な単語や、特定の文字列で表現される予約語をいう。「This is a・・・.」の英文を例にすると「This」、「is」、「a」などの単語であり、千語レベル、2千語レベル、数千語レベルに分類され、英和辞典には、「***」、「**」、「*」マークが付与されている。また、予約語とは、予め決められた文字列であり、たとえば、HTMLのタグ(たとえば、<br>)が挙げられる。
 また、「分割文字コード」とは、単一文字を、上位のコードと下位のコードに分割した各々のコードである。本実施の形態では、後述するように、単一文字を、上位のコードと下位のコードに分割する場合がある。たとえば、「芝」という単一文字の文字コードは、UTF16の場合、「9D82」で表現されるが、上位分割文字コード「0x9D」と下位分割文字コード「0x82」に分割される。
 また、「グラム」とは、文字単位である。たとえば、単一文字については、その1文字分が1グラムとなる。分割文字コードについては、分割文字コード単独で1グラムとなる。したがって、単一文字「芝」は2グラムとなる。なお、本実施の形態では、文字コードとしてUTF16を例に挙げて説明する。
 また、本明細書では、「ビットをON」とした場合は、そのビットの値を“1”にし、「ビットをOFF」とした場合は、そのビットの値を“0”として説明する。なお、「ビットをON」とした場合は、そのビットの値を“0”にし、「ビットをOFF」とした場合は、そのビットの値を“1”にしてもよい。
 「出現マップ」とは、文字情報を指定するポインタと文字情報の各対象ファイルでの存否を示すビット列を連結したビット列である。検索処理時には、このビット列を、ビットのON・OFFに応じて検索対象の文字情報を含むか否かを示すインデックスとして用いることができる。文字情報を指定するポインタとしては、たとえば、文字情報の圧縮符号が採用される。文字情報を指定するポインタは、例えば、文字情報そのものを用いても良い。「圧縮符号マップ」とは、圧縮符号のポインタで示される文字情報ごとの出現マップをまとめたビットマップである。2グラム文字列の圧縮符号マップについては、第1グラムの圧縮符号と第2グラムの圧縮符号を組み合わせた圧縮符号列となる。
 「2グラム文字列」とは、1グラムの文字コードが連接する文字列である。たとえば、「人形芝居」という文字列には、2連接文字「人形」、「形芝」、「芝居」が含まれている。2連接文字「人形」の「人」、「形」はそれぞれ分割されない単一文字であるため、2連接文字「人形」はそのまま2グラム文字列となる。
 「芝」は上述したように分割されるため、単一文字「形」と「芝」の上位分割文字コード「0x9D」の組み合わせが2グラム文字列となる。また、上位分割文字コード「0x9D」と下位分割文字コード「0x82」の組み合わせも2グラム文字列となる。さらに、下位分割文字コード「0x82」と分割されない単一文字「居」の組み合わせも2グラム文字列となる。
 基礎単語により、対象ファイル群が圧縮されている場合、圧縮符号マップの生成時や検索時に1パスでアクセスすることが可能である。なお、対象ファイル群を圧縮しない場合は、文字情報を指定するポインタとしては、文字情報の文字コードをそのまま採用してもよい。
<対象ファイル更新例>
 図1は、対象ファイル更新例を示す説明図である。ここで、ファイル番号#=iの対象ファイルを対象ファイルFiとする。図1では、n個の対象ファイルのうちファイル番号#=3の対象ファイルF3を更新する場合を例に挙げている。なお、図1の圧縮符号マップMでは、文字情報を指定するポインタとなる文字情報の圧縮符号について、便宜上、文字情報を表記している。
 (A)において、圧縮符号マップMには削除マップDが設定されている。削除マップDとは、対象ファイルFiの存在または削除をビット列で示したインデックスである。なお、削除マップDにおいてON(=1)に該当するビットに対応するファイル番号のファイルFiは、存在していることを意味する。一方、OFF(=0)になると、当該ファイルFiは削除されたことを意味する。これにより、圧縮符号マップMを用いて検索を行う場合に、対象ファイルFiそのものを削除しなくても、対象ファイルFiに対応する削除マップをOFFにすることで、対象ファイルFiを検索対象から除くことができる。圧縮符号マップM内の出現マップは、圧縮されて保持される。圧縮符号マップMの圧縮は、例えばハフマン木による圧縮などで、各文字情報に対応するビット列単位で行われても良い。また、圧縮符号マップMの圧縮は、削除マップDを除いた圧縮マップMについて行われても良い。圧縮された圧縮符号マップMのビット列の桁数は、対象ファイルの数以下となる。図1(A)、(C)においては、圧縮されたビット列が圧縮前よりも短くなっている様を、各ビット列の表示域を小さく表示することにより便宜的に示している。
 (B)圧縮符号マップMは、対象ファイル群を絞り込む場合に、圧縮に用いたハフマン木により伸長される。たとえば、検索文字列が「人形」である場合、対象ファイルF3には、文字情報「人」、「形」、「人形」のビットがONになっており、削除マップDのビットもONである。したがって、これら3個のビットのAND結果が「1」となる。したがって、対象ファイルF3が検索される。
 一方、対象ファイルF2の場合、文字情報「人」、「形」、「人形」のビットがONであるが、削除マップDのビットはOFFであるため、これら3個のビットのAND結果が「0」となる。したがって、対象ファイルF2は検索されない。なお、対象ファイルF3を削除する場合は、削除マップDの対象ファイルF3のビットがONからOFFになる。これにより、対象ファイルF3は、対象ファイルF2のように、検索対象外となる。
 (C)つぎに、対象ファイルF3を更新する。たとえば、対象ファイルF3に「人形芝居を見た。」という文字列が記述されており、当該文字列以外の文字列には、「人」、「形」および「紙」は存在しないものとする。このうち、「人形」を「紙」に書き換えたとする。この場合、対象ファイルF3には、あたらしいファイル番号#=n+1が割り当てられ、更新により対象ファイルF(n+1)として保存される。
 また、圧縮符号マップMには、ファイル番号n+1のビットが各出現マップに設定される。また、ファイル番号n+1の削除マップDのビットはONに設定される。対象ファイルF(n+1)の場合、「人形」の削除により、文字情報「人」、「形」、「人形」のビットがOFFになり、文字情報「紙」のビットがONになる。これにより、対象ファイルF(n+1)は検索対象とすることができる。
 一方、ファイル番号3の削除マップDのビットがONからOFFになる。これにより、対象ファイルF3は検索対象外とすることができる。なお、更新元の対象ファイルF3は、削除することとしてもよい。この場合、省メモリ化を図ることができる。一方、対象ファイルF3は、そのまま残しておくこととしてもよい。この場合、更新前の状態に戻したい場合に、復元することが可能となる。もしくは、対象ファイルF3の格納場所を示すポインタを、更新後のファイルF(n+i)の格納場所を示すポインタに用いても良い。すなわち、対象ファイルF3そのものを書き換え、書き換えたファイルを、対象ファイルF(n+i)として利用しても良い。
 また、更新後のファイルについて新しいファイル番号を採番するため、既存のファイル番号のビットを削除する必要はない。したがって、圧縮済みであるファイル番号1~nの出現マップについては、圧縮状態のまま内容も更新することなく保持することができる。
 また、図1(C)に示したように、あらかじめ、圧縮符号マップMの圧縮領域のビット列を、先頭位置から末尾位置にかけて対象ファイル群Fsのファイル番号pの降順に配列しておく。これにより、これにより、ファイル番号;1~nのビット列が圧縮されても、追加ファイルのファイル番号とそのビットとのずれがなく、対象ファイルFiの絞込みを正確に実行することができる。
 図1を用いて説明した圧縮符号マップMによる検索処理及び圧縮符号マップMの更新処理は、日本語のみに限らず、他の言語についても有効である。例えば、英語の対象ファイルを用いた場合には、「I watched marionette performance.」という文を含む対象ファイルFiは、圧縮符号マップMにおいて、「watch」、「marionette」、「performance」のそれぞれに対応するビットがONとなる。例えば、「marionette performance」という検索文字列を受け付けた場合には、「marionette」、「performance」のそれぞれに対応するビットと、削除マップDと、のAND結果が「1」である対象ファイルに検索範囲が絞り込まれる。
 また、対象ファイルFiを「I watched acrobatic performance.」に更新する場合には、F(n+i)に対応する圧縮符号マップのビットを、「watch」、「acrobatic」、「performance」のそれぞれについてONにする。対象ファイルFiが、更新後には「marionette」という単語を含まない場合には、「marionette」に対応するF(n+i)のビットはOFFとする。さらに、対象ファイルF(n+i)に対応する削除マップDをONにして、Fiに対応する削除マップDをOFFにする。これにより、英語についても対象ファイルFiの更新に合わせて、圧縮符号マップMの更新処理が行われる。
<情報処理装置のハードウェア構成例>
 図2は、実施の形態にかかる情報処理装置(抽出装置含む)のハードウェア構成例を示すブロック図である。図2において、情報処理装置は、CPU(Central Processing Unit)201と、ROM(Read Only Memory)202と、RAM(Random Access Memory)203と、磁気ディスクドライブ204と、磁気ディスク205と、光ディスクドライブ206と、光ディスク207と、ディスプレイ208と、I/F(Interface)209と、キーボード210と、マウス211と、スキャナ212と、プリンタ213と、を備えている。また、各構成部はバス200によってそれぞれ接続されている。
 ここで、CPU201は、情報処理装置の全体の制御を司る。ROM202は、ブートプログラムなどのプログラムを記憶している。また、ROM202は、圧縮符号マップMを生成・管理するプログラム、圧縮符号マップMまたは符号マップを用いて検索を行うプログラムを記憶している。RAM203は、CPU201のワークエリアとして使用され、CPU201は、ROM202に記憶されたプログラムをRAM203に読み出して実行することができる。磁気ディスクドライブ204は、CPU201の制御にしたがって磁気ディスク205に対するデータのリード/ライトを制御する。磁気ディスク205は、磁気ディスクドライブ204の制御で書き込まれたデータを記憶する。
 光ディスクドライブ206は、CPU201の制御にしたがって光ディスク207に対するデータのリード/ライトを制御する。光ディスク207は、光ディスクドライブ206の制御で書き込まれたデータを記憶したり、光ディスク207に記憶されたデータを情報処理装置に読み取らせたりする。
 ディスプレイ208は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ208は、たとえば、CRT、TFT液晶ディスプレイ、プラズマディスプレイなどを採用することができる。
 インターフェース(以下、「I/F」と略する。)209は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク214に接続され、このネットワーク214を介して他の装置に接続される。そして、I/F209は、ネットワーク214と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F209には、たとえばモデムやLANアダプタなどを採用することができる。
 キーボード210は、文字、数字、各種指示などの入力のためのキーを備え、データの入力をおこなう。また、タッチパネル式の入力パッドやテンキーなどであってもよい。マウス211は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などをおこなう。ポインティングデバイスとして同様に機能を備えるものであれば、トラックボールやジョイスティックなどであってもよい。
 スキャナ212は、画像を光学的に読み取り、情報処理装置内に画像データを取り込む。なお、スキャナ212は、OCR(Optical Character Reader)機能を持たせてもよい。また、プリンタ213は、画像データや文書データを印刷する。プリンタ213には、たとえば、レーザプリンタやインクジェットプリンタを採用することができる。
 また、情報処理装置は、サーバや据置き型のパーソナル・コンピュータのほか、携帯電話機、スマートフォン、電子書籍端末、ノート型パソコンなどの携帯型端末であってもよい。また、本実施の形態は、複数のコンピュータに応じて実施されてもよい。
 図3は、本実施の形態にかかるシステム構成例を示す説明図である。図3において、システムは、図2に示す各ハードウェアを含みうる情報処理装置301~303、ネットワーク304、スイッチ305、無線基地局307を含む。情報処理装置303に含まれるI/Fは、無線通信機能を備える。
 例えば、複数のファイルを含むコンテンツについての圧縮符号マップMを生成する処理を情報処理装置301で実行し、情報処理装置302及び情報処理装置303に配信し、情報処理装置302および情報処理装置303のそれぞれで配信されたコンテンツについての検索処理を実行してもよい。
 また、複数のファイルを含むコンテンツについての圧縮符号マップMを生成する処理を情報処理装置301で実行し、情報処理装置302または情報処理装置303からコンテンツについての検索依頼を情報処理装置301が受け付けて、検索処理を実行し、実行した検索処理の結果を情報処理装置302、情報処理装置303のそれぞれに返すように構成してもよい。図2と同様に、情報処理装置301~303のそれぞれは、サーバや据置き型のパーソナル・コンピュータのほか、携帯電話機、スマートフォン、電子書籍端末、ノート型パソコンなどの携帯型端末であってもよい。
<機能的構成例1>
 図4は、本実施の形態にかかる情報処理装置の機能的構成例1を示すブロック図であり、図5は、図4に示した情報処理装置の集計部~第2圧縮部までの処理の流れを示す説明図である。図4において、情報処理装置400は、集計部401と、第1生成部402と、第1圧縮部403と、作成部404と、第2生成部405と、第2圧縮部406と、を備える。
 集計部401~第2圧縮部406は、具体的には、たとえば、図2に示したROM202、RAM203、磁気ディスク205などの記憶装置に記憶されたプログラムをCPU201に実行させることによりその機能を実現する。なお、集計部401~第2圧縮部406は、それぞれ実行結果を記憶装置に書き込んだり、他の部の実行結果を読み出したりして、それぞれ演算を実行する。以下、集計部401~第2圧縮部406について簡単に説明する。
 集計部401は、対象ファイル群内の文字情報の出現回数を集計する。具体的には、たとえば、集計部401は、図5の(A)に示したように、対象ファイル群Fs内の文字情報の出現回数を集計する。集計部401では、特定単一文字、上位分割文字コード、下位分割文字コード、2グラム文字、基礎単語別に出現回数を計数する。集計部401の詳細な処理内容については後述する。
 第1生成部402は、集計部401の集計結果に基づいて2N分枝無節点ハフマン木Hを生成する(図5(B))。2N分枝無節点ハフマン木Hとは、根から分岐する枝が2N本あり、1または複数本の枝で葉を直接ポイントするハフマン木である。節点(内部節点)はない。節点がなく直接葉にヒットするため、節点を有する通常のハフマン木に比べて、伸長速度の高速化を図ることができる。葉は、該当する文字情報とその圧縮符号を含む構造体である。葉の構造体とも呼ぶ。葉に割り当てられる枝数は、割当先の葉に存在する圧縮符号の圧縮符号長に依存する。第1生成部402の詳細な処理内容については後述する。
 第1圧縮部403は、2N分枝無節点ハフマン木Hを用いて対象ファイル群Fsの各対象ファイルを圧縮して圧縮ファイル群fsにする(図5(C))。第1圧縮部403の詳細な処理内容については後述する。
 作成部404は、集計部401の集計結果と2N分枝無節点ハフマン木Hにおいて文字情報ごとに割り当てられた圧縮符号に基づいて、圧縮符号マップMを作成する。作成部404は、圧縮符号マップMについても、特定単一文字、上位分割文字コード、下位分割文字コード、2グラム文字、基礎単語別に作成する。作成部404は、圧縮符号マップMにおいて該当する文字情報が1個の対象ファイルに1回でも出現したらそのファイル番号のビットをONにする(図5(D))。また、初期状態では、削除マップDは各対象ファイルですべてONにする。作成部404の詳細な処理内容については後述する。
 第2生成部405は、文字情報の出現確率に基づいて出現マップを圧縮するハフマン木hを生成する(図5(E))。第2生成部405の詳細な処理内容については後述する。第2圧縮部406は、第2生成部405で生成されたハフマン木を用いて各出現マップを圧縮する(図5(F))。第2圧縮部406の詳細な処理内容については後述する。
<集計および圧縮符号マップMの作成の詳細>
 つぎに、集計部401による集計および作成部404による圧縮符号マップMの作成の詳細について説明する。圧縮符号マップMを作成する場合、作成に先立って、集計部401により、対象ファイル群Fsから文字情報の出現回数を集計し、第1生成部402により、2N分枝無節点ハフマン木Hを生成しておく必要がある。
 図6は、集計部401による集計および作成部404による圧縮符号マップMの作成例を示す説明図である。
(1)出現回数の集計
 まず、情報処理装置400は、対象ファイル群Fsに存在する文字情報の出現回数を計数する。集計結果は、出現回数の降順にソートされ、出現回数の大きい方から昇順の順位がつけられる。なお、ここでは、文字情報の総種類数は、例として1305個(<2048(=211))とする。(1)出現回数の集計の詳細は図7で説明する。
(2)圧縮符号長算出
 つぎに、(1)で得られた集計結果を基にして、情報処理装置400は、文字情報ごとの圧縮符号長を算出する。具体的には、情報処理装置400は、文字情報ごとに、出現率を算出する。出現率は、文字情報の出現回数を全文字情報の総出現回数で割ることで得られる。そして、情報処理装置400は、出現率に対応する生起確率を求め、生起確率から圧縮符号長を導き出す。
 生起確率は、1/2xで表現される。xはべき数である。圧縮符号長は、生起確率のべき数xとなる。具体的には、出現率が生起確率の以下のどの範囲であるかで圧縮符号長が決定される。ARは出現率である。
1/20>AR≧1/21・・・圧縮符号長は1ビット。
1/21>AR≧1/22・・・圧縮符号長は2ビット。
1/22>AR≧1/23・・・圧縮符号長は3ビット。
1/23>AR≧1/24・・・圧縮符号長は4ビット。
                   ・
                   ・
                   ・
1/2N-1>AR≧1/2N・・・圧縮符号長はNビット。
 (2)圧縮符号長算出の詳細は図8で説明する。
(3)葉数特定
 つぎに、情報処理装置400は、圧縮符号長ごとに葉数を集計することで圧縮符号長ごとの葉数を特定する。ここでは、最大圧縮符号長は17ビットとする。また、葉数とは、文字情報の種類数である。したがって、圧縮符号長5ビットの葉数が2である場合、5ビットの圧縮符号が割り当てられる文字情報が2つ存在することを示している。
(4)葉数補正
 つぎに、情報処理装置400は、葉数を補正する。具体的には、情報処理装置400は、枝数の上限2Nのべき数Nが最大圧縮符号長となるように補正する。たとえば、べき数N=11の場合、圧縮符号長11ビット~17ビットまでの葉数の総和を、補正後の圧縮符号長11ビットの葉数にする。そして、情報処理装置400は、圧縮符号長ごとに葉当たりの枝数を割り当てる。具体的には、補正後の圧縮符号長に対し、その降順に、20、21、22、23、24、25、26、16として葉当たりの枝数を決定する。
 たとえば、図6では、圧縮符号長11ビットの圧縮符号が割り当てられる文字情報の総数(葉数)は1215個であるが、その葉当たりの枝数は1である。圧縮符号長11ビットの圧縮符号が割り当てられる文字情報については、それぞれ1本の枝しか割り当てられないこととなる。一方、圧縮符号長6ビットの圧縮符号が割り当てられる文字情報の総数(葉数)は6個であるが、その葉当たりの枝数は32である。圧縮符号長6ビットの圧縮符号が割り当てられる文字情報については、それぞれ32本の枝が割り当てられることとなる。(4)葉数補正は、必要な場合に実行すればよく、実行しなくてもよい。
(5)葉の構造体生成
 つぎに、情報処理装置400は、葉の構造体を生成する。葉の構造体とは、文字情報とその圧縮符号長とその圧縮符号長での圧縮符号が対応付けられたデータ構造体である。たとえば、出現順位が1位である文字「0」の圧縮符号長は6ビットであり、圧縮符号は「000000」となる。図6の例では、文字情報の種類数(葉数)は1305個であるため、葉L1の構造体~葉L1305の構造体が生成されることとなる。(3)葉数特定~(5)葉の構造体生成の詳細(N=11)は、図9で説明する。
(6)葉へのポインタ生成
 つぎに、情報処理装置400は、葉の構造体ごとに葉へのポインタを生成する。葉へのポインタは、そのポイント先となる葉の構造体内の圧縮符号に、その葉当たりの枝数分の番号に相当するビット列を連結したビット列である。たとえば、葉L1である文字「0」に割り当てられた圧縮符号「000000」の圧縮符号長は6ビットであるため、葉L1当たりの枝数は32本である。
 したがって、葉L1へのポインタの先頭6ビットは、圧縮符号「000000」となる。後続ビット列は、葉L1当たりの枝数で表現される32(=25)種のビット列となる。すなわち、32種の5ビットのビット列が圧縮符号「000000」の後続ビット列となる。したがって、葉L1へのポインタは、先頭6ビットが「000000」で固定された32種の11ビットのビット列となる。なお、葉当たりの枝数が1本の場合は、葉へのポインタは1個であり、圧縮符号とその葉へのポインタは同一ビット列となる。(6)葉へのポインタ生成の詳細は、図11で説明する。
(7)2N分枝無節点ハフマン木Hの構築
 最後に、情報処理装置400は、2N分枝無節点ハフマン木Hを構築する。具体的には、葉のポインタを根とすることで、葉の構造体を直接指定する2N分枝無節点ハフマン木Hが構築される。圧縮符号列が、先頭6ビットが「000000」の11ビットのビット列である場合、後続の5ビットが32種のいずれのビット列であっても、2N分枝無節点ハフマン木Hにより文字「0」の葉L1の構造体をポイントすることができる。(7)2N分枝無節点ハフマン木Hの構築の詳細は、図12で説明する。
 図7は、(1)出現回数の集計の詳細を示す説明図である。図7において、情報処理装置400は、(A)対象ファイル群Fsからの集計、(B)出現頻度の降順でのソート、(C)目標出現率の順位までの抽出という3つのフェーズを実行する。以下、基礎単語と単一文字に分けて説明する。
(A1)まず、情報処理装置400は、対象ファイル群Fsを読み込んで、基礎単語の出現頻度(出現回数)を計数する。情報処理装置400は、基礎単語の構造体を参照して、基礎単語の構造体内の基礎単語に一致する文字列が対象ファイルに存在する場合に、当該基礎単語の出現頻度(初期値は0)を1加算する。基礎単語の構造体とは、基礎単語が記述されたデータ構造体である。
(B1)対象ファイル群Fsにおいて基礎単語の集計が終了すると、情報処理装置400は、基礎単語出現頻度集計テーブルを、出現頻度の降順にソートする。すなわち、出現頻度の高い順に並べ替え、出現頻度が最も高い基礎単語から順位付けをおこなう。
(A2)、また、情報処理装置400は、対象ファイル群Fsを読み込んで、単一文字の出現頻度を計数する。具体的には、情報処理装置400は、単一文字の出現頻度(初期値は0)を1加算する。
(B2)対象ファイル群Fsにおいて単一文字の集計が終了すると、情報処理装置400は、単一文字出現頻度集計テーブルを、出現頻度の降順にソートする。すなわち、出現頻度の高い順に並べ替え、出現頻度が最も高い単一文字から順位付けをおこなう。
(C1)つぎに、情報処理装置400は、(B1)ソート後の基礎単語出現頻度集計テーブルを参照して、目標出現率Pwまでの順位の基礎単語を抽出する。具体的には、情報処理装置400は、全基礎単語の出現頻度の総和(総出現頻度)を分母とし、順位が1位の基礎単語から降順に出現頻度を累計して分子とし、各順位までの出現率Pwを算出する。
 たとえば、総出現頻度が40000、1位からy位までの基礎単語群の累計出現頻度が30000とすると、y位までの出現頻度は、(40000/30000)×100=75[%]となる。ここで、目標出現率Pwが75[%]である場合は、上位y位までの基礎単語を抽出することとなる。
(C21)つぎに、情報処理装置400は、(B2)ソート後の単一文字出現頻度集計テーブルを参照して、目標出現率Pcまでの順位の単一文字を抽出する。具体的には、情報処理装置400は、全単一文字の出現頻度の総和(総出現頻度)を分母とし、順位が1位の単一文字から降順に出現頻度を累計して分子とし、各順位までの出現率を算出する。
 たとえば、総出現頻度が50000、1位からy位までの単一文字群の累計出現頻度が40000とすると、y位までの出現頻度は、(50000/40000)×100=80[%]となる。ここで、目標出現率Pcが80[%]である場合は、上位y位までの単一文字を抽出することとなる。なお、(C21)で抽出された単一文字を、元の単一文字群と区別するために、「特定単一文字(群)」と称す。
(C22)また、単一文字群のうち特定単一文字群から外された単一文字(以下、「非特定単一文字(群)」)は、出現頻度が各特定単一文字よりも低いため、その文字コードを分割する。具体的には、非特定単一文字の文字コードを、上位ビットの文字コードと、下位ビットの文字コードに分割する。
 たとえば、単一文字がUTF16ビット文字コードで表現されている場合は、上位8ビットの文字コードと下位8ビットの文字コードに分割する。この場合、分割されたいずれの文字コードも、0x00~0xFFのコードで表現される。このように、上位ビットの文字コードが上位分割文字コードであり、下位ビットの文字コードが下位分割文字コードである。
 図8は、図6の(2)圧縮符号長算出の詳細(N=11)を示す説明図である。図8の文字情報テーブルは、図6の(1)での集計結果を反映したテーブルであり、文字情報ごとに順位項目、伸長種別項目、コード項目、文字項目、出現回数項目、総回数項目、出現率項目、補正前での生起確率項目および圧縮符号長項目が設定されている。このうち、順位項目~総回数項目までが再ソート結果で得られた情報である。
 ここで、順位項目には、文字情報の出現回数の降順に順位(昇順)が書き込まれている。文字情報項目のうち伸長種別項目には、文字情報の種別が書き込まれる。「16」は16ビットコード(の単一文字)を示している。「8」は8ビットの分割文字コードを示している。「基」は基礎単語を示している。
 文字情報項目のうちコード項目には、特定単一文字または分割文字コードが書き込まれている。基礎単語の場合は空欄とする。文字情報項目のうち文字項目には、文字や基礎単語が書き込まれている。分割文字コードの場合は空欄とする。出現回数項目には、対象ファイル群Fsでの文字情報の出現回数が書き込まれている。総回数項目には、全文字情報の総出現回数が書き込まれている。
 出現率項目には、出現回数を総回数で割り算した値が出現率として書き込まれている。補正前項目の生起確率項目には、出現率に対応する生起確率が書き込まれている。圧縮符号長項目には、生起確率に応じた圧縮符号長、すなわち、生起確率1/2yのべき数yが圧縮符号長として書き込まれている。
 図9は、図6の(3)葉数特定~(5)葉の構造体生成の詳細(N=11)を示す説明図である。図8の文字情報テーブルを圧縮符号長単位で葉数(文字情報の総種類数)を集計した結果が、図8における補正前の葉数となる。ここで、補正Aとは、圧縮符号長の上限長N(すなわち、2N分枝無節点ハフマン木Hの最大枝数2Nのべき数N)以上の圧縮符号長に割り当てられた葉数を、圧縮符号長の上限長Nに集約する補正である。この場合、補正前での最大圧縮符号長は17ビットであるが、文字情報の総種類数が1305種であるため、圧縮符号長の上限長Nは、N=11となる。したがって、補正Aでは、圧縮符号長11ビットの葉数が、圧縮符号長が11ビット~17ビットの葉数の総和(1190個)となる。
 そして、情報処理装置400は、生起確率総和を求める。圧縮符号長ごとの生起確率は決められているため(5ビットなら1/25)、圧縮符号長ごとに生起確率を葉数で乗じることで、圧縮符号長ごとの乗算結果が得られる。たとえば、補正Aにおける圧縮符号長5ビットの葉数は2である。圧縮符号長5ビットの生起確率は、1/25である。したがって、補正Aにおける圧縮符号長5ビットの生起確率は、2×(1/25)=1/24となる。圧縮符号長6ビット以降も同様に補正Aにおける圧縮符号長生起確率を求める。そして、補正A後における各圧縮符号長の生起確率を合計することで、補正Aでの生起確率総和が得られる。
 そして、情報処理装置400は、生起確率総和が1以下であるか否かを判断する。しきい値tは0<t≦1である。しきい値tを設けたくない場合は、t=1とすればよい。しきい値t未満であれば、補正Bに移行する。しきい値t以上1以下である場合は、補正Bに移行せず、この時点での圧縮符号長ごとの葉数で確定する。
 補正Bは、補正Aでの圧縮符号長群(5ビット~12ビット)は変えずに、葉数を更新する補正である。具体的には、補正Aでの生起確率総和が、しきい値t以上1以下でない場合におこなわれる補正である。より具体的には、補正Bは2種類ある。
 1つ目は、生起確率総和がしきい値t未満である場合、生起確率総和が1以下の最大値が得られるまで、たとえば、最大漸近値に収束するまで、生起確率総和を増加させる補正(以下、補正B+)である。もう1つは、生起確率総和が1より大きい場合、生起確率総和が1以下に割り込んでから1以下の最大値が得られるまで、たとえば、最大漸近値に収束するまで、生起確率総和を減少させる補正(以下、補正B-)である。
 図9に示した例では、補正Aでの生起確率総和が「1.146」であるため、補正B-をおこなうこととなる。なお、補正B+および補正B-のいずれの補正Bであっても、葉数を生起確率総和で割るという同じ補正をおこなう。
 まず、補正B-の1回目(補正B-1)では、圧縮符号長ごとの補正Aでの葉数を、前回の補正(この場合は補正A)の生起確率の総和(1.146)で割ることで、葉数を更新する。なお、小数点以下は切り捨てでも、四捨五入でもよい。なお、補正Aでの圧縮符号長の上限長N(N=11ビット)については、前回の補正(この場合は補正A)の生起確率総和(1.146)で割ることはせず、葉の総数(1305個)から、補正B-1での圧縮符号長ごとの葉の総数(圧縮符号長の上限長Nの葉数除く)を引くことで、圧縮符号長の上限長Nの葉数を求める。この場合は、1208個である。
 このあと、情報処理装置400は、補正Aの場合と同様の計算処理により、補正B-1での生起確率総和を求める。そして、情報処理装置400は、補正B-1での生起確率総和が1以下の最大漸近値に収束したか否かを判断する。補正B-1での生起確率総和が1以下の最大漸近値に収束していなければ、補正B-の2回目(補正B-2)に移行する。最大漸近値に収束した場合は、補正B-2に移行せず、この時点での圧縮符号長ごとの葉数で確定する。補正B-1で更新された生起確率総和「1.042」は1より大きいため、最大漸近値に収束しておらず、補正B-2に移行する。
 補正B-2では、圧縮符号長ごとの補正B-1での葉数を、前回の補正(この場合は補正B-1)の生起確率総和(1.042)で割ることで、葉数を更新する。なお、小数点以下は切り捨てでも、四捨五入でもよい。なお、補正B-1での圧縮符号長の上限長N(N=11ビット)については、前回の補正(この場合は補正B-1)の生起確率総和(1.042)で割ることはせず、葉の総数(1305個)から、補正B-2での圧縮符号長ごとの葉の総数(圧縮符号長の上限長Nの葉数除く)を引くことで、圧縮符号長の上限長Nの葉数を求める。この場合は、1215個である。
 このあと、情報処理装置400は、補正B-1の場合と同様の計算処理により、補正B-2での生起確率総和を求める。そして、情報処理装置400は、補正B-2での生起確率総和が1以下の最大漸近値に収束したか否かを判断する。補正B-2での生起確率総和が1以下の最大漸近値に収束していなければ、補正B-の3回目(補正B-3)に移行する。最大漸近値に収束した場合は、補正B-3に移行せず、この時点での圧縮符号長ごとの葉数で確定する。補正B-2で更新された生起確率総和「0.982」は1以下であるが、最大漸近値に収束しているかが不明であるため、補正B-3に移行する。
 補正B-3では、圧縮符号長ごとの補正B-2での葉数を、前回の補正(この場合は補正B-2)の生起確率総和(0.982)で割ることで、葉数を更新する。なお、小数点以下は切り捨てでも、四捨五入でもよい。なお、補正B-2での圧縮符号長の上限長N(N=11ビット)については、前回の補正(この場合は補正B-2)の生起確率総和(0.982)で割ることはせず、葉の総数(1305個)から、補正B-3での圧縮符号長ごとの葉の総数(圧縮符号長の上限長Nの葉数除く)を引くことで、圧縮符号長の上限長Nの葉数を求める。この場合は、1215個である。
 このあと、情報処理装置400は、補正B-2の場合と同様の計算処理により、補正B-3での生起確率総和を求める。そして、情報処理装置400は、補正B-3での生起確率総和が1以下の最大漸近値に収束したか否かを判断する。補正B-3での生起確率総和が1以下の最大漸近値に収束していなければ、補正B-の4回目(補正B-4)に移行する。最大漸近値に収束した場合は、補正B-4に移行せず、この時点での圧縮符号長ごとの葉数で確定する。
 補正B-3で更新された生起確率総和「0.982」は、補正B-2で更新された生起確率総和「0.982」と同じ値である。すなわち、補正B-3での各圧縮符号長の葉数と補正B-2での各圧縮符号長の葉数とは同じである。この場合、情報処理装置400は、生起確率総和が最大漸近値に収束したと判断し、葉数が確定する。
 このようにして、葉数が確定するまで補正B-を継続することとなる。図9の例では、補正B-3で圧縮符号長ごとの葉数が確定したこととなる。このあと、情報処理装置400は、圧縮符号長ごとに、葉当たりの枝数を算出することとなる。葉当たりの枝数の算出は、上述したように、圧縮符号長の上限長N(この場合はN=11ビット)から降順に、20、21、22、23、24、25、26として葉当たりの枝数を割り当てることとなる。なお、枝数の小計は、圧縮符号長ごとに、葉当たりの枝数に確定した葉数を乗じた乗算結果である。
 図10は、文字情報ごとの補正結果を示す説明図である。図10において、文字情報テーブルには、補正A、補正B-1~補正B-2までの補正結果が追加されている。図10に示したように、補正により圧縮符号長別の葉数が更新されるため、順位項目の1位の文字情報から短い圧縮符号長が割り当てられることとなる。
 たとえば、補正B-2で確定した場合、圧縮符号長6ビットでは葉数が6、圧縮符号長7ビットでは葉数が18、…、圧縮符号長11ビットでは葉数が1215となっている。したがって、順位が1位から6位までの文字情報(葉数6個分)については6ビットの圧縮符号長、順位が7位から24位までの文字情報(葉数18個分)については7ビットの圧縮符号長、…、順位が91位から1305位までの文字情報(葉数1215個分)については11ビットの圧縮符号長が割り当てられる。
 そして、情報処理装置400は、文字情報と文字情報に割り当てられた圧縮符号長と圧縮符号長ごとの葉数とに基づいて、文字情報ごとに圧縮符号を割り当て、葉の構造体を生成することとなる。たとえば、出現率1位の単一文字「0」は5ビットの圧縮符号長が割り当てられているため、圧縮符号が「000000」となる。したがって、圧縮符号「000000」、圧縮符号長「6」、文字情報「0」を含む葉L1の構造体が生成されることとなる。
 なお、上述した補正処理では、圧縮符号長が5ビット~11ビットとしたが、2グラム文字列の圧縮符号マップMを分割する場合もあるため、圧縮符号長は偶数ビットとなるように、補正してもよい。具体的には、たとえば、圧縮符号長5ビットおよび7ビットの文字情報については6ビット、9ビットの文字情報については8ビット、11ビットの文字情報については10ビットとする。
 図11は、図6の(6)葉へのポインタ生成の詳細(N=11)を示す説明図である。図11は、圧縮符号長の上限Nが11ビットの場合の葉へのポインタを示している。図11において、圧縮符号長が6ビットの葉数は6個であるため、圧縮符号は「000000」~「000101」が割り当てられる。また、圧縮符号長が6ビットの葉当たりの枝数は、32本である。したがって、圧縮符号長が6ビットの圧縮符号についての葉へのポインタは、32(=25)個生成される。具体的には、葉へのポインタの先頭6ビットが圧縮符号で後続5ビットが32種のビット列となる。したがって、圧縮符号長が6ビットの圧縮符号の各々について、32種の葉へのポインタが生成されることとなる。
 なお、図示はしないが、圧縮符号長が7ビットの葉数は18個であるため、圧縮符号「0001100」~「0011111」が割り当てられる。また、圧縮符号長が7ビットの葉当たりの枝数は、16本である。したがって、圧縮符号長が7ビットの圧縮符号についての葉へのポインタは、16(=24)個生成される。具体的には、葉へのポインタの先頭7ビットが圧縮符号で後続4ビットが16種のビット列となる。したがって、圧縮符号長が7ビットの圧縮符号の各々について、16種の葉へのポインタが生成されることとなる。
 同様に、圧縮符号長が8ビットの葉数は23個であるため、圧縮符号「01000000」~「01010110」が割り当てられる。また、圧縮符号長が8ビットの葉当たりの枝数は、8本である。したがって、圧縮符号長が8ビットの圧縮符号についての葉へのポインタは、8(=23)個生成される。具体的には、葉へのポインタの先頭8ビットが圧縮符号で後続3ビットが8種のビット列となる。したがって、圧縮符号長が8ビットの圧縮符号の各々について、8種の葉へのポインタが生成されることとなる。
 同様に、圧縮符号長が9ビットの葉数は23個であるため、圧縮符号「010101110」~「011000100」が割り当てられる。また、圧縮符号長が9ビットの葉当たりの枝数は、4本である。したがって、圧縮符号長が9ビットの圧縮符号についての葉へのポインタは、4(=22)個生成される。具体的には、葉へのポインタの先頭9ビットが圧縮符号で後続2ビットが4種のビット列となる。したがって、圧縮符号長が9ビットの圧縮符号の各々について、4種の葉へのポインタが生成されることとなる。
 同様に、圧縮符号長が10ビットの葉数は20個であるため、圧縮符号「0110000110」~「0110011101」が割り当てられる。また、圧縮符号長が10ビットの葉当たりの枝数は、2本である。したがって、圧縮符号長が10ビットの圧縮符号についての葉へのポインタは、2(=21)個生成される。具体的には、葉へのポインタの先頭10ビットが圧縮符号で後続1ビットが2種のビット列となる。したがって、圧縮符号長が10ビットの圧縮符号の各々について、2種の葉へのポインタが生成されることとなる。
 同様に、圧縮符号長が11ビットの葉数は1215個であるため、圧縮符号「01100111100」~「11111111010」が割り当てられる。また、圧縮符号長が11ビットの葉当たりの枝数は、1本である。したがって、圧縮符号長が11ビットの圧縮符号についての葉へのポインタは、1(=20)個生成される。具体的には、圧縮符号がそのまま葉へのポインタとなる。したがって、圧縮符号長が11ビットの圧縮符号の各々について、1種の葉へのポインタが生成されることとなる。
 図12は、図6の(7)2N分枝無節点ハフマン木Hの構築の詳細(N=11)を示す説明図である。図12では、N=11とした場合の2048(=211)分枝無節点ハフマン木Hを示している。根の構造体には、葉へのポインタが格納されている。葉へのポインタはポイント先の葉の構造体を指定することができる。
 具体的には、圧縮符号長が6ビットの圧縮符号が格納される葉の構造体についての葉へのポインタは、図11に示したように32個生成される。したがって、葉L1の構造体については、根の構造体に32個の葉L1へのポインタL1P(1)~L1P(32)が格納される。葉L2の構造体~葉L6の構造体についても同様である。葉L7以降の構造体については、図12のとおりである。
 図13は、葉の構造体を示す説明図である。葉の構造体は、第1領域~第4領域を有するデータ構造体である。葉の構造体は、第1領域には、圧縮符号およびその圧縮符号長が格納される。第2領域には、葉の標識と伸長種別(図8参照)、出現率(図10参照)が格納される。第3領域には、伸長種別に応じて特定単一文字である16ビットの文字コード、非特定単一文字の文字コードが分割された8ビットの分割文字コード、または基礎単語へのポインタが格納される。基礎単語へのポインタにより基礎単語の構造体内の基礎単語が指定される。また、照合フラグも格納されている。照合フラグはデフォルトでは「0」である。「0」の場合は、伸長する文字をそのまま伸長バッファに書き出し、「1」の場合は、<color>タグと</color>タグで挟み込んで伸長バッファに書き出す。
 第4領域には、格納されている文字情報の出現率と出現率領域が格納される。出現率とは、図8に示した文字情報の出現率である。出現率領域については図48および図49で説明する。なお、第4領域には、そのほか、符号種別と符号区分が格納される。符号種別とは、文字コードが数字、英字、特殊記号、カタカナ、ひらがな、漢字のいずれに該当するか、または基礎単語へのポインタであるかを識別する情報である。符号区分とは、文字コードが16ビットであるか8ビットであるかを識別する情報である。16ビットの文字コードである場合または予約語である場合、符号区分として“1”を割り当て、8ビットの分割文字コードの場合、符号区分として“0”を割り当てる。
 なお、第1領域~第4領域内の情報は、後述する構築処理(ステップS3205)において格納されることとなる。
 図14は、特定単一文字の構造体を示す説明図である。特定単一文字の構造体1400は、特定単一文字コードe♯とその葉L♯へのポインタを格納するデータ構造体である。具体的には、たとえば、情報処理装置400は、対象ファイル群Fsからの集計結果が得られたときに、情報処理装置400が、特定単一文字の構造体1400に特定単一文字コードe♯を格納する。そして、情報処理装置400は、2N分枝無節点ハフマン木Hが構築されると、2N分枝無節点ハフマン木Hにおける各葉の構造体に格納された圧縮符号に対応する、特定単一文字の構造体1400における特定文字コードe♯へのポインタを格納する。
 また、特定単一文字コードe♯へのポインタが対応する葉の構造体に格納されると、情報処理装置400は、2N分枝無節点ハフマン木Hにおける各特定単一文字コードe♯に対応する葉へのポインタを、特定単一文字の構造体1400内の対応する特定単一文字コードe♯に関連付けて格納する。これにより、特定単一文字の構造体1400が生成される。
 図15は、分割文字コードの構造体を示す説明図である。分割文字コードの構造体1500は、分割文字コードとその葉L♯へのポインタを格納する。具体的には、たとえば、情報処理装置400は、対象ファイル群Fsからの集計結果が得られたときに、情報処理装置400が、分割文字コードの構造体1500に分割文字コードを格納する。そして、情報処理装置400は、2N分枝無節点ハフマン木Hが構築されると、2N分枝無節点ハフマン木Hにおける各葉の構造体に格納された圧縮符号に対応する、分割文字コードの構造体1500における分割文字コードへのポインタを格納する。
 また、分割文字コードへのポインタが対応する葉の構造体に格納されると、情報処理装置400は、2N分枝無節点ハフマン木Hにおける各分割文字コードに対応する葉へのポインタを、分割文字コードの構造体1500内の対応する分割文字コードに関連付けて格納する。これにより、分割文字コードの構造体1500が生成される。
 図16は、基礎単語の構造体を示す説明図である。基礎単語の構造体1600は、基礎単語とその葉L♯へのポインタを格納するデータ構造体である。基礎単語の構造体1600には、あらかじめ基礎単語が格納されている。情報処理装置400は、2N分枝無節点ハフマン木Hが構築されると、2N分枝無節点ハフマン木Hにおける各葉の構造体に格納された圧縮符号に対応する、基礎単語の構造体1600における基礎単語へのポインタを格納する。
 また、基礎単語へのポインタが対応する葉の構造体に格納されると、情報処理装置400は、2N分枝無節点ハフマン木Hにおける各基礎単語に対応する葉へのポインタを、基礎単語の構造体1600内の対応する基礎に関連付けて格納することとなる。
<圧縮符号マップMの作成例>
 第1生成部402により2N分枝無節点ハフマン木Hが生成されると、作成部404は、単一文字の圧縮符号マップM、上位分割文字コードの圧縮符号マップM、下位分割文字コードの圧縮符号マップM、単語の圧縮符号マップM、2グラム文字列の圧縮符号マップMを作成する。以下、単一文字の圧縮符号マップM、上位分割文字コードの圧縮符号マップM、下位分割文字コードの圧縮符号マップM、2グラム文字列の圧縮符号マップMの詳細な作成例について説明する。なお、基礎単語の圧縮符号マップMは、単一文字の圧縮符号マップMと同様に行われるため省略する。
 図17は、圧縮符号マップMの生成例を示す説明図である。図17では、対象ファイルFi内に『竜馬は脱藩した』という文字列が記述されているものとする。
(A)まず、先頭文字「竜」が対象文字である。対象文字「竜」は特定単一文字であるため、2N分枝無節点ハフマン木Hにアクセスして特定単一文字「竜」の圧縮符号を取得し、特定単一文字「竜」の出現マップを特定する。未生成の場合は、特定単一文字「竜」の圧縮符号をポインタとし、かつ、対象ファイルの存否を示すビット列をオール0にした特定単一文字「竜」の出現マップを生成する。そして、特定単一文字「竜」の出現マップについて対象ファイルFiのビットをON(“0”→“1”)にする。
(B)つぎに、対象文字を1グラムシフトして、対象文字を「馬」にする。対象文字「馬」は特定単一文字であるため、2N分枝無節点ハフマン木Hにアクセスして特定単一文字「馬」の圧縮符号を取得し、特定単一文字「馬」の出現マップを特定する。未生成の場合は、特定単一文字「馬」の圧縮符号をポインタとし、かつ、対象ファイルの存否を示すビット列をオール0にした特定単一文字「馬」の出現マップを生成する。そして、特定単一文字「馬」の出現マップについて対象ファイルFiのビットをON(“0”→“1”)にする。
 また、対象文字が「馬」にシフトされた場合、「竜馬」という2グラム文字列が得られるため、「竜」の圧縮符号と「馬」の圧縮符号を結合した「竜馬」の圧縮符号列により、2グラム文字列「竜馬」の出現マップを特定する。未生成の場合は、「竜馬」の圧縮符号列をポインタとし、かつ、対象ファイルの存否を示すビット列をオール0にした2グラム文字列「竜馬」の出現マップを生成する。そして、2グラム文字列「竜馬」の出現マップにおいて対象ファイルFiのビットをON(“0”→“1”)にする。
(C)つぎに、対象文字を1グラムシフトして、対象文字を「は」にする。対象文字「は」についても(B)と同様に処理することで、特定単一文字「は」の出現マップについて対象ファイルFiのビットをON(“0”→“1”)にする。同様に、2グラム文字列「馬は」の出現マップにおいて対象ファイルFiのビットをON(“0”→“1”)にする。
(D)つぎに、対象文字を1グラムシフトして、対象文字を「脱」にする。対象文字「脱」は特定単一文字ではないため、対象文字「脱」の文字コード「0x8131」を、上位分割文字コード「0x81」と下位分割文字コード「0x31」に分割する。そして、対象文字を上位分割文字コード「0x81」にする。上位分割文字コード「0x81」についても、特定単一文字と同様に処理することで、上位分割文字コード「0x81」の出現マップについて対象ファイルFiのビットをON(“0”→“1”)にする。同様に、2グラム文字列「は 0x81」の出現マップにおいて対象ファイルFiのビットをON(“0”→“1”)にする。
(E)つぎに、対象文字を1グラムシフトして、文字「脱」の下位分割文字コード「0x31」を、対象文字にする。下位分割文字コード「0x31」についても、同様に処理することで、下位分割文字コード「0x31」の出現マップについて対象ファイルFiのビットをON(“0”→“1”)にする。同様に、2グラム文字列「0x81 0x31」の出現マップにおいて対象ファイルFiのビットをON(“0”→“1”)にする。
 (F)~(I)についても同様の処理をおこない、最後の対象ファイルFnについても処理を完了することで、単一文字、上位分割文字コード、下位分割文字コード、2グラム文字列のそれぞれについて、圧縮符号マップMが生成される。
<圧縮符号マップM生成処理手順>
 つぎに、作成部404による圧縮符号マップ作成処理手順例について説明する。
 図18は、作成部404による圧縮符号マップ作成処理手順例を示すフローチャートである。情報処理装置400は、集計処理(ステップS1801)、マップ割当数決定処理(ステップS1802)、再集計処理(ステップS1803)、ハフマン木生成処理(ステップS1804)、マップ作成処理(ステップS1805)を実行する。情報処理装置400は、集計部401により集計処理(ステップS1801)~再集計処理(ステップS1803)を実行する。また、第1生成部402によりハフマン木生成処理(ステップS1804)を実行し、作成部404によりマップ作成処理(ステップS1805)を実行する。
 集計処理(ステップS1801)とは、対象ファイル群Fs内の単一文字や基礎単語の出現回数(出現頻度ともいう)を計数する処理である。マップ割当数決定処理(ステップS1802)とは、集計処理(ステップS1801)で集計された単一文字および基礎単語についてのマップ割当数を決定する処理である。マップ割当数に対応する出現順位の単一文字および基礎単語が、それぞれ特定単一文字および基礎単語となる。
 再集計処理(ステップS1803)とは、単一文字のうち特定単一文字以外の非特定単一文字を分割して、上位分割文字コードおよび下位分割文字コードとし、それぞれの出現回数を集計する処理である。また、再集計処理(ステップS1803)では、2グラム文字列の出現回数も集計する。
 ハフマン木生成処理(ステップS1804)とは、図8~図13に示したように、2N分枝無節点ハフマン木Hを生成する処理である。マップ作成処理(ステップS1805)とは、特定単一文字、基礎単語、上位分割文字コード、下位分割文字コード、2グラム文字列についての圧縮符号マップMを生成する処理である。
(集計処理(ステップS1801))
 図19は、図18に示した集計処理(ステップS1801)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、ファイル番号iをi=1に設定し(ステップS1901)、対象ファイルFiを読み込む(ステップS1902)。そして、情報処理装置400は、対象ファイルFiの集計処理を実行する(ステップS1903)。対象ファイルFiの集計処理(ステップS1903)の詳細については、図20で説明する。このあと、情報処理装置400は、ファイル番号iがi>n(nは対象ファイルF1~Fnの総数)であるか否かを判断する(ステップS1904)。
 i>nでない場合(ステップS1904:No)、情報処理装置400は、iをインクリメントし(ステップS1905)、ステップS1902に戻る。一方、i>nである場合(ステップS1904:Yes)、情報処理装置400は、図18に示したマップ割当数決定処理(ステップS1802)に移行して、集計処理(ステップS1801)を終了する。この集計処理(ステップS1801)によれば、対象ファイルFiごとに対象ファイルFiの集計処理(ステップS1903)を実行することができる。
(対象ファイルFiの集計処理(ステップS1903))
 図20は、図19に示した対象ファイルFiの集計処理(ステップS1903)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、対象文字を対象ファイルFiの先頭文字とし(ステップS2001)、基礎単語集計処理を実行する(ステップS2002)。基礎単語集計処理(ステップS2002)の詳細については図22で説明する。このあと、情報処理装置400は、文字出現頻度集計テーブルにおいて対象文字の出現回数を1増加する(ステップS2003)。
 図21は、文字出現頻度集計テーブルを示す説明図である。文字出現頻度集計テーブル2100は、RAM203や磁気ディスク205などの記憶装置に記憶されており、該当する文字が出現する都度出現回数を1ずつ増加させる。
 図20に戻り、情報処理装置400は、対象文字が対象ファイルFiの末尾文字であるか否かを判断する(ステップS2004)。対象文字が対象ファイルFiの末尾文字でない場合(ステップS2004:No)、情報処理装置400は、対象文字を末尾方向へ1文字シフトし(ステップS2005)、ステップS2002に戻る。
 一方、対象文字が対象ファイルFiの末尾文字である場合(ステップS2004:Yes)、情報処理装置400は、ステップS1904に移行して、対象ファイルFiの集計処理(ステップS1903)を終了する。この対象ファイルFiの集計処理(ステップS1903)によれば、対象ファイル群Fsに存在する基礎単語および単一文字の出現頻度を集計することができる。
(基礎単語集計処理(ステップS2002))
 図22は、図20に示した基礎単語集計処理(ステップS2002)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、最長一致検索処理を実行し(ステップS2201)、最長一致した基礎単語があったか否かを判断する(ステップS2202)。最長一致検索処理(ステップS2202)の詳細については図24で説明する。最長一致した基礎単語があった場合(ステップS2202:Yes)、情報処理装置400は、基礎単語出現頻度集計テーブルにおいて最長一致した基礎単語の出現回数を1増加し(ステップS2203)、ステップS2003に移行する。
 図23は、基礎単語出現頻度集計テーブルを示す説明図である。基礎単語出現頻度集計テーブル2300は、RAM203や磁気ディスク205などの記憶装置に記憶されており、該当する基礎単語が出現する都度出現回数を1ずつ増加させる。
 図22に戻り、最長一致した基礎単語がなかった場合(ステップS2202:No)、ステップS2003に移行する。これにより、基礎単語集計処理(ステップS2002)を終了する。この基礎単語集計処理(ステップS2002)によれば、最長一致検索処理(ステップS2201)により基礎単語を計数することができるため、文字列が長い基礎単語を優先的に計数することができる。
(最長一致検索処理(ステップS2201))
 図24は、図22に示した最長一致検索処理(ステップS2201)の詳細な処理手順を示すフローチャートである。まず、情報処理装置400は、c=1とする(ステップS2401)。cは対象文字からの文字数(対象文字含む)である。c=1の場合は、対象文字だけである。つぎに、情報処理装置400は、対象文字からc文字目までの対象文字列と前方一致する基礎単語を2分探索する(ステップS2402)。そして、情報処理装置400は、検索により基礎単語があるか否かを判断する(ステップS2403)。2分探索により基礎単語がヒットしなかった場合(ステップS2403:No)、ステップS2406に移行する。
 一方、2分探索により基礎単語がヒットした場合(ステップS2403:Yes)、情報処理装置400は、ヒットした基礎単語と対象文字列とが完全一致するか否かを判断する(ステップS2404)。そして、完全一致しない場合(ステップS2404:No)、ステップS2406に移行する。一方、完全一致する場合(ステップS2404:Yes)、情報処理装置400は、最長一致候補として記憶装置に保持し(ステップS2405)、ステップS2406に移行する。
 ステップS2406では、情報処理装置400は、対象文字列について2分探索が終了したか否かを判断する(ステップS2406)。具体的には、情報処理装置400は、末尾の基礎単語まで2分探索したか否かを判断する。2分探索が終了していない場合(ステップS2406:No)、情報処理装置400は、ステップS2402に移行して、2分探索が終了するまで継続する。
 一方、対象文字列について2分探索が終了した場合(ステップS2406:Yes)、情報処理装置400は、c文字目の文字が対象ファイルFiの末尾文字であるか否かを判断する(ステップS2407)。c文字目の文字が対象ファイルFiの末尾文字である場合(ステップS2407:Yes)、ステップS2410に移行する。一方、c文字目の文字が対象ファイルFiの末尾文字でない場合(ステップS2407:No)、情報処理装置400は、c>cmaxであるか否かを判断する(ステップS2408)。cmaxは予め設定された値であり、これにより対象文字列の上限文字数が設定される。
 c>cmaxでない場合(ステップS2408:No)、情報処理装置400は、cをインクリメントして(ステップS2409)、ステップS2402に戻る。一方、c>cmaxである場合(ステップS2408:Yes)、情報処理装置400は、最長一致候補があるか否かを判断する(ステップS2410)。具体的には、情報処理装置400は、ステップS2405において1つでも最長一致候補がメモリに保持されているか否かを判断する。
 最長一致候補がある場合(ステップS2410:Yes)、情報処理装置400は、最長一致候補のうち最長文字列を、最長一致した基礎単語に決定する(ステップS2411)。そして、ステップS2202に移行する。一方、ステップS2410において、最長一致候補が1つもない場合(ステップS2410:No)、ステップS2202に移行する。これにより、最長一致検索処理(ステップS2201)を終了する。この最長一致検索処理(ステップS2201)によれば、基礎単語の構造体にある基礎単語の中から、完全一致した文字列の中でかつ最長の文字列を基礎単語として検索することができる。
(マップ割当数決定処理(ステップS1802))
 図25は、図18に示したマップ割当数決定処理(ステップS1802)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、集計処理(ステップS1801)による基礎単語ごとの出現頻度を示す基礎単語出現頻度集計テーブル2300と単一文字ごとの出現頻度を示す文字出現頻度集計テーブル2100を出現頻度の高い順にソートする(ステップS2501)。そして、情報処理装置400は、ソート後の基礎単語出現頻度集計テーブル2300を参照して、基礎単語の出現順位RwをRw=1とし(ステップS2502)、出現順位Rwまでの累積出現回数Arwを計数する(ステップS2503)。そして、情報処理装置400は、下記式(1)を満たすか否かを判断する(ステップS2504)。
 Arw>Pw×Aw・・・(1)
 Awは集計された基礎単語の総出現回数である。
 上記(1)式を満たさない場合(ステップS2504:No)、情報処理装置400は、出現順位Rwをインクリメントして(ステップS2505)、ステップS2503に戻る。すなわち、上記式(1)を満たすまで出現順位Rwを下げ続ける。
 そして、上記式(1)を満たした場合(ステップS2504:Yes)、情報処理装置400は、基礎単語のマップ割当数NwをNw=Rw-1とする(ステップS2506)。ここで、マップ割当数Nwとは、マップ作成処理(ステップS1805)で生成される基礎単語出現マップに割り当てられる基礎単語数であり、基礎単語出現マップのレコード数(行数)を意味する。
 また、情報処理装置400は、単一文字の出現順位RcをRc=1とし(ステップS2507)、出現順位Rcまでの累積出現回数Arcを計数する(ステップS2508)。そして、情報処理装置400は、下記式(2)を満たすか否かを判断する(ステップS2509)。
 Arc>Pc×Ac・・・(2)
 Acは集計された単一文字の総出現回数である。
 上記(2)式を満たさない場合(ステップS2509:No)、情報処理装置400は、出現順位Rcをインクリメントして(ステップS2510)、ステップS2508に戻る。すなわち、上記式(2)を満たすまで出現順位Rcを下げ続ける。
 そして、上記式(2)を満たした場合(ステップS2509:Yes)、情報処理装置400は、単一文字のマップ割当数NcをNc=Rc-1とする(ステップS2511)。ここで、マップ割当数Ncとは、マップ作成処理(ステップS1805)で生成される特定単一文字出現マップに割り当てられる特定単一文字数であり、特定単一文字出現マップのレコード数(行数)を意味する。この後、再集計処理(ステップS1803)に移行して、マップ割当数決定処理(ステップS1802)を終了する。
 このマップ割当数決定処理(ステップS1802)によれば、マップ作成処理(ステップS1805)において目標出現率Pwに応じた数の基礎単語分について基礎単語出現マップを生成することができる。したがって、すべての基礎単語についてマップ割当をおこなう必要はなく、目標出現率Pwにしたがって決められるため、マップサイズの最適化を図ることができる。
 また、単一文字についても、マップ作成処理(ステップS1805)において目標出現率Pcに応じた数の単一文字分について特定単一文字の圧縮符号マップMを生成することができる。したがって、すべての単一文字についてマップ割当をおこなう必要はなく、目標出現率Pcにしたがって決められるため、マップサイズの最適化を図ることができる。
(再集計処理(ステップS1803))
 図26は、図18に示した再集計処理(ステップS1803)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、ファイル番号iをi=1に設定し(ステップS2601)、対象ファイルFiを読み込む(ステップS2602)。そして、情報処理装置400は、対象ファイルFiの再集計処理を実行する(ステップS2603)。対象ファイルFiの再集計処理(ステップS2603)の詳細については、図27で説明する。このあと、情報処理装置400は、ファイル番号iがi>n(nは対象ファイルF1~Fnの総数)であるか否かを判断する(ステップS2604)。
 i>nでない場合(ステップS2604:No)、情報処理装置400は、iをインクリメントし(ステップS2605)、ステップS2602に戻る。一方、i>nである場合(ステップS2604:Yes)、情報処理装置400は、図18に示したハフマン木生成処理(ステップS1804)に移行して、再集計処理(ステップS1803)を終了する。この再集計処理(ステップS1803)によれば、対象ファイルFiごとに対象ファイルFiの再集計処理(ステップS2603)を実行することができる。
(対象ファイルFiの再集計処理(ステップS2603))
 図27は、対象ファイルFiの再集計処理(ステップS2603)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、対象文字を対象ファイルFiの先頭文字とし(ステップS2701)、対象文字が特定単一文字であるか否かを判断する(ステップS2702)。特定単一文字である場合(ステップS2702:Yes)、分割せずにステップS2704に移行する。
 一方、特定単一文字でない場合(ステップS2702:No)、情報処理装置400は、対象文字の文字コードを上位分割文字コードと下位分割文字コードとに分割する(ステップS2703)。そして、ステップS2704に移行する。
 ステップS2704では、情報処理装置400は、上位分割文字コード出現頻度集計テーブルに対し、ステップS2703で得られた上位分割文字コードと同一分割文字コードの出現回数を1加算する(ステップS2704)。
 図28は、上位分割文字コード出現頻度集計テーブルを示す説明図である。上位分割文字コード出現頻度集計テーブル2800は、RAM203や磁気ディスク205などの記憶装置に記憶されており、該当する上位分割文字コードが出現する都度出現回数を1ずつ増加させる。
 また、図27において、情報処理装置400は、下位分割文字コード出現頻度集計テーブルに対し、ステップS2703で得られた下位分割文字コードと同一分割文字コードの出現回数を1加算する(ステップS2705)。
 図29は、下位分割文字コード出現頻度集計テーブルを示す説明図である。下位分割文字コード出現頻度集計テーブル2900は、RAM203や磁気ディスク205などの記憶装置に記憶されており、該当する下位分割文字コードが出現する都度出現回数を1ずつ増加させる。
 また、図27において、情報処理装置400は、2グラム文字列特定処理を実行する(ステップS2706)。2グラム文字列特定処理(ステップS2706)では、対象文字を基点とする2グラム文字列を特定する。2グラム文字列特定処理(ステップS2706)の詳細は図30で説明する。
 情報処理装置400は、2グラム文字列出現頻度集計テーブルに対し、2グラム文字列特定処理(ステップS2706)で特定された2グラム文字列の出現回数を1加算する(ステップS2707)。
 図30は、図27で示した2グラム文字列特定処理(ステップS2706)の詳細な処理手順を示すフローチャートである。まず、情報処理装置400は、対象文字に対し、対象文字は分割されたか否かを判断する(ステップS3001)。すなわち、情報処理装置400は、対象文字が分割文字コードか否かを判断する。分割されていない場合(ステップS3001:No)、すなわち、単一文字の場合、情報処理装置400は、1つ前の文字があるか否かを判断する(ステップS3002)。
 1つ前の文字がある場合(ステップS3002:Yes)、情報処理装置400は、1つ前の文字は分割されたか否かを判断する(ステップS3003)。すなわち、情報処理装置400は、1つ前の文字が分割文字コードか否かを判断する。分割されていない場合(ステップS3003:No)、すなわち、単一文字の場合、情報処理装置400は、対象文字の1つ前の単一文字と対象文字(単一文字)からなる文字列を、2グラム文字列に決定する(ステップS3004)。そして、ステップS2707に移行する。
 一方、ステップS3003において、1つ前の文字が分割された場合(ステップS3003:Yes)、すなわち、分割文字コードである場合、その1つ前の文字である分割文字コードは、下位分割文字コードとなる。したがって、情報処理装置400は、1つ前の文字である下位分割文字コードと対象文字からなる文字列を、2グラム文字列に決定する(ステップS3005)。そして、ステップS2707に移行する。
 また、ステップS3002において、1つ前の文字がない場合(ステップS3002:No)、対象文字だけとなるため、2グラム文字列を決定せずに、ステップS2707に移行する。
 また、ステップS3001において、対象文字が分割された場合(ステップS3001:Yes)、すなわち、分割文字コードである場合、情報処理装置400は、その分割文字コードが上位分割文字コードか下位分割文字コードであるかを判断する(ステップS3006)。
 上位分割文字コードである場合(ステップS3006:上位)、情報処理装置400は、1つ前の文字は分割されたか否かを判断する(ステップS3007)。すなわち、1つ前の文字が分割文字コードか否かを判断する。分割されていない場合(ステップS3007:No)、すなわち、単一文字の場合、情報処理装置400は、対象文字の1つ前の単一文字と対象文字から分割された上位分割文字コードからなる文字列を、2グラム文字列に決定する(ステップS3008)。そして、ステップS2707に移行する。
 一方、ステップS3007において、1つ前の文字が分割された場合(ステップS3007:Yes)、すなわち、分割文字コードである場合、その1つ前の文字である分割文字コードは、下位分割文字コードとなる。したがって、情報処理装置400は、1つ前の文字である下位分割文字コードと対象文字から分割された上位分割文字コードからなる文字列を、2グラム文字列に決定する(ステップS3009)。そして、ステップS2707に移行する。
 また、ステップS3006において、下位分割文字コードである場合(ステップS3006:下位)、情報処理装置400は、対象文字から分割された上位分割文字コードおよび下位分割文字コードからなる文字列を、2グラム文字列に決定する(ステップS3010)。そして、ステップS2707に移行する。
 この2グラム文字列特定処理(ステップS2706)によれば、対象文字が分割された場合であっても2グラム文字列を特定することができる。また、1文字シフトにしたがって2グラム文字列を特定するため、基礎単語の圧縮符号マップMおよび特定単一文字の圧縮符号マップMと同時並行で生成することができる。
 このように、上述した情報生成によれば、目標出現率Pw,Pcにより、マップ作成される基礎単語数および単一文字数が制限されるため、無駄なマップ作成がなくなり、マップ作成の高速化およびマップサイズの最適化を同時に実現することができる。また、1文字シフトにより複数種類のマップ作成を同時並行で実行することができ、高精度な検索に用いる複数種類のマップ作成の効率化を図ることができる。
 図31は、2グラム文字列出現頻度集計テーブルを示す説明図である。2グラム文字列出現頻度集計テーブル3100は、RAM203や磁気ディスク205などの記憶装置に記憶されており、該当する2グラム文字列が出現する都度出現回数を1ずつ増加させる。
 このあと、情報処理装置400は、対象文字の後続文字が対象ファイルFi内にあるか否かを判断し(ステップS2708)、後続文字がある場合(ステップS2708:Yes)、後続文字を対象文字に設定し(ステップS2709)、ステップS2702に戻る。一方、後続文字がない場合(ステップS2708:No)、対象ファイルFiの再集計処理(ステップS2603)を終了して、ステップS2604に移行する。
 これにより、対象ファイルFiごとに、対象ファイルFi内に存在する上位分割文字コード、下位分割文字コード、および2グラム文字列の出現回数を集計することができる。
(ハフマン木生成処理(ステップS1804))
 図32は、図18に示したハフマン木生成処理(ステップS1804)の詳細な処理手順例を示すフローチャートである。図32において、情報処理装置400は、圧縮符号長の上限長Nを決定する(ステップS3201)。つぎに、情報処理装置400は、補正処理を実行する(ステップS3202)。ここで、補正処理とは、図8~図10で説明したように、文字情報ごとの生起確率および圧縮符号長を、圧縮符号長の上限長Nを用いて補正する処理である。
 つぎに、情報処理装置400は、文字情報ごとに葉の構造体を生成する(ステップS3203)。そして、情報処理装置400は、枝数特定処理を実行する(ステップS3206)。枝数特定処理(ステップS3204)では、圧縮符号長ごとの葉当たりの枝数を特定する。枝数特定処理(ステップS3204)の詳細は図33で説明する。
 そして、情報処理装置400は、構築処理を実行する(ステップS3205)。枝数特定処理(ステップS3204)により葉の構造体ごとの枝数が特定されるため、まず、情報処理装置400は、葉の構造体ごとに、枝数分の葉へのポインタ群を生成する。そして、生成された各葉の構造体についての葉へのポインタ群を集約して根の構造体とする。これにより、2N分枝無節点ハフマン木Hが生成されることとなる。なお、生成された2N分枝無節点ハフマン木Hは、情報処理装置400内の記憶装置(RAM203や磁気ディスク205など)に格納される。このあと、図18のマップ作成処理(ステップS1805)に移行する。
 図33は、図32に示した枝数特定処理(ステップS3204)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、最大圧縮符号長CLmax(=N)と最小圧縮符号長CLmin(=M)との差分D(=N-M)を算出する(ステップS3301)。たとえば、N=11の場合、図19を参照すると、M=6である。したがって、D=5である。
 つぎに、情報処理装置400は、2のべき数の変数jをj=0とし、圧縮符号長の変数CLをCL=Nとする(ステップS3302)。そして、情報処理装置400は、j>Dであるか否かを判断する(ステップS3303)。j>Dでない場合(ステップS3303:No)、情報処理装置400は、圧縮符号長CLの葉当たりの枝数b(CL)を算出する(ステップS3304)。圧縮符号長CLの葉当たりの枝数b(CL)は、b(CL)=2jで算出される。たとえば、j=0のとき、圧縮符号長CL=N=11であるため、圧縮符号長11ビットでの葉当たりの枝数b(11)は、b(11)=2j=20=1となる。
 つぎに、情報処理装置400は、圧縮符号長CLの総枝数B(L)を算出する(ステップS3305)。圧縮符号長CLの総枝数B(L)は、B(L)=L(CL)×b(CL)で算出される。L(CL)は、圧縮符号長CLでの葉数(文字情報の種類数)である。たとえば、j=0のとき、圧縮符号長CL=N=11であるため、圧縮符号長11ビットでの総枝数B(L)は、1216×20=1216となる。
 このあと、情報処理装置400は、jをインクリメントし、圧縮符号長CLをデクリメントして(ステップS3306)、ステップS3303に戻り、インクリメント後のjがj>Dであるか否かが判断される。なお、N=11の場合は、j=Dになるとj=D=5となり、CL=M=6となる。したがって、ステップS3304では、圧縮符号長CL(5ビット)の葉当たりの枝数b(6)は、b(6)=26=64となる。同様に、総枝数B(L)は、B(6)=0×26=0となる。そして、j>Dである場合(ステップS3303:Yes)、構築処理(ステップS3205)に移行する。
 図34は、図32に示した構築処理(ステップS3205)の詳細な処理手順を示すフローチャートである。まず、情報処理装置400は、圧縮符号長CLをCL=CLmin=Mとする(ステップS3401)。つぎに、情報処理装置400は、圧縮符号長CLでの未選択の葉があるか否かを判断する(ステップS3402)。未選択の葉がある場合(ステップS3402:Yes)、情報処理装置400は、葉へのポインタ生成処理(ステップS3403)を実行して、ステップS3402に戻る。葉へのポインタ生成処理(ステップS3403)では、葉の構造体ごとに、圧縮符号長CLに応じた枝数分の葉へのポインタ群を生成する。なお、葉へのポインタ生成処理(ステップS3403)の詳細は図35で説明する。
 一方、ステップS3402において、未選択の葉がない場合(ステップS3402:No)、情報処理装置400は、CL>Nであるか否かを判断する(ステップS3404)。CL>Nでない場合(ステップS3404:No)、情報処理装置400は、CLをインクリメントして(ステップS3405)、ステップS3402に戻る。一方、CL>Nである場合(ステップS3404:Yes)、2N分枝無節点ハフマン木Hが構築されたこととなり、ステップS1805に移行することとなる。なお、第1領域~第5領域内の情報は、この構築処理(ステップS3205)において格納されることとなる。
 図35は、図34に示した葉へのポインタ生成処理(ステップS3403)の詳細な処理手順を示すフローチャートである。まず、情報処理装置400は、未選択の葉Lを選択し(ステップS3501)、選択葉へのポインタ数kをk=1に設定する(ステップS3502)。そして、情報処理装置400は、選択葉へのポインタPL(k)の先行ビット列を、選択葉の圧縮符号に設定する(ステップS3503)。たとえば、上限長N=11については、選択葉が、文字情報「0」の葉の構造体である場合、圧縮符号は「000000」である。したがって、選択葉へのポインタPL(k)の先行ビット列も、「000000」となる。
 つぎに、情報処理装置400は、選択葉へのポインタPL(k)の後続ビット列のビット長を、最大圧縮符号長Nから選択葉の圧縮符号長CLを引いた差分とし、後続ビット列の初期値をオール0に設定する(ステップS3504)。たとえば、選択葉が、文字情報「0」の葉の構造体である場合、圧縮符号長CLは6ビットであるため、後続ビット列のビット長は5ビット(=11-6)となる。k=1の場合は、後続ビット列はオール0となるため、後続ビット列は、5ビットの「00000」となる。
 そして、情報処理装置400は、選択葉へのポインタPL(k)を根の構造体に格納する(ステップS3505)。このあと、情報処理装置400は、k>b(CL)であるか否かを判断する(ステップS3506)。b(CL)は、選択葉の圧縮符号長CLの葉当たりの枝数である。k>b(CL)でない場合(ステップS3506:No)、選択葉に割り当てられたすべての枝について葉へのポインタが生成されていないため、情報処理装置400は、kをインクリメントする(ステップS3507)。
 そして、情報処理装置400は、現在の後続ビット列をインクリメントして、インクリメント後の後続ビット列を先行ビット列の末端に連結することで、あらたに、選択葉へのポインタPL(k)を生成する(ステップS3508)。そして、情報処理装置400は、選択葉へのポインタPL(k)を根の構造体に格納し(ステップS3509)、ステップS3506に戻る。ステップS3506~ステップS3509を繰り返すことで、葉当たりの枝数分の葉へのポインタ群が生成されることとなる。そして、ステップS3506において、k>b(CL)である場合(ステップS3506:Yes)、ステップS3402に移行する。
 このように、対象ファイル群Fsに出現する文字情報の種類数に応じて、2N分枝無節点ハフマン木Hの最大枝数2Nを最適な本数に設定することができるため、2N分枝無節点ハフマン木Hのサイズの適正化を図ることができる。また、本実施の形態によれば、上限長Nが2~4の整数倍でない場合(たとえば、上限長N=11,13)であっても、圧縮効率のよい2N分枝無節点ハフマン木Hを生成することができる。
 このあと、情報処理装置400は、2N分枝無節点ハフマン木Hの各葉の構造体と、基礎単語の構造体,特定文字コードの構造体,分割文字コードの構造体とを、図10の文字情報テーブルを参照して、相互に関連付ける。具体的には、上述したように、葉の構造体には、当該葉に格納されている圧縮符号に対応する特定文字、分割文字コードおよび葉へのポインタや基礎単語へのポインタを格納する。
 また、情報処理装置400は、基礎単語の構造体の基礎単語ごとに、対応する圧縮符号を格納する葉へのポインタを格納する。また、情報処理装置400は、特定文字コードの構造体の特定文字ごとに、対応する圧縮符号を格納する葉へのポインタを格納する。また、情報処理装置400は、分割文字コードの構造体の分割文字コードごとに、対応する圧縮符号を格納する葉へのポインタを格納する。
(マップ作成処理(ステップS1805))
 図36は、図30に示したマップ作成処理(ステップS1805)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、ファイル番号iをi=1に設定し(ステップS3601)、対象ファイルFiを読み込む(ステップS3602)。そして、情報処理装置400は、対象ファイルFiのマップ作成処理を実行する(ステップS3603)。対象ファイルFiのマップ作成処理(ステップS3603)の詳細は、図38で説明する。このあと、情報処理装置400は、ファイル番号iがi>n(nは対象ファイルF1~Fnの総数)であるか否かを判断する(ステップS3604)。
 i>nでない場合(ステップS3604:No)、情報処理装置400は、iをインクリメントし(ステップS3605)、ステップS3602に戻る。一方、i>nである場合(ステップS3604:Yes)、マップ作成処理(ステップS1805)が終了する。このマップ作成処理(ステップS1805)によれば、対象ファイルFiごとに対象ファイルFiのマップ作成処理(ステップS3603)を実行することができる。
 図37は、図36に示した対象ファイルFiのマップ作成処理(ステップS3603)の詳細な処理手順を示すフローチャートである。まず、情報処理装置400は、対象文字を対象ファイルFiの先頭文字とし(ステップS3701)、基礎単語出現マップ作成処理(ステップS3702)、特定単一文字出現マップ作成処理(ステップS3703)、2グラム文字列出現マップ作成処理(ステップS3704)を実行する。
 基礎単語出現マップ作成処理(ステップS3702)の詳細は図38で説明する。また、特定単一文字出現マップ作成処理(ステップS3703)の詳細は図39で説明する。さらに、2グラム文字列出現マップ作成処理(ステップS3704)の詳細は図41で説明する。
 このあと、情報処理装置400は、対象文字が対象ファイルFiの末尾文字であるか否かを判断する(ステップS3705)。対象文字が対象ファイルFiの末尾文字でない場合(ステップS3705:No)、情報処理装置400は、対象文字を末尾方向へ1文字シフトし(ステップS3706)、ステップS3702に戻る。一方、対象文字が対象ファイルFiの末尾文字である場合(ステップS3705:Yes)、ステップS3604に移行して、対象ファイルFiのマップ作成処理(ステップS3603)を終了する。
 この対象ファイルFiのマップ作成処理(ステップS3603)によれば、基礎単語出現マップ、特定単一文字出現マップおよび2グラム文字列出現マップを、対象文字を1文字ずつシフトしながら、同時並行で生成することができる。
 図38は、図37で示した基礎単語出現マップ作成処理(ステップS3702)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、対象文字について最長一致検索処理を実行する(ステップS3801)。最長一致検索処理(ステップS3801)の詳細な処理手順は、図22に示した最長一致検索処理(ステップS2201)と同一処理内容であるため説明を省略する。
 そして、情報処理装置400は、最長一致した基礎単語、すなわち、基礎単語があるか否かを判断する(ステップS3802)。最長一致した基礎単語がない場合(ステップS3802:No)、特定単一文字出現マップ作成処理(ステップS3703)に移行する。一方、最長一致した基礎単語がある場合(ステップS3802:Yes)、情報処理装置400は、その最長一致した基礎単語について、基礎単語出現マップが設定済みであるか否かを判断する(ステップS3803)。
 設定済みである場合(ステップS3803:Yes)、ステップS3806に移行する。一方、設定済みでない場合(ステップS3803:No)、情報処理装置400は、2N分枝無節点ハフマン木Hにおける最長一致した基礎単語の葉にアクセスして、その圧縮符号を取得する(ステップS3804)。そして、情報処理装置400は、取得した圧縮符号を、最長一致した基礎単語についての基礎単語出現マップへのポインタに設定して(ステップS3805)、ステップS3806に移行する。このあと、ステップS3806では、情報処理装置400は、最長一致した基礎単語についての基礎単語出現マップの対象ファイルFiのビットをONにする(ステップS3806)。
 これにより、基礎単語出現マップ作成処理(ステップS3702)を終了し、特定単一文字出現マップ作成処理(ステップS3703)に移行する。この基礎単語出現マップ作成処理(ステップS3702)によれば、対象文字ごとに最長一致した基礎単語を基礎単語としてマップ作成することができる。
 図39は、図37で示した特定単一文字出現マップ作成処理(ステップS3703)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、特定単一文字の構造体に対して対象文字の2分探索をおこない(ステップS3901)、一致したか否かを判断する(ステップS3902)。一致する単一文字がなかった場合(ステップS3902:No)、情報処理装置400は、分割文字コード出現マップ作成処理を実行して(ステップS3903)、2グラム文字列出現マップ作成処理(ステップS3704)に移行する。分割文字コード出現マップ作成処理(ステップS3903)の詳細は図40で説明する。
 一方、ステップS3902において、2分探索により対象文字と一致する単一文字があった場合(ステップS3902:Yes)、情報処理装置400は、2N分枝無節点ハフマン木Hにおける2分探索された単一文字の葉にアクセスして、その圧縮符号を取得する(ステップS3904)。そして、情報処理装置400は、その取得された圧縮符号について、特定単一文字出現マップが設定済みであるか否かを判断する(ステップS3905)。設定済みである場合(ステップS3905:Yes)、ステップS3907に移行する。
 一方、設定済みでない場合(ステップS3905:No)、情報処理装置400は、取得した圧縮符号を、2分探索された単一文字についての特定単一文字出現マップへのポインタに設定して(ステップS3906)、ステップS3907に移行する。このあと、ステップS3907では、2分探索された単一文字についての特定単一文字出現マップの対象ファイルFiのビットをONにする(ステップS3907)。
 これにより、特定単一文字出現マップ作成処理(ステップS3703)を終了し、2グラム文字列出現マップ作成処理(ステップS3704)に移行する。この特定単一文字出現マップ作成処理(ステップS3703)によれば、2分探索された対象文字を特定単一文字としてマップ作成することができる。
 図40は、図39で示した分割文字コード出現マップ作成処理(ステップS4003)の詳細な処理手順例を示すフローチャートである。まず、情報処理装置400は、対象文字を分割し(ステップS4001)、2N分枝無節点ハフマン木Hにおける上位分割文字コードの葉にアクセスして、圧縮符号を取得する(ステップS4002)。そして、情報処理装置400は、その取得された圧縮符号について、上位分割文字コード出現マップが設定済みであるか否かを判断する(ステップS4003)。
 設定済みである場合(ステップS4003:Yes)、ステップS4005に移行する。一方、設定済みでない場合(ステップS4003:No)、情報処理装置400は、取得した圧縮符号を、上位分割文字コードの出現マップへのポインタに設定して(ステップS4004)、ステップS4005に移行する。このあと、ステップS4005では、情報処理装置400は、対象文字から分割された上位分割文字コードの出現マップの対象ファイルFiのビットをONにする(ステップS4005)。
 また、情報処理装置400は、2N分枝無節点ハフマン木Hにおける下位分割文字コードの葉にアクセスして、圧縮符号を取得する(ステップS4006)。そして、情報処理装置400は、その取得された圧縮符号について、下位分割文字コードの出現マップが設定済みであるか否かを判断する(ステップS4007)。設定済みである場合(ステップS4007:Yes)、ステップS4009に移行する。
 一方、設定済みでない場合(ステップS4007:No)、情報処理装置400は、取得した圧縮符号を、下位分割文字コードの出現マップへのポインタに設定して(ステップS4008)、ステップS4009に移行する。このあと、ステップS4009では、情報処理装置400は、対象文字から分割された下位分割文字コードの出現マップの対象ファイルFiのビットをONにする(ステップS4009)。
 これにより、分割文字コード出現マップ作成処理(ステップS4003)を終了し、2グラム文字列出現マップ作成処理(ステップS3704)に移行する。この分割文字コード出現マップ作成処理(ステップS4003)によれば、目標出現率Pcに応じた順位よりも下位の単一文字については、出現頻度が低いため、OFFのビットが多数出現することとなる。
 しかしながら、目標出現率Pcに応じた順位よりも下位の単一文字については特定単一文字の出現マップの生成対象外とすることで、特定単一文字の圧縮符号マップMのマップサイズの最適化を図ることができる。また、分割することで、目標出現率Pcに応じた順位よりも下位の単一文字については、上位分割文字コードの圧縮符号マップMおよび下位分割文字コードの圧縮符号マップMといったマップサイズが固定化されたマップに設定される。したがって、目標出現率Pcをどのような出現率に設定しても、マップサイズの増大化を防止でき、省メモリ化を図ることができる。
 図41は、図37に示した2グラム文字列マップ作成処理(ステップS3704)の詳細な処理手順例を示すフローチャートである。図41において、まず、情報処理装置400は、2グラム文字列特定処理を実行する(ステップS4101)。2グラム文字列特定処理(ステップS4101)の詳細な処理手順は、図30に示した2グラム文字列特定処理(ステップS2706)と同一処理内容であるため説明を省略する。
 つぎに、情報処理装置400は、2グラム文字列特定処理(ステップS4101)により2グラム文字列が特定されたか否かを判断する(ステップS4102)。特定されなかった場合(ステップS4102:No)、図37のステップS3705に移行する。
 一方、特定された場合(ステップS4102:Yes)、情報処理装置400は、2グラム文字列出現マップ生成処理を実行して(ステップS4103)、ステップS3705に移行する。
 図42は、2グラム文字列出現マップ生成処理(ステップS4103)の詳細な処理手順例を示すフローチャートである。図42において、まず、情報処理装置400は、図41の2グラム文字列特定処理(ステップS4101)で特定された2グラム文字列の第1グラム(特定単一文字または分割文字コード)について、2N分枝無節点ハフマン木Hの葉にアクセスして、圧縮符号を取得する(ステップS4201)。同様に、情報処理装置400は、第2グラム(特定単一文字または分割文字コード)について、2N分枝無節点ハフマン木Hの葉にアクセスして、圧縮符号を取得する(ステップS4202)。
 そして、情報処理装置400は、第1グラムの圧縮符号と第2グラムの圧縮符号を連結する(ステップS4203)。そして、情報処理装置400は、連結圧縮符号をポインタとする出現マップが設定済みであるか否かを判断する(ステップS4204)。設定済みである場合(ステップS4204:Yes)、ステップS4206に移行する。
 一方、設定済みでない場合(ステップS4204:No)、情報処理装置400は、連結圧縮符号を、特定された2グラム文字列の出現マップへのポインタに設定する(ステップS4205)。このあと、ステップS4206では、情報処理装置400は、特定された2グラム文字列の出現マップの対象ファイルFiのビットをONにする(ステップS4206)。
 これにより、2グラム文字列出現マップ生成処理(ステップS4103)を終了し、ステップS3705に移行する。この2グラム文字列出現マップ生成処理(ステップS4203)によれば、2グラム文字列の連結圧縮符号により、2グラム文字列の出現マップを直接指定することができる。
<圧縮処理の具体例>
 つぎに、対象ファイルFiの圧縮処理の具体例について説明する。上述のように、圧縮符号マップMを生成した場合は、検索文字列を圧縮した圧縮符号列により圧縮符号マップM内の出現マップをポイントすることが可能となる。以下、圧縮処理の具体例について説明する。
 図43は、2N分枝無節点ハフマン木Hを用いた圧縮処理の具体例を示す説明図である。まず、情報処理装置400は、対象ファイル群Fsから1文字目の圧縮対象文字コードを取得し、対象ファイルFi上の位置を保持しておく。そして、情報処理装置400は、基礎単語の構造体1600に対して2分木探索をおこなう。基礎単語は2文字以上の文字コード列であるため、1文字目の圧縮対象文字コードがヒットした場合、2文字目の文字コードを圧縮対象文字コードとして取得する。
 そして、2文字目の文字コードは、1文字目の圧縮対象文字コードがヒットした位置から探索する。3文字目以降も、不一致の圧縮対象文字コードが出現するまで繰り返し2分木探索をおこなう。一致する基礎単語ra(aは葉の番号)が探索された場合、基礎単語の構造体1600において対応付けされている葉Laへのポインタにより葉Laの構造体にアクセスする。そして、情報処理装置400は、アクセス先の葉Laの構造体に格納されている基礎単語raの圧縮符号を探索して、圧縮バッファ4300に格納する。
 一方、不一致の圧縮文字コードが出現した場合、基礎単語の構造体1600に対する2分木探索を終了する(EOT(End Of Transmission)まで進む)。そして、情報処理装置400は、1文字目の圧縮対象文字コードを再度レジスタにセットして、特定単一文字の構造体1400に対する2分木探索をおこなう。
 一致する文字コードeb(bは葉の番号)が探索された場合、情報処理装置400は、その葉Lbへのポインタにより葉Lbの構造体にアクセスする。そして、情報処理装置400は、アクセス先の葉Lbの構造体に格納されている文字コードebの圧縮符号を探索して、圧縮バッファ4300に格納する。
 一方、一致する文字コードが出現せず2分木探索を終了した場合、圧縮対象文字コードは特定単一文字コードではないため、情報処理装置400は、上位8ビットと下位8ビットに分割する。そして、情報処理装置400は、上位8ビットの分割文字コードについて、分割文字コードの構造体1500に対する2分木探索をおこなう。一致する分割文字コードDc1(c1は葉の番号)が探索された場合、情報処理装置400は、その葉Lc1へのポインタにより葉Lc1の構造体にアクセスする。そして、情報処理装置400は、アクセス先の葉Lc1の構造体に格納されている分割文字コードDc1の圧縮符号を探索して、圧縮バッファ4300に格納する。
 引き続き、情報処理装置400は、下位8ビットの分割文字コードについて、分割文字コードの構造体に対する2分木探索をおこなう。一致する分割文字コードDc2(c2は葉の番号)が探索された場合、情報処理装置400は、その葉Lc2へのポインタにより葉Lc2の構造体にアクセスする。そして、情報処理装置400は、アクセス先の葉Lc2の構造体に格納されている分割文字コードDc2の圧縮符号を探索して、圧縮バッファ4300に格納する。これにより、対象ファイルFiが圧縮されることとなる。
<対象ファイル群Fsの圧縮処理>
 つぎに、第1圧縮部403による対象ファイル群Fsの圧縮処理の処理手順について説明する。
 図44は、第1圧縮部403による2N分枝無節点ハフマン木Hを用いた対象ファイル群Fsの圧縮処理手順例を示すフローチャートである。まず、情報処理装置400は、ファイル番号:pをp=1とし(ステップS4401)、対象ファイルFpを読み込む(ステップS4402)。つぎに、情報処理装置400は、圧縮処理を実行して(ステップS4403)、ファイル番号:pをインクリメントする(ステップS4404)。圧縮処理(ステップS4403)の詳細は図45で説明する。
 そして、情報処理装置400は、p>nであるか否かを判断する(ステップS4405)。nは対象ファイル群Fsの総数である。p>nでない場合(ステップS4405:No)、ステップS4402に戻る。一方、p>nである場合(ステップS4405:Yes)、対象ファイル群Fsの圧縮処理を終了する。
 図45は、図44に示した圧縮処理(ステップS4403)の詳細な処理手順を示すフローチャート(その1)である。図45において、まず、情報処理装置400は、対象ファイル群Fsに圧縮対象文字コードがあるか否かを判断する(ステップS4501)。ある場合(ステップS4501:Yes)、情報処理装置400は、圧縮対象文字コードを取得してレジスタにセットする(ステップS4502)。そして、情報処理装置400は、先頭の圧縮対象文字コードか否かを判断する(ステップS4503)。
 ここで、先頭の圧縮対象文字コードとは、未圧縮の1文字目の文字コードをいう。先頭である場合(ステップS4503:Yes)、情報処理装置400は、その圧縮対象文字コードの対象ファイル群Fs上の位置(先頭位置)となるポインタを取得し(ステップS4504)、ステップS4505に移行する。一方、先頭でない場合(ステップS4503:No)、先頭位置を取得せずにステップS4505に移行する。
 そして、情報処理装置400は、基礎単語の構造体1600に対して2分木探索をおこなう(ステップS4505)。圧縮対象文字コードが一致した場合(ステップS4506:Yes)、情報処理装置400は、連続して一致した文字コード列が基礎単語(の文字コード列)に該当するか否かを判断する(ステップS4507)。該当しない場合(ステップS4507:No)、情報処理装置400は、ステップS4502に戻って後続の文字コードを圧縮対象文字コードとして取得する。この場合、後続の文字コードは先頭ではないため、先頭位置は取得しないこととなる。
 一方、ステップS4507において、基礎単語に該当する場合(ステップS4507:Yes)、情報処理装置400は、該当する基礎単語の葉L♯へのポインタにより葉L♯の構造体にアクセスする(ステップS4508)。そして、情報処理装置400は、ポイントされた葉L♯の構造体に格納されている基礎単語の圧縮符号を抽出する(ステップS4509)。
 この後、情報処理装置400は、抽出された圧縮符号を圧縮バッファ4300に格納して(ステップS4510)、ステップS4501に戻る。このループが基礎単語の圧縮処理の流れとなる。ステップS4501において、圧縮対象文字コードがない場合(ステップS4501:No)、情報処理装置400は、対象ファイルFpから圧縮された圧縮ファイルfpを圧縮バッファ4300からファイル出力して保存する(ステップS4511)。そして、ステップS4404に移行する。一方、ステップS4506において不一致となった場合(ステップS4506:No)、16ビットの文字コードの圧縮処理のループに入る。
 図46は、図44に示した圧縮処理(ステップS4403)の詳細な処理手順を示すフローチャート(その2)である。図46において、情報処理装置400は、ステップS4604で取得された先頭位置のポインタを参照して、対象ファイル群Fsから圧縮対象文字コードを取得してレジスタにセットする(ステップS4601)。
 つぎに、情報処理装置400は、圧縮対象文字コードについて、特定単一文字の構造体1400に対して2分木探索をおこなう(ステップS4602)。一致した場合(ステップS4603:Yes)、情報処理装置400は、該当する文字の葉L♯へのポインタにより葉L♯の構造体にアクセスする(ステップS4604)。そして、情報処理装置400は、ポイントされた葉L♯の構造体に格納されている圧縮対象文字コードの圧縮符号を抽出する(ステップS4605)。
 この後、情報処理装置400は、探索された圧縮符号を圧縮バッファ4300に格納して(ステップS4606)、ステップS4501に戻る。このループが16ビットの文字コードの圧縮処理の流れとなる。一方、ステップS4603において一致する文字コードが存在しなかった場合(ステップS4603:No)、分割文字コードの圧縮処理のループに入る。
 図47は、図44に示した圧縮処理(ステップS4403)の詳細な処理手順を示すフローチャート(その3)である。図47において、まず、情報処理装置400は、圧縮対象文字コードを上位8ビットと下位8ビットとに分割し(ステップS4701)、上位8ビットの分割文字コードを抽出する(ステップS4702)。そして、情報処理装置400は、分割文字コードの構造体1500に対して2分木探索をおこなう(ステップS4703)。
 そして、情報処理装置400は、探索された分割文字コードの葉L♯へのポインタにより葉L♯の構造体にアクセスする(ステップS4704)。そして、情報処理装置400は、ポイントされた葉L♯の構造体に格納されている分割文字コードの圧縮符号を抽出する(ステップS4705)。この後、情報処理装置400は、探索された圧縮符号を圧縮バッファ4300に格納する(ステップS4706)。
 つぎに、情報処理装置400は、下位8ビットが探索済みか否かを判断し(ステップS4707)、探索済みでない場合(ステップS4707:No)、情報処理装置400は、下位8ビットの分割文字コードを抽出して(ステップS4708)、ステップS4703~S4706を実行する。一方、下位8ビットが探索済みである場合(ステップS4707:Yes)、ステップS4601に戻り、基礎単語の圧縮処理のループに入る。
 このように、2N分枝無節点ハフマン木Hを用いた圧縮処理では、内部節点がないため根に向かって探索する必要はなく、ポイントされた葉L♯の構造体に格納されている文字情報を抽出して、圧縮バッファ4300に書き込むだけでよい。したがって、圧縮処理の高速化を図ることができる。
 また、圧縮対象文字コードが格納されている葉L♯の構造体を、基礎単語の構造体、特定単一文字コードの構造体および分割文字コードの構造体により即座に特定することができる。したがって、2N分枝無節点ハフマン木Hの葉を探索する必要がなく、圧縮処理の高速化を図ることができる。また、低位文字コードを上位ビットコードと下位ビットコードに分割することで、非特定単一文字を256種の分割文字コードの圧縮符号に圧縮することができる。したがって、圧縮率の向上を図ることができる。
<マップ圧縮の具体例>
 つぎに、第2圧縮部406による圧縮符号マップM内の各出現マップのマップ圧縮の具体例について説明する。第2圧縮部406は、圧縮領域内の出現マップを圧縮し、非圧縮領域の出現マップは圧縮しない。圧縮領域とは、ファイル番号1~nまで採番されている場合に、α×(n/αの商)となるファイル番号までの出現マップのビット列である。nは現在の対象ファイルの総数である。たとえば、α=256ビットであり、現在の対象ファイル数n=600である場合、n/αの商は2となるため、ファイル番号1~2αまでの出現マップのビット列が圧縮領域となる。そして、ファイル番号(2α+1)~nまでのビット列は非圧縮領域となり圧縮されない。
 また、出現マップのビット列は、ファイル総数αが増大することで、ビット列内の“0”が連続する箇所も多くなる。また、出現頻度が高い文字情報については、これとは逆に“1”が連続する箇所が多くなる。したがって、文字の出現率に応じた出現率領域を設定する。出現率領域とは、出現率の範囲である。出現率領域に応じて、出現マップ圧縮用のハフマン木hを割り当てることとする。
 図48は、出現率と出現率領域との関係を示す説明図である。出現率が0~100%の範囲とすると、図48に示したように、A~E領域およびA´~E´領域に領域分割することができる。したがって、A~E領域およびA´~E´領域で特定された出現率領域に応じて、出現マップ圧縮用のハフマン木hを圧縮パターンとして割り当てる。
 図49は、出現率領域別の圧縮パターンを有する圧縮パターンテーブルを示す説明図である。出現率は、図13に示したように、葉L#の構造体の第5領域に格納されているため、葉L#の構造体が指定されることで、圧縮パターンテーブル4900を参照して、圧縮パターンが特定されることとなる。なお、A領域およびA´領域は、非圧縮のため、圧縮パターンとなるハフマン木は存在しない。
 図50は、B領域およびB´領域の場合の圧縮パターンを示す説明図である。圧縮パターン5000は、葉が16種のハフマン木hとなる。
 図51は、C領域およびC´領域の場合の圧縮パターンを示す説明図である。圧縮パターン5100は、葉が16種+1種のハフマン木hとなる。圧縮パターン5100では、B領域およびB´領域に比べて、“0”が連続する箇所または“1”が連続する箇所が確率的に多くなる。したがって、16ビット連続して値が“0”であるビット列に、符号語“00”が割り当てられている。
 図52は、D領域およびD´領域の場合の圧縮パターンを示す説明図である。圧縮パターン5200は、葉が16種+1種のハフマン木となる。圧縮パターン5200では、C領域およびC´領域に比べて、“0”が連続する箇所または“1”が連続する箇所が確率的に多くなる。したがって、32ビット連続して値が“0”であるビット列に、符号語“00”が割り当てられている。
 図53は、E領域およびE´領域の場合の圧縮パターンを示す説明図である。圧縮パターン5300は、葉が16種+1種のハフマン木となる。圧縮パターン5300では、D領域およびD´領域に比べて、“0”が連続する箇所または“1”が連続する箇所が確率的に多くなる。したがって、64ビット連続して値が“0”であるビット列に、符号語“00”が割り当てられている。このように、出現率領域に応じて、文字コードが存在しないことを意味する“0”の連続数が増加するため、文字コードの出現率に応じて圧縮符号マップMの圧縮効率の向上を図ることができる。
(圧縮符号マップ圧縮処理手順)
 つぎに、圧縮符号マップ圧縮処理について説明する。圧縮符号マップ圧縮処理は、圧縮領域のビット列を圧縮する処理である。具体的には、図49に示した圧縮パターンテーブル4900と図50~図53に示した圧縮パターン5000~5300(ハフマン木h)を用いて、圧縮符号マップMの圧縮領域のビット列を圧縮する。以下、圧縮符号マップ圧縮処理手順について説明する。
 図54は、圧縮符号マップM圧縮処理手順を示すフローチャートである。図54において、まず、情報処理装置400は、圧縮符号マップM群Msにおいて、未選択の出現マップへのポインタがあるか否かを判断する(ステップS5401)。未選択のアドレスがある場合(ステップS5401:Yes)、情報処理装置400は、未選択のアドレスを選択して葉L#の構造体にアクセスし(ステップS5402)、葉L#の構造体の第1領域の中から文字コードを取得する(ステップS5403)。そして、情報処理装置400は、アクセス先の葉L#の構造体の第5領域から出現率領域を取得することで、取得された文字コードの出現率領域を特定する(ステップS5404)。
 このあと、情報処理装置400は、図52の圧縮パターンテーブルを参照して、特定された出現率領域が非圧縮領域(たとえば、出現率領域A、A´)であるか否かを判断する(ステップS5405)。非圧縮領域である場合(ステップS5405:Yes)、ステップS5401に戻り、つぎのアドレスを選択する。
 一方、非圧縮領域でない場合(ステップS5405:No)、情報処理装置400は、特定された出現率領域により、図50~図53に示した圧縮パターン5000~5300(ハフマン木h)の中から該当する圧縮パターン(ハフマン木h)を選択する(ステップS5406)。また、情報処理装置400は、圧縮対象となる取得文字コードの出現マップにおける圧縮領域のビット列を抽出する(ステップS5407)。
 そして、情報処理装置400は、取得文字コードの出現率が50%以上であるか否かを判断する(ステップS5408)。出現率とは、上述したように、対象ファイル群Fs内の全ファイル数を母集団(分母)とし、当該文字情報が存在するファイル数を分子とした値である。出現率領域は、出現率に応じて決められているため(図48を参照)、出現率領域がA~Eである場合、取得文字コードの出現率が50%以上でないと判断する。一方、出現率領域がA´~E´である場合、情報処理装置400は、取得文字コードの出現率が50%以上であると判断する。
 そして、出現率が50%以上である場合(ステップS5408:Yes)、情報処理装置400は、圧縮効率を上げるために、ステップS5407で抽出されたビット列を反転する(ステップS5409)。たとえば、抽出されたビット列が“1110”である場合、“0001”にして、“0”の個数を増やす。そして、情報処理装置400は、反転後のビット列を、ステップS5406で選択したハフマン木を用いて圧縮して、記憶装置(たとえば、フラッシュメモリや磁気ディスク205)に格納する(ステップS5410)。そして、ステップS5401に戻る。このように、ビット列反転をおこなうことで、出現率領域A´~E´のハフマン木hを用意する必要がないため、省メモリ化を図ることができる。
 一方、ステップS5408において、出現率が50%以上でない場合(ステップS5408:No)、情報処理装置400は、ビット列反転(ステップS5409)をおこなうことなく、ステップS5407で抽出されたビット列を、ステップS5406で選択したハフマン木を用いて圧縮して(ステップS5410)、ステップS5401に戻る。また、ステップS5401において、未選択のアドレスがない場合(ステップS5401:No)、圧縮符号マップ圧縮処理を終了する。
 このような圧縮符号マップ圧縮処理手順により、図1(A)に示したように、文字情報ごとに圧縮領域内のビット列が、出現率に応じて圧縮される。このように、出現率領域に応じて、文字情報が存在しないことを意味する“0”の連続数が増加するため、文字情報の出現率に応じて圧縮符号マップMの圧縮効率の向上を図ることができる。
 また、対象ファイルが後から追加されると、追加された対象ファイルを圧縮する際、圧縮符号マップMにも文字の存否を示すビット列を追加する必要がある。圧縮前の圧縮符号マップMでは、ファイル番号:1~nの出現マップのビット列については、圧縮パターン5000~5300により圧縮されてレコードごとに符号長が異なる。すなわち、可変長であるため圧縮領域となる。
 したがって、図1(A)に示したように、圧縮符号列の先頭(ファイル番号n側)は整列するが末尾(ファイル番号1側)が整列しない。仮に、ビット列の並びを、ファイル番号:1~nの順に、圧縮符号マップMへのポインタ(文字情報の圧縮符号)側から割り当てると、追加ファイルのビット列は、圧縮符号列の末尾側に挿入することとなり、圧縮符号列と追加ファイルのビット列とが非連続となってしまう。したがって、あらかじめ、圧縮符号マップM群Msの圧縮領域のビット列を、先頭位置から末尾位置にかけて対象ファイル群Fsのファイル番号pの降順に配列しておく。そして、圧縮符号マップMにおいて、出現マップへのポインタ(文字情報の圧縮符号)と圧縮領域との間に非圧縮領域を設定する。
 図1(C)に示すように、ファイル番号;1~nのうち圧縮符号列が整列する側にファイル番号:n+1のビットを割り当てる。これにより、ファイル番号;1~nのビット列を圧縮した場合でも、非圧縮のファイル番号:n+1~2nのビット列を挿入しても、ファイル番号順にビット列を連続させることができる。これにより、ファイル番号;1~nのビット列が圧縮されても、追加ファイルのファイル番号とそのビットとのずれがなく、対象ファイルの絞込みを正確に実行することができる。
<機能的構成例2>
 図55は、本実施の形態にかかる情報処理装置400の機能的構成例2を示すブロック図である。図55において、情報処理装置400は、指定部5501と、第1伸長部5502と、第1圧縮部403と、入力部5503と、抽出部5504と、第2伸長部5505と、特定部5506と、更新部5507と、を備える。指定部5501~更新部5507は、具体的には、たとえば、図2に示したROM202、RAM203、磁気ディスク205などの記憶装置に記憶されたプログラムをCPU201に実行させることによりその機能を実現する。なお、指定部5501~更新部5507は、それぞれ実行結果を記憶装置に書き込んだり、他の部の実行結果を読み出したりして、それぞれ演算を実行する。以下、指定部5501~更新部5507について簡単に説明する。
 指定部5501は、対象ファイル群Fs内のいずれかの対象ファイルのオープン指定を受け付ける。具体的には、キーボード、マウス、タッチパネルをユーザが操作することで、指定部5501は、対象ファイルFiのオープン指定を受け付ける。当該オープン指定が受け付けられると、圧縮符号マップMにおいて、オープン指定された対象ファイルFiのファイル番号iに関連付けられている圧縮ファイルfiへのポインタが指定される。これにより、ポイント先となるアドレスに格納されている、オープン指定された対象ファイルFiの圧縮ファイルfiが読み出される。
 また、指定部5501は、オープンされている対象ファイルFiの保存指定を受け付ける。具体的には、キーボード、マウス、タッチパネルをユーザが操作することで、指定部5501は、対象ファイルFiの保存指定を受け付ける。当該保存指定が受け付けられると、保存指定された対象ファイルFiが第1圧縮部403により2N分枝無節点ハフマン木Hで圧縮され、圧縮ファイルfiとして記憶装置内に保存される。
 第1伸長部5502は、対象ファイルFiの圧縮ファイルfiを、2N分枝無節点ハフマン木Hで伸長する。具体的には、たとえば、第1伸長部5502は、指定部5501によってオープン指定された対象ファイルFiの圧縮ファイルfiを、2N分枝無節点ハフマン木Hで伸長する。また、後述する特定部5506で特定された対象ファイルFiについても2N分枝無節点ハフマン木Hで伸長する。伸長の具体例については後述する。
 入力部5503は、検索文字列の入力を受け付ける。具体的には、キーボード、マウス、タッチパネルをユーザが操作することで、入力部5503は、検索文字列の入力を受け付ける。
 抽出部5504は、入力部5503によって入力された検索文字列内の文字情報の圧縮符号を2N分枝無節点ハフマン木Hから抽出する。具体的には、たとえば、抽出部5504は、検索文字列から、特定単一文字、上位分割文字コード、下位分割文字コード、2グラム文字列、および基礎単語のうち該当する文字情報を抽出する。
 たとえば、検索文字列が「人形」である場合、特定単一文字「人」、「形」と、2グラム文字列「人形」が抽出される。そして、抽出部5504は、抽出された文字情報の圧縮符号を2N分枝無節点ハフマン木Hで特定し、圧縮符号マップMの該当する出現マップを抽出する。たとえば、特定単一文字「人」の圧縮済みの出現マップと、「形」の圧縮済みの出現マップと、2グラム文字列「人形」の圧縮済みの出現マップとが抽出される。
 第2伸長部5505は、抽出部5504によって抽出された圧縮済みの出現マップを伸長する。具体的には、文字情報の出現率から出現率領域が特定できるため、第2伸長部5505は、特定された出現率領域に応じたマップ用のハフマン木により、圧縮済みの出現マップの圧縮領域を伸長する。たとえば、上記の例では、図1(B)に示したように、特定単一文字「人」の圧縮済みの出現マップと、「形」の圧縮済みの出現マップと、2グラム文字列「人形」の圧縮済みの出現マップとが、伸長される。
 特定部5506は、第2伸長部5505による伸長後の出現マップ群および削除マップDのAND演算を実行することで、検索文字列内の文字情報を含む対象ファイルの圧縮ファイルを圧縮ファイル群から特定する。上記の例では、図1(B)に示したように、特定部5506は、特定単一文字「人」の圧縮済みの出現マップと、「形」の圧縮済みの出現マップと、2グラム文字列「人形」の圧縮済みの出現マップと、削除マップDと、をAND演算する。特定部5506までの処理が、情報処理装置400内の抽出装置での処理となる。
 これにより、ファイル番号3(の圧縮ファイルf3)が特定される。第1伸長部5502では、特定部5506によって特定された圧縮ファイル(上記の例では圧縮ファイルf3)を2N分枝無節点ハフマン木Hで伸長することとなる。
 更新部5507は、オープン中の対象ファイルを更新して保存する場合、あらたなファイル番号を採番して、圧縮符号マップMおよび削除マップDについて、あらたなファイル番号についてのビットを設定する。圧縮符号マップMでは「0」(OFF)、削除マップDでは「1」(ON)とする。
 そして、更新される対象ファイル内の文字情報を集計部401により集計して、1回でも出現した文字情報については、あらたに採番されたファイル番号のビットをONにする。また、削除マップDにおけるオープンしたときのファイル番号のビットをOFFにする。また、新たに採番されたファイル番号については、更新部5507は、更新後の圧縮ファイルのアドレスをポインタとして関連付ける。これにより、更新後において、あらたに採番されたファイル番号が指定された場合、指定部5501により、更新後の圧縮ファイルが指定されることになる。更新部5507の詳細については後述する。
<ファイル伸長例>
 つぎに、ファイル伸長例について説明する。圧縮ファイルfiを伸長する場合、対象ファイルFiをオープンするにあたり、直接ファイル番号iを指定する方法(G1)と、検索文字列によりオープンさせる対象ファイルFiを絞り込む方法(G2)がある。前者(G1)については図56で説明し、後者(G2)については図57で説明する。なお、(G1)および(G2)のいずれについても、本実施の形態の更新前と更新後のいずれの場合にも実行することができる。
 図56は、ファイル伸長例(G1)を示す説明図である。ファイル伸長例(G1)で示す処理は、指定部5501および第1伸長部5502により実行される。ここでは、例としてファイル番号3をオープン指定することとする。なお、図56中、符号5600は圧縮符号マップMの管理領域である。管理領域5600には、出現マップのビットに対応するファイル番号i(i=1~n)が記憶されている。また、管理領域5600には、ファイル番号iで特定される圧縮ファイルfiの格納先と指定するポインタが、そのファイル番号iに関連付けられて保存されている。したがって、ファイル番号iが指定されると、その圧縮ファイルfiがポイントされて読み出すことができる。
 (G11)まず、指定部5501により対象ファイルF3のオープン指定がされる。圧縮符号マップMのファイル番号3は、対象ファイルF3の圧縮ファイルf3へのポインタに関連付けられている。(G12)したがって、当該ポインタにより、圧縮ファイルf3が抽出される。(G13)抽出された圧縮ファイルf3は、2N分枝無節点ハフマン木Hで伸長される。詳細な伸長処理については後述する。
 図57は、ファイル伸長例(G2)を示す説明図である。ファイル伸長例(G2)で示す処理は、入力部5503、抽出部5504、第2伸長部5505、特定部5506、第1伸長部5502により実行される。(G21)まず、入力部5503により検索文字列「人形」が入力された場合、検索文字列「人形」を構成する文字「人」、「形」について特定単一文字の構造体1400に対し2分探索することで、特定単一文字「人」、「形」が検索される。特定単一文字の構造体1400には、2N分枝無節点ハフマン木Hの葉(特定単一文字)へのポインタが関連付けられている。したがって、特定単一文字の構造体でヒットすると、2N分枝無節点ハフマン木Hの葉を直接指定することができる。
 (G22)2N分枝無節点ハフマン木Hの葉を直接指定すると、当該葉の構造体内の照合フラグがONに設定され、圧縮符号が抽出される。圧縮符号は特定単一文字の出現マップへのポインタとなるため、直接指定することができる。本例の場合、特定単一文字「人」、「形」の圧縮符号が抽出されるため、「人」の出現マップと「形」の出現マップとが抽出される。また、「人」の圧縮符号および「形」の圧縮符号を連結した連結圧縮符号も2グラム文字列の出現マップへのポインタとなるため、直接指定することができる。したがって、2グラム文字列「人形」の出現マップも抽出される。
 (G23)抽出された3個の出現マップは、マップ用ハフマン木により伸長される。そして、伸長された出現マップと削除マップDとによりAND演算が実行され、AND結果が得られる。
 (G24)AND結果においてファイル番号3がONになっているため、検索文字列「人形」が対象ファイルF3に存在することが判明する。したがって、圧縮ファイル群から圧縮ファイルf3が抽出される。これにより伸長すべき圧縮ファイルが絞り込まれることになり、無駄な伸長処理を低減することができる。
 (G25)最後に、抽出された圧縮ファイルf3を圧縮状態のまま、照合、伸長することで、伸長後の対象ファイルF3がオープンされる。なお、「人」、「形」の葉の構造体では照合フラグがONになっているため、「人」、「形」の伸長の際、強調表示となるように文字列置換されて伸長される。たとえば、照合フラグがONである「人」、「形」については、<B></B>タグではさんで伸長することで、太字で表示される。照合フラグがOFFの文字については<B></B>タグではさむことなくそのまま伸長する。
<伸長処理の具体例>
 つぎに、図56および図57での伸長処理の具体例について説明する。ここでは、検索文字列「人形」の圧縮符号列を用いて圧縮ファイルfiについて照合しながら伸張する例について説明する。なお、例として、特定単一文字「人」の圧縮符号を「1100010011」(10ビット)とし、特定単一文字「形」の圧縮符号を「0100010010」(10ビット)とする。
 また、伸長処理では、レジスタに圧縮符号列をセットし、マスクパターンにより圧縮符号を抽出する。抽出した圧縮符号を、1パス(1枝分のアクセス)で2N分枝無節点ハフマン木Hの根から探索する。そして、アクセスした葉L♯の構造体に格納されている文字コードを読み出して伸長バッファに格納する。
 また、圧縮符号を抽出するため、マスクパターンのマスク位置をオフセットする。また、マスクパターンの初期値を“0xFFF00000”とする。このマスクパターンは先頭12ビットが“1”であり、後続の20ビットが“0”のビット列である。
 図58および図59は、図56および図57での伸長処理の具体例を示す説明図である。図58では、特定単一文字「人」についての伸張例(A)を示している。図58において、まず、CPUは、ビットアドレスabiとバイトオフセットbyosとビットオフセットbiosとを算出する。ビットアドレスabiは、抽出された圧縮符号のビット位置を示す値であり、今回のビットアドレスabiは、前回のビットアドレスabiに前回抽出された圧縮符号の圧縮符号長legを加算した値となる。なお、初期状態では、ビットアドレスabiはabi=0とする。
 バイトオフセットbyosは、メモリに保持されている圧縮符号列のバイト境界を示す値であり、ビットアドレスabi/8の商で求められる。たとえば、バイトオフセットbyos=0のときは、メモリに記憶されている先頭からの圧縮符号列をレジスタにセットし、バイトオフセットbyos=1のときは、メモリに記憶されている先頭1バイト目からの圧縮符号列をレジスタにセットする。
 また、ビットオフセットbiosは、マスクパターンのマスク位置(“FFF”)をオフセットする値であり、ビットアドレスabi/8の余りである。たとえば、ビットオフセットbios=0のときは、マスク位置はシフトされないこととなり、マスクパターンは、“0xFFF00000”となる。一方、ビットオフセットbios=4のときは、マスク位置は末尾方向に4ビットシフトすることとなり、マスクパターンは、“0x0FFF0000”となる。
 レジスタシフト数rsは、マスクパターンとのAND演算後のレジスタ内の圧縮符号列を末尾方向にシフトするビット数であり、rs=32-12-biosで求められる。このシフトにより、シフト後のレジスタの末尾mビットのビット列を対象ビット列として抽出する。対象ビット列の抽出後はレジスタをクリアする。
 なお、メモリ内のブロックは1バイトのビット列を示しており、内部の数字は、バイト境界となるバイト位置を示している。図58では、ビットアドレスabi=0により、バイトオフセットbyos=0、ビットオフセットbios=0となる。バイトオフセットbyos=0により、メモリに保持されている圧縮符号列のうち先頭から4バイト分(図中、網掛け)の圧縮符号列をレジスタにセットする。
 また、ビットオフセットbios=0により、マスクパターンは、“0xFFF00000”である。したがって、レジスタにセットされた圧縮符号列とマスクパターン“0xFFF00000”を論理積(AND)演算することにより、AND結果が得られる。
 また、ビットオフセットbios=0により、レジスタシフト数rsは、rs=32-m―bios=32-12-0=20となる。したがって、レジスタ内のAND結果を末尾方向に20ビット分シフトする。このシフトによりレジスタには、“110001001100”が残されるため、末尾12ビットを対象ビット列として抽出する。この場合は、“110001001100”が対象ビット列として抽出される。抽出後、レジスタはクリアされる。
 2N分枝無節点ハフマン木Hの根の構造体には、抽出された対象ビット列“110001001100”があるため、この対象ビット列と一致する葉L♯へのポインタ(枝番号)を探索する。この場合、葉L97へのポインタ群の中の1つと一致するため、該当する葉L97へのポインタを読み出して、葉L97の構造体にアクセスする。
 葉L97の構造体には、文字コード“0xBA4E”が格納されているため、当該文字コード“0xBA4E”を抽出して伸長バッファに格納する。ファイル伸長例(G1)の場合は、そのまま伸長バッファに格納するが、ファイル伸長例(G2)の場合は、照合フラグがONであるため、文字コード“0xBA4E”を<B></B>タグで挟み込んで格納する。
 また、葉L97の構造体には、文字コード“0xBA4E”の圧縮符号長leg(=10ビット)も格納されているため、文字コード“0xBA4E”の圧縮符号長legも抽出する。この抽出された圧縮符号長legによりビットアドレスabiを更新する。この場合、更新後のビットアドレスabiはabi=0+10=10となる。
 図59では、特定単一文字「形」について伸張する例(B)を示している。具体的には、図58の状態(A)からレジスタをバイトオフセットbios分シフトした場合、前回である(A)のビットアドレスabiはabi=0、圧縮符号長legは10ビットであるため、(B)のビットアドレスabiはabi=10ビットとなる。
 また、このビットアドレスabi=10により、バイトオフセットbyos=1、ビットオフセットbios=2となる。バイトオフセットbyos=1により、メモリに保持されている圧縮符号列のうち先頭1バイト目から4バイト分(図中、網掛け)の圧縮符号列をレジスタにセットする。
 また、ビットオフセットbios=2により、マスクパターンは、“0x3FFC0000”である。したがって、レジスタにセットされた圧縮符号列とマスクパターン“0x3FFC0000”を論理積(AND)演算することにより、AND結果が得られる。
 また、ビットオフセットbios=2により、レジスタシフト数rsは、rs=32-m―bios=32-12-2=18となる。したがって、レジスタ内のAND結果を末尾方向に18ビット分シフトする。このシフトによりレジスタには、“00000100010010”が残されるため、末尾10ビットを対象ビット列として抽出する。この場合は、“0100010010”が対象ビット列として抽出される。抽出後、レジスタはクリアされる。
 2N分枝無節点ハフマン木Hの根の構造体には、抽出された対象ビット列“0100010010”があるため、このビット列と一致する葉L♯へのポインタ(枝番号)を探索する。この場合、対象ビット列“0100010010”が葉L105へのポインタ群の中の1つと一致するため、該当する葉L105へのポインタを読み出して、葉L24の構造体にアクセスする。
 葉L105の構造体には、文字コード“0x625F”が格納されているため、当該文字コード“0x625F”を抽出して伸長バッファに格納する。ファイル伸長例(G1)の場合は、そのまま伸長バッファに格納するが、ファイル伸長例(G2)の場合は、照合フラグがONであるため、文字コード“0x625F”を<B></B>タグで挟み込んで格納する。また、葉L105の構造体には、文字コード“0x625F”の圧縮符号長leg(=8ビット)も格納されているため、文字コード“0x625F”の圧縮符号長legも抽出する。この抽出された圧縮符号長legによりビットアドレスabiを更新する。この場合、更新後のビットアドレスabiはabi=10+8=18となる。このようにして伸長することで、対象ファイルがオープンされることとなる。
<検索処理手順>
 つぎに、本実施の形態にかかる検索処理手順について説明する。具体的には、たとえば、図57に示したファイル伸長例(G2)についての処理手順となる。
 図60は、本実施の形態にかかる検索処理手順を示すフローチャートである。まず、情報処理装置400は、検索文字列の入力を待ち受け(ステップS6001:No)、検索文字列が入力された場合(ステップS6001:Yes)、ファイル絞込み処理(ステップS6002)、伸長処理(ステップS6003)を実行する。ファイル絞込み処理(ステップS6002)は、圧縮ファイル群fsの中から検索文字列を構成する文字情報が存在する対象ファイルFiの圧縮ファイルfiを絞り込む。ファイル絞込み処理(ステップS6002)の詳細は、図61および図62で説明する。
 伸長処理(ステップS6003)は、ファイル絞込み処理(ステップS6002)で絞り込まれた圧縮ファイルfiを伸長する過程で、伸長対象となる圧縮符号列と検索文字列の圧縮文字列とを照合する。伸長処理(ステップS6003)の詳細は、図63および図64で説明する。
 図61は、図60に示したファイル絞込み処理(ステップS6002)の詳細な処理手順を示すフローチャート(その1)である。まず、情報処理装置400は、検索文字列を対象文字列に設定し(ステップS6101)、最長一致検索処理を実行する(ステップS6102)。最長一致検索処理(ステップS6102)は、図38に示した最長一致検索処理(ステップS3801)と同一処理であるため説明を省略する。
 そして、情報処理装置400は、基礎単語の構造体において、最長一致検索処理(ステップS6102)で得られた最長一致検索結果を2分探索する(ステップS6103)。最長一致検索結果が、基礎単語の構造体で探索された場合(ステップS6103:Yes)、対象文字列である基礎単語について、その基礎単語の出現マップを基礎単語の出現マップ群から取得する(ステップS6104)。
 そして、情報処理装置400は、対象文字列に後続があるか否かを判断する(ステップS6105)。後続がある場合(ステップS6105:Yes)、情報処理装置400は、後続文字列を対象文字列に設定して(ステップS6106)、最長一致検索処理(ステップS6102)に戻る。一方、後続がない場合(ステップS6105:No)、これまでに取得された出現マップ群のAND演算で対象ファイルを絞り込む(ステップS6107)。これにより、ファイル絞込み処理(ステップS6002)は終了し、伸長処理(ステップS6003)に移行する。
 また、ステップS6103において、最長一致検索結果が、基礎単語の構造体で探索されなかった場合(ステップS6103:No)、図62のステップS6201に移行する。具体的には、最長一致検索結果が基礎単語の構造体に登録されていない場合、または、最長一致検索で最長一致候補がなかった場合(ステップS6103:No)に、図62のステップS6201に移行する。
 図62は、図60に示したファイル絞込み処理(ステップS6002)の詳細な処理手順を示すフローチャート(その2)である。図62では、対象文字列を構成する文字ごとに、出現マップを取得する処理を示している。
 まず、情報処理装置400は、対象文字列の先頭文字を対象文字に設定する(ステップS6201)。つぎに、情報処理装置400は、特定単一文字の構造体において対象文字を2分探索する(ステップS6202)。対象文字が探索された場合(ステップS6203:Yes)、情報処理装置400は、特定単一文字の圧縮符号マップMから対象文字の出現マップを取得する(ステップS6204)。
 一方、ステップS6203において、探索されなかった場合(ステップS6203:No)、情報処理装置400は、対象文字を上位8ビットと下位8ビットに分割する(ステップS6205)。そして、情報処理装置400は、上位分割文字コードの圧縮符号マップMの中から、ステップS6205の分割で得られた上位分割文字コードの出現マップを取得する(ステップS6206)。
 また、情報処理装置400は、下位分割文字コードの圧縮符号マップMの中から、ステップS6205の分割で得られた下位分割文字コードの出現マップを取得する(ステップS6207)。また、情報処理装置400は、対象文字やステップS6205で分割された分割文字コードについて、2N分枝無節点ハフマン木Hの葉にアクセスし、照合フラグをONにする(ステップS6208)。このあと、情報処理装置400は、2グラム文字列特定処理を実行する(ステップS6209)。2グラム文字列特定処理(ステップS6209)は、図30に示した2グラム文字列特定処理(ステップS2706)と同一処理であるため説明を省略する。
 そして、情報処理装置400は、2グラム文字列特定処理(ステップS6209)で2グラム文字列が特定されなかった場合(ステップS6210:No)、図61のステップS6105に戻る。一方、2グラム文字列が特定された場合(ステップS6210:Yes)、情報処理装置400は、2グラム文字列の出現マップを取得する(ステップS6211)。具体的には、たとえば、情報処理装置400は、第1グラムの圧縮符号および第2グラムの圧縮符号を2N分枝無節点ハフマン木Hにアクセスすることで取得、連結し、2グラム文字列の圧縮符号マップMから連結圧縮符号で指定された出現マップを取得する。そして、図61のステップS6105に戻る。
 このように、図62に示した処理手順により、対象文字についての出現マップ群と2グラム文字列についての出現マップ群を取得することができる。したがって、図61のステップS6107でのAND演算により圧縮ファイルfiの絞込みができることとなる。
 図63は、図60に示した2N分枝無節点ハフマン木Hを用いた伸長処理(ステップS6003)の詳細な処理手順例を示すフローチャート(その1)である。図63において、まず、情報処理装置400は、ビットアドレスabiをabi=0とし(ステップS6301)、バイトオフセットbyosを算出し(ステップS6302)、ビットオフセットbiosを算出する(ステップS6303)。そして、情報処理装置400は、バイトオフセットbyosの位置からの圧縮符号列をレジスタr1にセットする(ステップS6304)。
 つぎに、情報処理装置400は、レジスタr2にセットされたマスクパターンをビットオフセットbios分、末尾方向にシフトして(ステップS6305)、レジスタr1にセットされた圧縮符号列とのAND演算をおこなう(ステップS6306)。このあと、情報処理装置400は、レジスタシフト数rsを算出して(ステップS6307)、AND演算後のレジスタr2をレジスタシフト数rs分、末尾にシフトする(ステップS6308)。
 図64は、図60に示した2N分枝無節点ハフマン木Hを用いた伸長処理(ステップS6003)の詳細な処理手順例を示すフローチャート(その2)である。ステップS6308のあと、図64において、情報処理装置400は、シフト後のレジスタr2から末尾Nビットを対象ビット列として抽出する(ステップS6401)。つぎに、情報処理装置400は、2N分枝無節点ハフマン木Hの根の構造体から葉L♯へのポインタを特定し(ステップS6402)、ポイント先となる葉L♯の構造体に1パスでアクセスする(ステップS6403)。このあと、情報処理装置400は、アクセス先の葉L♯の構造体の照合フラグがONであるか否かを判断する(ステップS6404)。
 照合フラグがONである場合(ステップS6404:Yes)、情報処理装置400は、アクセス先の葉L♯の構造体内の文字情報について置換文字を伸長バッファに書き出して(ステップS6405)、ステップS6407に移行する。一方、照合フラグがOFFの場合(ステップS6404:No)、情報処理装置400は、アクセス先の葉L♯の構造体内の文字情報(伸長文字)を伸長バッファに書き出して(ステップS6406)、ステップS6407に移行する。
 ステップS6407では、情報処理装置400は、アクセス先の葉L♯の構造体から圧縮符号長legを抽出し(ステップS6407)、ビットアドレスabiを更新する(ステップS6408)。このあと、情報処理装置400は、メモリに圧縮符号列があるか否か、具体的には、マスクパターンによるマスク処理が施されていない圧縮符号列があるか否かを判断する(ステップS6409)。たとえば、バイトオフセットbyosに該当するバイト位置があるか否かにより判断する。圧縮符号列がある場合(ステップS6409:Yes)、図63のステップS6302に戻る。一方、圧縮符号列がない場合(ステップS6409:No)、伸長処理(ステップS6003)を終了する。
 このような伸長処理(ステップS6003)により、圧縮状態のまま照合・伸長をおこなうことができ、伸長速度の高速化を図ることができる。
<更新処理の具体例>
 つぎに、図1に示した更新処理の具体例について説明する。ここでは、図1で示したように、圧縮済みの圧縮符号マップMを伸長することなく、対象ファイルFiの更新と、圧縮符号マップMの更新とを実行する。
 図65は、更新処理の具体例を示す説明図である。図65では、対象ファイルF3を更新する場合を例に挙げて説明する。まず、図56のファイル伸長例(G1)または図57のファイル伸長例(G2)により、圧縮ファイル群fsから圧縮ファイルf3が伸長され、伸長後の対象ファイルF3がメインメモリ(たとえば、RAM203)上に書き出されたとする。
 (H)ここで、対象ファイルF3内の文字列「人形芝居を見た。」を「紙芝居を見た。」に変更し、保存指示を与えたとする。この場合、メインメモリ上の対象ファイルF3にはあたらしく採番されたファイル番号n+1が割り与えられ、対象ファイルF(n+1)となる。
 (I)そして、対象ファイルF(n+1)を2N分枝無節点ハフマン木Hで圧縮して圧縮ファイルf(n+1)とし、記憶装置内に保存する。この場合、記憶装置内において圧縮ファイルf(n+1)を圧縮ファイルf3に上書き保存する。
 (J)また、メインメモリ上の対象ファイルF(n+1)の文字情報を集計部401により集計することで、文字情報の存否を検出することができる。したがって、新たに採番されたファイル番号n+1のビットを、各文字情報の出現マップに追加(デフォルトはOFF)し、文字情報が出現したビットについてONにする。また、ファイル番号n+1のビットを削除マップDにも追加(デフォルトはON)する。さらに、削除マップDにおいて更新元となる対象ファイルF3のファイル番号3のビットをOFFにする。
 (K)また、圧縮ファイルf3は圧縮ファイルf(n+1)に上書き保存されるため、ファイル番号n+1については、管理領域においてファイル番号3に関連付けられていたポインタが関連付けされる。これにより、以降において、ファイル番号(n+1)が指定されると、圧縮ファイルf(n+1)を伸長して対象ファイルF(n+1)をオープンすることができる。
 なお、図65では、圧縮ファイルf(n+1)を圧縮ファイルf3に対して上書き保存することとしたが、上書き保存せず別途保存することとしてもよい。この場合、圧縮符号マップMの管理領域5600において、ファイル番号n+1には、圧縮ファイルf3へのポインタではなく、空き領域を指定するあらたなポインタが割り当てられることとなる。この場合、圧縮ファイルf3は残存するが、削除マップDではファイル番号3がOFFに変更されているため、検索に影響は与えない。
 また、更新前の状態に復元させる場合は、更新前のファイル番号3と更新後のファイル番号n+1とを関連付けさせておけばよい。これにより、ファイル番号n+1を含む復元指示を与えることで、ファイル番号3を介して圧縮ファイルf3を指定することができるため、伸長することで対象ファイルF3を得ることができる。
<更新処理手順>
 つぎに、図65に示した更新処理手順について説明する。
 図66は、図65に示した更新処理手順を示すフローチャートである。まず、情報処理装置400は、更新要求が受け付けられるのを待ち受け(ステップS6601:No)、更新要求が受け付けられた場合(ステップS6601:Yes)、情報処理装置400は、更新要求のあった対象ファイルFiのファイル番号iを特定する(ステップS6602)。
 そして、情報処理装置400は、削除マップDにおける特定先のファイル番号iのビットをOFFにする(ステップS6603)。これにより、特定先のファイル番号iの対象ファイルFiが検索されることがなくなり、検索精度の向上を図ることができる。
 つぎに、情報処理装置400は、対象ファイルFiのファイル番号iを更新する(ステップS6604)。すなわち、現時点での末尾のファイル番号に1加算したファイル番号を採番して、対象ファイルに割り与える。たとえば、図65に示したように、ファイル番号n+1を採番して、メインメモリ(RAM203)上の対象ファイルF3に付与して対象ファイルF(n+1)とする。このように、あらたに採番されたファイル番号が付与された対象ファイルを追加ファイルと称す。
 このあと、情報処理装置400は、追加ファイルF(n+1)を2N分枝無節点ハフマン木Hで圧縮して圧縮ファイルとして保存する(ステップS6605)。そして、情報処理装置400は、圧縮符号マップMの管理領域5600内に、追加ファイルF(n+1)のファイル番号(n+1)に関連付けて追加ファイルF(n+1)の圧縮ファイルへのポインタを関連付ける(ステップS6606)。
 このあと、情報処理装置400は、総ファイル数(末尾のファイル番号)がnの倍数であるか否かを判断する(ステップS6607)。nの倍数である場合(ステップS6607:Yes)、圧縮符号マップMの全ビットが圧縮領域となるため、圧縮符号マップMの各出現マップを圧縮する(ステップS6608)。これにより、圧縮符号マップMのサイズ縮小を図ることができる。
 一方、nの倍数でない場合(ステップS6607:No)、追加ファイルF(n+1)のマップ更新処理を実行して(ステップS6609)、一連の処理を終了する。追加ファイルF(n+1)のマップ更新処理(ステップS6609)の詳細については、図67および図68で説明する。
 図67は、図66に示した追加ファイルのマップ更新処理(ステップS6609)の詳細な処理手順を示すフローチャート(前半)である。まず、情報処理装置400は、圧縮符号マップMおよび削除マップDにおいて、追加ファイルのファイル番号のビットを設定する(ステップS6701)。具体的には、出現マップについてはOFFのビットを追加ファイルのファイル番号に対して設定し、削除マップDについてはONのビットを追加ファイルのファイル番号に対して設定する。
 つぎに、情報処理装置400は、追加ファイル内の先頭文字を対象文字に設定し(ステップS6702)、対象文字について最長一致検索処理を実行する(ステップS6703)。最長一致検索処理(ステップS6703)は、図24に示した処理と同一処理であるため説明を省略する。
 このあと、情報処理装置400は、最長一致した基礎単語が基礎単語の構造体1600にあるか否かを判断する(ステップS6704)。ない場合(ステップS6704:No)、図68のステップS6801に移行する。一方、ある場合(ステップS6704:Yes)、情報処理装置400は、最長一致した基礎単語の圧縮符号を2N分枝無節点ハフマン木Hから特定して、当該圧縮符号により、最長一致した基礎単語の出現マップを指定する(ステップS6705)。そして、情報処理装置400は、指定された出現マップにおいて追加ファイルのファイル番号に対応するビットをONにする(ステップS6706)。このあと、図68のステップS6801に移行する。
 図68は、図66に示した追加ファイルのマップ更新処理(ステップS6609)の詳細な処理手順を示すフローチャート(後半)である。まず、情報処理装置400は、対象文字が特定単一文字であるか否かを判断する(ステップS6801)。具体的には、たとえば、情報処理装置400は、対象文字が特定単一文字の構造体でヒットしたか否かを判断する。
 対象文字が特定単一文字である場合(ステップS6801:Yes)、情報処理装置400は、ヒットした特定単一文字の圧縮符号を2N分枝無節点ハフマン木Hから特定して、当該圧縮符号により、ヒットした特定単一文字の出現マップを指定する(ステップS6802)。そして、情報処理装置400は、指定された出現マップにおいて追加ファイルのファイル番号に対応するビットをONにする(ステップS6803)。このあと、ステップS6809に移行する。
 一方、対象文字が特定単一文字でない場合(ステップS6801:No)、情報処理装置400は、対象文字を上位分割文字コードと下位分割文字コードとに分割する(ステップS6804)。そして、情報処理装置400は、分割文字コードの構造体でヒットした上位分割文字コードの圧縮符号を2N分枝無節点ハフマン木Hから特定して、当該圧縮符号により、ヒットした上位分割文字コードの出現マップを指定する(ステップS6805)。そして、情報処理装置400は、指定された出現マップにおいて追加ファイルのファイル番号に対応するビットをONにする(ステップS6806)。
 同様に、情報処理装置400は、分割文字コードの構造体でヒットした下位分割文字コードの圧縮符号を2N分枝無節点ハフマン木Hから特定して、当該圧縮符号により、ヒットした下位分割文字コードの出現マップを指定する(ステップS6807)。そして、情報処理装置400は、指定された出現マップにおいて追加ファイルのファイル番号に対応するビットをONにする(ステップS6808)。このあと、ステップS6809に移行する。
 また、ステップS6809において、情報処理装置400は、2グラム文字列特定処理を実行する(ステップS6809)。2グラム文字列特定処理(ステップS6809)は、図30に示した処理と同一処理であるため説明を省略する。
 このあと、情報処理装置400は、2グラム文字列(たとえば「人形」)のうち先頭グラム文字(たとえば、「人」)の圧縮符号と末尾グラム文字(たとえば、「形」)の圧縮符号とを連結する(ステップS6810)。つぎに、情報処理装置400は、連結圧縮符号により、2グラム文字列の出現マップを指定する(ステップS6811)。そして、情報処理装置400は、指定された出現マップにおいて追加ファイルのファイル番号に対応するビットをONにして(ステップS6812)、一連の処理を終了する。
 以上説明したように、本実施の形態によれば、追加されたファイル番号に、更新後の対象ファイルの圧縮ファイルへのポインタが付与される。したがって、更新後において追加ファイルのファイル番号を指定/検索された場合に、速やかに追加ファイルの圧縮ファイルを指定して伸長することができることになる。
 したがって、インデックス情報を用いた検索の対象となる複数のファイルのいずれかを更新する場合に、更新処理を開始してから、更新後の複数のファイルに対応したインデックス情報による検索を実行可能とするまでの処理時間を低減することができる。
 また、上書き保存により対象ファイルFiが削除されても、ファイル番号n+1についての出現マップおよび削除マップDのビット追加と、削除マップDのビット変更により、マップ更新が可能となる。すなわち、出現マップの圧縮領域を伸長して削除となったファイル番号iのビットを削除して、圧縮しなおすといった処理を実行する必要がなく、効率的なマップ更新をおこなうことができる。
 また、あらかじめ、圧縮符号マップMの圧縮領域のビット列を、先頭位置から末尾位置にかけて対象ファイル群Fsのファイル番号pの降順に配列しておく。これにより、ファイル番号;1~nのビット列が圧縮されても、追加ファイルのファイル番号とそのビットとのずれがなく、対象ファイルFiの絞込みを正確に実行することができる。
 また、圧縮符号マップMの圧縮領域を所定数の最大倍数(たとえば、所定ファイル数256の最大倍数)のビット列にすることで、対象ファイルが追加される都度、圧縮符号マップMの圧縮をおこなう必要がない。これにより、情報処理装置400の演算負荷を低減することができる。また、追加後のファイル総数が初期のファイル数の最大倍数に達した場合に、圧縮符号マップMのファイル番号に対応する全ビットが圧縮領域となるため、圧縮符号マップMがハフマン木hにより圧縮される。これにより、省メモリ化を図ることができる。このように、所定ファイル数(たとえば256個)単位で圧縮がおこなわれるため、演算負荷低減と省メモリ化を同時に実現することができる。
 なお、本実施の形態で説明した情報処理方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等の情報処理装置400で実行することにより実現することができる。本情報処理プログラムは、ハードディスク、フレキシブルディスク、CD-ROM、MO、DVD等の情報処理装置400で読み取り可能な記録媒体に記録され、情報処理装置400によって記録媒体から読み出されることによって実行される。また本情報処理プログラムは、インターネット等のネットワークを介して配布してもよい。
400 情報処理装置
401 集計部
402 第1生成部
403 第1圧縮部
404 作成部
405 第2生成部
406 第2圧縮部
5501 指定部
5502 第1伸長部
5503 入力部
5504 抽出部
5505 第2伸長部
5506 特定部
5507 更新部

Claims (11)

  1.  コンピュータに、
     複数のファイルのそれぞれについて所定の文字情報を含むか否かを示す第1の情報を圧縮した圧縮情報を記憶手段に記憶し、
     前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを特定可能な第3の情報を前記記憶手段に記憶し、
     前記所定の文字情報についての検索要求を受けた場合に、前記複数のファイル及び前記更新されたファイルのうち、前記圧縮情報を伸張して得られる前記第1の情報又は前記第2の情報によって前記所定の文字情報が含まれない旨を示されたファイル、及び、前記第3の情報によって特定される前記あるファイルを除外したファイルを抽出する、
     ことを実行させることを特徴とする抽出方法。
  2.  前記第1の情報が、
     前記複数のファイルそれぞれについて前記所定の文字情報を含むか否かを示すビット列であり、
     前記第3の情報が、
     前記複数のファイルそれぞれについて検索対象とするか否かを示すビット列であり、
     前記コンピュータに、
     前記検索要求を受けた場合に、前記第1の情報と前記第3の情報とを用いたビット演算により生成されたビット列に基づいて、前記複数のファイルから前記所定の文字情報が含まれない旨を示されたファイル及び前記あるファイルを除外する、
     ことを実行させることを特徴とする請求項1に記載の抽出方法。
  3.  コンピュータに、
     複数のファイルのそれぞれについて所定の文字情報を含むかを示す第1の情報を圧縮して記憶手段に記憶し、
     前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを検索対象から除く旨を示す第3の情報を前記記憶手段に記憶する、
     ことを実行させることを特徴とする情報処理方法。
  4.  前記コンピュータに、
     更新された前記あるファイルを示すポインタを、前記第2の情報と対応付けて前記記憶手段に記憶する、
     ことを特徴とする請求項3に記載の情報処理方法。
  5.  前記コンピュータに、
     前記圧縮情報は、前記第1の情報を、前記複数のファイルにおける前記所定の文字情報の出現率に応じたハフマン木により圧縮して得られる、
     ことを実行させることを特徴とする請求項3又は請求項4に記載の情報処理方法。
  6.  前記コンピュータに、
     前記第1の情報のうち、前記複数のファイルの先頭ファイル番号からファイル数の最大倍数となるファイル番号までの領域を圧縮し、かつ、残余の領域を圧縮せずに、前記記憶手段に記憶する、
     ことを実行させることを特徴とする請求項3~5のいずれか一つに記載の情報処理方法。
  7.  前記コンピュータに、
     前記所定の文字情報の検索要求を受けた場合に、前記複数のファイルのうち、前記圧縮情報を伸張して得られる前記第1の情報に前記所定の文字情報を含む旨を示され、且つ前記第3の情報に検索対象から除く旨を示されないファイルを抽出するとともに、前記第2の情報が、前記所定の文字情報を含む旨を示す場合に更新された前記あるファイルを抽出する、
     ことを実行させることを特徴とする請求項3~6のいずれか一つに記載の情報処理方法。
  8.  コンピュータに、
     複数のファイルのそれぞれについて所定の文字情報を含むか否かを示す第1の情報を圧縮した圧縮情報を記憶手段に記憶し、
     前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを特定可能な第3の情報を前記記憶手段に記憶し、
     前記所定の文字情報についての検索要求を受けた場合に、前記複数のファイル及び前記更新されたファイルのうち、前記圧縮情報を伸張して得られる前記第1の情報又は前記第2の情報によって前記所定の文字情報が含まれない旨示されたファイル、及び、前記第3の情報によって特定される前記あるファイルを除外したファイルを抽出する、
     ことを実行させることを特徴とする抽出プログラム。
  9.  コンピュータに、
     複数のファイルのそれぞれについて所定の文字情報を含むかを示す第1の情報を圧縮して記憶手段に記憶し、
     前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを検索対象から除く旨を示す第3の情報を前記記憶手段に記憶する、
     処理を実行させることを特徴とする情報処理プログラム。
  10.  複数のファイルのそれぞれについて所定の文字情報を含むか否かを示す第1の情報を圧縮した圧縮情報を記憶手段に記憶する記憶手段と、
     前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶するとともに、前記あるファイルを特定可能な第3の情報を前記記憶手段に記憶させる更新手段と、
     前記所定の文字情報についての検索要求を受けた場合に、前記複数のファイル及び前記更新されたファイルのうち、前記圧縮情報を伸張して得られる前記第1の情報又は前記第2の情報によって前記所定の文字情報が含まれない旨示されたファイル、及び、前記第3の情報によって特定される前記あるファイルを除外したファイルを抽出する抽出手段と、
     を含むことを特徴とする抽出装置。
  11.  複数のファイルのいずれが所定の文字情報を含むかを示す第1の情報を圧縮して記憶する記憶手段と、
     前記複数のファイルに含まれるあるファイルが更新された場合に、更新された前記あるファイルが前記所定の文字情報を含むか否かを示す第2の情報を前記記憶手段に記憶させ、前記あるファイルを検索対象から除く旨を示す第3の情報を前記記憶手段に記憶させる更新手段と、
     を備えることを特徴とする情報処理装置。
PCT/JP2011/060559 2011-05-02 2011-05-02 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置 WO2012150637A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/JP2011/060559 WO2012150637A1 (ja) 2011-05-02 2011-05-02 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置
JP2013513060A JPWO2012150637A1 (ja) 2011-05-02 2011-05-02 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置
EP11864780.9A EP2706466A4 (en) 2011-05-02 2011-05-02 EXTRACTION PROCESS, INFORMATION PROCESSING, EXTRACTION PROGRAM, INFORMATION PROCESSING, EXTRACTION DEVICE AND INFORMATION PROCESSING DEVICE
US14/068,855 US20140059075A1 (en) 2011-05-02 2013-10-31 Extracting method, information processing method, computer product, extracting apparatus, and information processing apparatus
US15/208,129 US20160321282A1 (en) 2011-05-02 2016-07-12 Extracting method, information processing method, computer product, extracting apparatus, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/060559 WO2012150637A1 (ja) 2011-05-02 2011-05-02 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/068,855 Continuation US20140059075A1 (en) 2011-05-02 2013-10-31 Extracting method, information processing method, computer product, extracting apparatus, and information processing apparatus

Publications (1)

Publication Number Publication Date
WO2012150637A1 true WO2012150637A1 (ja) 2012-11-08

Family

ID=47107830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/060559 WO2012150637A1 (ja) 2011-05-02 2011-05-02 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置

Country Status (4)

Country Link
US (2) US20140059075A1 (ja)
EP (1) EP2706466A4 (ja)
JP (1) JPWO2012150637A1 (ja)
WO (1) WO2012150637A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544266A (zh) * 2013-10-16 2014-01-29 北京奇虎科技有限公司 一种搜索建议词生成的方法以及装置
CN104462032A (zh) * 2014-12-26 2015-03-25 南通大学 一种用于语言材料的数据识别与提取方法
JP2018060370A (ja) * 2016-10-05 2018-04-12 富士通株式会社 検索プログラム、検索方法、および検索装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8484170B2 (en) * 2011-09-19 2013-07-09 International Business Machines Corporation Scalable deduplication system with small blocks
JP6107513B2 (ja) * 2013-07-29 2017-04-05 富士通株式会社 情報処理システム、情報処理方法、および情報処理プログラム
US20160092492A1 (en) * 2014-09-27 2016-03-31 Qualcomm Incorporated Sharing initial dictionaries and huffman trees between multiple compressed blocks in lz-based compression algorithms
CN104361048A (zh) * 2014-10-29 2015-02-18 中国建设银行股份有限公司 一种档案索引生成方法及装置
JP2016170750A (ja) * 2015-03-16 2016-09-23 富士通株式会社 データ管理プログラム、情報処理装置およびデータ管理方法
WO2017056073A1 (en) 2015-10-01 2017-04-06 Pacbyte Software Pty Ltd Method and system for compressing and/or encrypting data files
JP6662169B2 (ja) * 2016-04-18 2020-03-11 富士通株式会社 符号化プログラム、符号化方法、符号化装置、検索プログラム、検索方法および検索装置
JP6372813B1 (ja) * 2017-12-20 2018-08-15 株式会社イスプリ データ管理システム
CN108897808B (zh) * 2018-06-16 2023-11-24 王梅 一种在云存储系统中进行数据存储的方法及系统
US10541708B1 (en) * 2018-09-24 2020-01-21 Redpine Signals, Inc. Decompression engine for executable microcontroller code
CN112134644B (zh) 2019-06-25 2022-07-15 比亚迪股份有限公司 编码方法、装置及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003122794A (ja) * 2001-07-24 2003-04-25 Ricoh Co Ltd 全文検索装置、全文検索方法、プログラム、及び記録媒体
WO2006123448A1 (ja) 2005-05-20 2006-11-23 Fujitsu Limited 情報検索プログラム
JP2008102765A (ja) * 2006-10-19 2008-05-01 Fujitsu Ltd 検索処理方法及び検索システム

Family Cites Families (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5532694A (en) * 1989-01-13 1996-07-02 Stac Electronics, Inc. Data compression apparatus and method using matching string searching and Huffman encoding
US4955066A (en) * 1989-10-13 1990-09-04 Microsoft Corporation Compressing and decompressing text files
US5276616A (en) * 1989-10-16 1994-01-04 Sharp Kabushiki Kaisha Apparatus for automatically generating index
JP2809341B2 (ja) * 1994-11-18 1998-10-08 松下電器産業株式会社 情報要約方法、情報要約装置、重み付け方法、および文字放送受信装置。
US5706365A (en) * 1995-04-10 1998-01-06 Rebus Technology, Inc. System and method for portable document indexing using n-gram word decomposition
JP2973944B2 (ja) * 1996-06-26 1999-11-08 富士ゼロックス株式会社 文書処理装置および文書処理方法
US5951623A (en) * 1996-08-06 1999-09-14 Reynar; Jeffrey C. Lempel- Ziv data compression technique utilizing a dictionary pre-filled with frequent letter combinations, words and/or phrases
JP3421700B2 (ja) * 1998-01-22 2003-06-30 富士通株式会社 データ圧縮装置及び復元装置並びにその方法
US20020165707A1 (en) * 2001-02-26 2002-11-07 Call Charles G. Methods and apparatus for storing and processing natural language text data as a sequence of fixed length integers
JP3303881B2 (ja) * 2001-03-08 2002-07-22 株式会社日立製作所 文書検索方法および装置
US7418386B2 (en) * 2001-04-03 2008-08-26 Intel Corporation Method, apparatus and system for building a compact language model for large vocabulary continuous speech recognition (LVCSR) system
US6909808B2 (en) * 2002-03-08 2005-06-21 Anzus, Inc. Image compression to enhance optical correlation
US7269548B2 (en) * 2002-07-03 2007-09-11 Research In Motion Ltd System and method of creating and using compact linguistic data
US7305385B1 (en) * 2004-09-10 2007-12-04 Aol Llc N-gram based text searching
WO2007002468A2 (en) * 2005-06-23 2007-01-04 1Stworks Corporation Modeling for enumerative encoding
JP5060119B2 (ja) * 2006-12-19 2012-10-31 株式会社富士通ビー・エス・シー 暗号処理プログラム、暗号処理方法および暗号処理装置
US9015301B2 (en) * 2007-01-05 2015-04-21 Digital Doors, Inc. Information infrastructure management tools with extractor, secure storage, content analysis and classification and method therefor
JP5007743B2 (ja) * 2007-05-24 2012-08-22 富士通株式会社 情報検索プログラム、該プログラムを記録した記録媒体、情報検索装置、および情報検索方法
JP5782214B2 (ja) * 2008-05-30 2015-09-24 富士通株式会社 情報検索プログラム、情報検索装置および情報検索方法
GB0905457D0 (en) * 2009-03-30 2009-05-13 Touchtype Ltd System and method for inputting text into electronic devices
US8725509B1 (en) * 2009-06-17 2014-05-13 Google Inc. Back-off language model compression
JP5418218B2 (ja) * 2009-12-25 2014-02-19 富士通株式会社 情報処理プログラム、情報検索プログラム、情報処理装置、および情報検索装置
US20120278308A1 (en) * 2009-12-30 2012-11-01 Google Inc. Custom search query suggestion tools
US20110179012A1 (en) * 2010-01-15 2011-07-21 Factery.net, Inc. Network-oriented information search system and method
JP5457564B2 (ja) * 2010-03-05 2014-04-02 インターデイジタル パテント ホールディングス インコーポレイテッド 機器にセキュリティを提供する方法および装置
US8903800B2 (en) * 2010-06-02 2014-12-02 Yahoo!, Inc. System and method for indexing food providers and use of the index in search engines
US8635061B2 (en) * 2010-10-14 2014-01-21 Microsoft Corporation Language identification in multilingual text
US8548951B2 (en) * 2011-03-10 2013-10-01 Textwise Llc Method and system for unified information representation and applications thereof
US8392433B2 (en) * 2011-04-14 2013-03-05 Amund Tveit Self-indexer and self indexing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003122794A (ja) * 2001-07-24 2003-04-25 Ricoh Co Ltd 全文検索装置、全文検索方法、プログラム、及び記録媒体
WO2006123448A1 (ja) 2005-05-20 2006-11-23 Fujitsu Limited 情報検索プログラム
JP2008102765A (ja) * 2006-10-19 2008-05-01 Fujitsu Ltd 検索処理方法及び検索システム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2706466A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544266A (zh) * 2013-10-16 2014-01-29 北京奇虎科技有限公司 一种搜索建议词生成的方法以及装置
CN104462032A (zh) * 2014-12-26 2015-03-25 南通大学 一种用于语言材料的数据识别与提取方法
JP2018060370A (ja) * 2016-10-05 2018-04-12 富士通株式会社 検索プログラム、検索方法、および検索装置

Also Published As

Publication number Publication date
JPWO2012150637A1 (ja) 2014-07-28
EP2706466A1 (en) 2014-03-12
US20160321282A1 (en) 2016-11-03
EP2706466A4 (en) 2015-06-17
US20140059075A1 (en) 2014-02-27

Similar Documents

Publication Publication Date Title
WO2012150637A1 (ja) 抽出方法、情報処理方法、抽出プログラム、情報処理プログラム、抽出装置、および情報処理装置
JP5741699B2 (ja) 抽出方法、抽出プログラム、抽出装置、および抽出システム
JP4644708B2 (ja) 情報検索プログラム
US5737733A (en) Method and system for searching compressed data
US8866647B2 (en) Computer product, information processing apparatus, and information search apparatus
JP5605288B2 (ja) 出現マップ生成方法、ファイル抽出方法、出現マップ生成プログラム、ファイル抽出プログラム、出現マップ生成装置、およびファイル抽出装置
CN101071420A (zh) 一种切分索引分词的方法及系统
JP6304302B2 (ja) 情報生成方法、情報生成装置、および情報生成プログラム
JP2016149160A5 (ja)
JP5505524B2 (ja) 生成プログラム、生成装置、および生成方法
JP2000201080A (ja) 付加コ―ドを用いたデ―タ圧縮/復元装置および方法
EP2682876B1 (en) Search program, search device, and search method
JP4208326B2 (ja) 情報索引装置
JPH10261969A (ja) データ圧縮方法および装置
JP4726046B2 (ja) 文字列検索装置及びコンピュータプログラム及び文字列検索方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11864780

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013513060

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2011864780

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE