Document processing device, program, and document processing method
The document processing device and method improve metadata extraction accuracy by identifying and categorizing character blocks and extracting metadata based on specific conditions, addressing the inaccuracies in conventional technologies due to similar alphanumeric notations in product model numbers.
Patent Information
- Application Number
- PCT/JP2023/014760
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2024-10-17
AI Technical Summary
Conventional document processing technologies extract metadata using only document data and a predefined dictionary, leading to potential mistakes in extracting product model numbers with similar alphanumeric notation, resulting in inaccurate metadata extraction.
A document processing device and method that identifies character blocks, determines their types, and extracts metadata based on specific extraction conditions, using a character block type determination unit and metadata extraction unit to accurately identify and extract relevant character strings as metadata.
This approach allows for more accurate metadata extraction by distinguishing between different character block types and extracting the correct metadata, reducing errors associated with similar notation in product model numbers.
Smart Images

Figure JP2023014760_17102024_PF_FP_ABST
Abstract
Description
Document processing device, program, and document processing method
[0001] The present disclosure relates to a document processing device, a program, and a document processing method.
[0002] A technique has been proposed in the past in which each line of text in a document is analyzed and scored to determine whether it satisfies the characteristics expected to be possessed by predefined metadata, and the keyword with the highest score is extracted as metadata corresponding to the metadata identifier in the document (see, for example, Patent Document 1).
[0003] Patent No. 5380040
[0004] However, in conventional technologies, metadata is extracted using only the document data to be processed and a predefined dictionary. Therefore, for example, if a related product model number is characterized by being expressed in alphanumeric characters, there is a possibility that a document number with a similar notation may be erroneously extracted.
[0005] Therefore, one or more aspects of the present disclosure aim to enable more appropriate extraction of metadata from document data.
[0006] A document processing device according to one aspect of the present disclosure is characterized by comprising: a character block identification unit that identifies, from a document represented by document data, a plurality of character blocks, each of which contains a group of a plurality of characters; a character block type determination unit that determines the character block type, which is the type of each of the plurality of character blocks; and a metadata extraction unit that extracts, as metadata from one character block, a character string that matches the extraction target character string in the character block type determined for one character block included in the plurality of character blocks, in accordance with metadata extraction condition information that indicates an extraction target character string, which is a character string to be extracted from each of the plurality of character block types.
[0007] A program according to one aspect of the present disclosure causes a computer to function as: a character block identification unit that identifies, from a document represented by document data, a plurality of character blocks, each of which contains a group of a plurality of characters; a character block type determination unit that determines the character block type, which is the type of each of the plurality of character blocks; and a metadata extraction unit that extracts, as metadata from one character block, a character string that matches the extraction target character string in the character block type determined for one character block included in the plurality of character blocks, in accordance with metadata extraction condition information that indicates an extraction target character string, which is a character string to be extracted from each of the plurality of character block types.
[0008] A document processing method according to one aspect of the present disclosure is characterized in that it identifies, from a document represented by document data, a plurality of character blocks, each containing a group of a plurality of characters, determines a character block type that is a type of each of the plurality of character blocks, and extracts, as metadata from one character block, a character string that matches the extraction target character string in the character block type determined for one character block included in the plurality of character blocks, in accordance with metadata extraction condition information that indicates an extraction target character string that is a character string to be extracted from each of the plurality of character block types.
[0009] According to one or more aspects of the present disclosure, it becomes possible to extract metadata more appropriately.
[0010] FIG. 1 is a configuration diagram schematically showing the configuration of a document processing device according to a first embodiment. FIG. 2 is a schematic diagram showing an example of character block type determination information according to the first embodiment. FIG. 3 is a schematic diagram showing an example of organization information stored in a character string DB. FIG. 4 is a schematic diagram showing an example of product information stored in a character string DB. FIG. 5 is a schematic diagram showing an example of metadata extraction condition information. FIG. 6 is a block diagram schematically showing the configuration of a PC. FIG. 7 is a flowchart showing the operation of the document processing device according to the first embodiment. FIG. 8 is a flowchart showing details of the operation of a character block type determination unit. FIG. 9 is a schematic diagram showing an example of a document indicated by document data to be processed. FIG. 10 is a schematic diagram showing an example of a character block identification result. FIG. 11 is a configuration diagram schematically showing the configuration of a document processing device according to a second embodiment. FIG. 12 is a schematic diagram showing an example of character block type determination information according to the second embodiment.
[0011] 1 is a block diagram showing the overall configuration of a document processing device 100 according to embodiment 1. The document processing device 100 includes a character block type determination information storage unit 101, a character string DB (DataBase) 102, a metadata extraction condition information storage unit 103, a character block identification unit 104, a character block type determination unit 105, and a metadata extraction unit 106.
[0012] The character block type determination information storage unit 101 stores character block type determination information, which is information for determining the type of a character block. The character block type determination information indicates an added value for the characteristics possessed by each of two or more character block types. A character block is a group of characters identified from a document represented by document data, as described below. In other words, a character block includes a group of multiple characters.
[0013] Fig. 2 is a schematic diagram showing an example of character block type determination information according to embodiment 1. Character block type determination information 101a shown in Fig. 2 is information in a table format including an ID column 101b, a character block type column 101c, a feature column 101d, and a score addition column 101e.
[0014] The ID column 101b stores ID (IDentification), which is identification information for identifying each row of the character block type determination information 101a.
[0015] The character block type column 101c stores character block types, which are types of character blocks. The feature column 101d stores features of character block types. The score addition value column 101e stores an addition value, which is a value added to the score of a character block type on the same line when character blocks have features on the same line.
[0016] The character block type determination information 101a associates, for each character block type, a characteristic possessed by the character block with an additional value to be added to the score of the character block type when the character block has that characteristic.
[0017] 1, the character string DB 102 is a character string information storage unit that stores character string information indicating actual character strings as metadata. For example, the character string DB 102 stores the names of departments that actually exist in organizations and the product numbers that actually exist.
[0018] Fig. 3 is a schematic diagram showing an example of organizational information stored in the character string DB 102. The organizational information 102a shown in Fig. 3 is information in a table format having an ID column 102b, a department column 102c, a section column 102d, and an abbreviation column 102e.
[0019] The ID column 102b stores an ID for identifying each row of the organizational information 102a. The department column 102c stores the name of a department within an organization (e.g., a company). The section column 102d stores the name of a section within an organization. A section is considered to be an affiliation within a department. The abbreviation column 102e stores the abbreviation of the section name in the same row. The department name, section name, and section abbreviation can be identified from the organizational information 102a.
[0020] Figure 4 is a schematic diagram showing an example of product information stored in the character string DB 102. The product information 102f shown in Figure 4 is information in a table format having an ID column 102g and a product model number column 102h. The ID column 102g stores an ID for identifying each row of the product information 102f. The product model number column 102h stores the product model number. The product model number can be identified from the product information 102f.
[0021] 1, the metadata extraction condition information storage unit 103 stores metadata extraction condition information indicating conditions for extracting character strings to be extracted as metadata. The metadata extraction condition information indicates extraction target character strings, which are character strings to be extracted from each of a plurality of character block types.
[0022] Fig. 5 is a schematic diagram showing an example of metadata extraction condition information 103a. The metadata extraction condition information 103a shown in Fig. 5 is information in a table format having an ID column 103b, a metadata type column 103c, a character block type column 103d to be extracted, and a character string column 103e to be extracted from the extraction target.
[0023] The ID column 103b stores IDs for identifying each row of the metadata extraction condition information 103a. The metadata type column 103c stores metadata types, which are the types of metadata for character strings extracted from the extraction targets. The character block type column 103d to be extracted stores the character block types of character blocks to be extracted from which character strings specified in the character string column 103e to be extracted from the extraction targets in the same row are extracted. The character string column 103e to be extracted from the extraction targets stores extraction target character string information indicating character strings to be extracted from character blocks of the character block type specified in the character block type column 103d to be extracted from the extraction targets in the same row. The character strings indicated in the extraction target character string information become the extraction target character strings.
[0024] The metadata extraction condition information 103a specifies the character string to be extracted from the character block and the character block type of the character block from which the character string is to be extracted.
[0025] 1, the character block identification unit 104 identifies character blocks from the document represented by the document data. For example, if a frame line is present, the character block identification unit 104 may identify the character string within the frame represented by the frame line as a character block.
[0026] Furthermore, when there are no frame lines, the character block identification unit 104 may identify character blocks based on the width of the space between characters, the height of the space between lines, or the type of line alignment (e.g., centered, left-justified, right-justified). Specifically, the character block identification unit 104 determines that a character block is separated if the width of the space between characters is wider than a predetermined threshold, or if the width of the space between characters changes from the width of the space between characters in other locations. The character block identification unit 104 also determines that a character block is separated if the height of the space between lines is wider than a predetermined threshold, or if the height of the space between lines changes from the height of the space between lines in other locations. Furthermore, the character block identification unit 104 determines that a character block is separated if the alignment between lines changes. The character block identification unit 104 then identifies character blocks, which are groups of characters, by appropriately combining the above determinations.
[0027] The character block type determination unit 105 determines the type of each of the multiple character blocks. For example, the character block type determination unit 105 calculates a score for each character block type depending on whether the character blocks identified by the character block identification unit 104 satisfy the characteristics registered in the character block type determination information storage unit 101, and determines the character block type, such as title, author, or body, based on the calculated score.
[0028] Specifically, the character block type determination unit 105 refers to the character block type determination information, and when multiple characters contained in a character block have the characteristics indicated in the character block type determination information, it calculates a score for each character block type by adding up the sums indicated in the character block type determination information.The character block type determination unit 105 then determines, among the multiple character blocks, the character block with the highest score in one of the two or more character block types indicated in the character block type determination information as that one character block type.Furthermore, the character block type determination unit 105 determines, among the multiple character blocks, a character block that is not determined to belong to any of the two or more character block types as a character block type other than the two or more character block types.
[0029] The metadata extraction unit 106 extracts, as metadata, character strings that match character strings to be extracted for a character block type from character blocks determined to be of that character block type, in accordance with the metadata extraction condition information stored in the metadata extraction condition information storage unit 103. Note that, when the metadata extraction condition information indicates a character string included in the character string DB 102 as a character string to be extracted, the metadata extraction unit 106 extracts, as metadata, character strings that match the character string included in the information stored in the character string DB 102 from the character blocks.
[0030] Next, a description will be given of the hardware configuration of the document processing device 100 according to the first embodiment. The document processing device 100 according to the first embodiment can be configured by a PC 10 as shown in Fig. 6. The PC 10 includes a processor 11, a memory 12, an auxiliary storage device 13, a display 14, an input I / F (Interface) 15, and a communication I / F 16.
[0031] The processor 11 controls the entire document processing device 100. For example, the processor 11 is a central processing unit (CPU), a field programmable gate array (FPGA), or the like. The processor 11 may be a multiprocessor. The document processing device 100 may also include a processing circuit.
[0032] The memory 12 is a main storage device of the document processing device 100. For example, the memory 12 is a RAM (Random Access Memory). The auxiliary storage device 13 is a persistent storage device of the document processing device 100. For example, the auxiliary storage device 13 is a HDD (Hard Disk Drive) or an SSD (Solid State Drive).
[0033] The display 14 displays various screen images. The input I / F 15 accepts input of various instructions. The input I / F 15 is, for example, a keyboard and a mouse. The communication I / F 16 is, for example, an interface for sending and receiving data to and from other devices via a network such as the Internet. For example, the communication I / F 16 is, for example, a network interface controller (NIC).
[0034] The character block identification unit 104, character block type determination unit 105, and metadata extraction unit 106 described above can be realized by the memory 12 and the processor 11 that executes the program stored in the memory 12.
[0035] Such a program may be provided via a network or may be provided by being recorded on a recording medium, i.e., may be provided as a program product.
[0036] The character block type determination information storage unit 101 , the character string DB (DataBase) 102 , and the metadata extraction condition information storage unit 103 can be realized by the auxiliary storage device 13 .
[0037] Next, the operation of the document processing device 100 according to the first embodiment will be described. FIG. 7 is a flowchart showing the operation of the document processing device 100 according to the first embodiment. First, the character block identification unit 104 identifies character blocks from the document indicated by the document data (S10). Here, the character block identification unit 104 generates character block information for the identified character blocks that associates the center coordinates of the character blocks, a character string, and its font information. The font information here only needs to include information used to determine the character block type. For example, in the example shown in FIG. 2, the font information is "font size" and "bold."
[0038] Next, the character block type determination unit 105 determines the character block type for each character block indicated by the character block information by referring to the information stored in the character block type determination information storage unit 101 and the character string DB 102 (S11). This process will be described in detail with reference to FIG. 8.
[0039] Next, the metadata extraction unit 106 refers to the information stored in the metadata extraction condition information storage unit 103 and the character string DB 102, and extracts metadata from the character strings of the character blocks indicated by the character block information (S12). The metadata extraction unit 106 extracts, as metadata, character strings to be extracted from the extraction target indicated by the metadata extraction condition information from character strings included in character blocks corresponding to the character block types to be extracted indicated by the metadata extraction condition information.
[0040] 8 is a flowchart showing the details of the operation of character block type determination unit 105. First, character block type determination unit 105 refers to the character block type determination information stored in character block type determination information storage unit 101, and calculates a score for each character block indicated by the character block information (S20).
[0041] Next, for each character block type, the character block with the highest score calculated in step S20 is determined by the character block type determination unit 105 (S21). At this time, a character block may be assigned multiple character block types. For a character block that has not been assigned any character block type, the character block type determination unit 105 determines the character block type to be "BODY."
[0042] An example of the operation of the document processing device 100 will be described with reference to Figures 9 and 10. Figure 9 is a schematic diagram showing an example of a document indicated by document data to be processed. Figure 10 is a schematic diagram showing an example of a result of identifying character blocks for the document shown in Figure 9.
[0043] First, the character block identification unit 104 identifies character blocks B1 to B8 shown in FIG. 10 for the document shown in FIG. 9, and identifies the center coordinates of the character block, the character string, and its font information from each of the character blocks B1 to B8.
[0044] Next, the character block type determining unit 105 determines the character block type for each of the character blocks B1 to B8.
[0045] An example of the specific operation of the character block type determination unit 105 will be described below. Here, an example of determining the character block type based on the character block type determination information 101a shown in Fig. 2, the organization information 102a shown in Fig. 3, and the product information 102f shown in Fig. 4 will be described.
[0046] First, the score of the character block type "AUTHOR" of character block B4 shown in Fig. 10 corresponds to the characteristics of ID1, ID2, and ID6 in Fig. 2, so it is 1.0 + 0.8 + 1.0 + 1 / 2 = 3.3. Also, the score of the character block type "AUTHOR" of character block B5 corresponds to the characteristics of ID1, ID2, ID5, and ID6 in Fig. 2, so it is 1.0 + 0.8 + 1.0 + 0.5 + 1 / 1 = 4.3.
[0047] Similarly, character block type determination unit 105 calculates the scores of the character block type "AUTHOR" for the other character blocks B1 to B3 and B6 to B8. Since character block B5 has the highest score for the character block type "AUTHOR," character block type determination unit 105 determines that character block B5 is of the character block type "AUTHOR."
[0048] Similarly, the character block type determining unit 105 calculates the scores for each of the character blocks B1 to B8 for the character block type "TITLE" and determines that the character block B1 is of the character block type "TITLE."
[0049] The character block type determining unit 105 then determines that the character blocks B2 to B4 and B6 to B8 that are not determined to be of the character block type "AUTHOR" or the character block type "TITLE" are of the character block type "BODY."
[0050] Next, an example of a specific operation of the metadata extraction unit 106 will be described. Here, as described above, it is assumed that the character block types of the character blocks B1 to B8 shown in Fig. 10 have been determined based on the character block type determination information 101a shown in Fig. 2, the organization information 102a shown in Fig. 3, and the product information 102f shown in Fig. 4. It is also assumed that the metadata extraction condition information storage unit 103 stores metadata extraction condition information 103a.
[0051] In the metadata extraction condition information 103a, the character strings to be extracted from the extraction target, namely, "person's name," "organization name," and "date expression," are to be extracted from the character block type "AUTHOR." Therefore, the metadata extraction unit 106 refers to the information stored in the character string DB 102 to extract the person's name "Takahashi," the organization name "First Technology Division," and the date expression "2022 / 04 / 01" from the character block B5.
[0052] Furthermore, in the metadata extraction condition information 103a, the character string "product model number" to be extracted from the extraction target is to be extracted from the character block type "BODY," so the metadata extraction unit 106 extracts the product model number stored in the product information 102f from character blocks B2 to B4 and B6 to B8. In this example, "AA1234B" is extracted from character block B7.
[0053] As described above, in embodiment 1, the character block type of the character block containing the character string to be extracted as metadata is identified by referring to the metadata extraction condition information 103a, thereby enabling more appropriate extraction of metadata.
[0054] Second Embodiment In the first embodiment described above, the character string DB 102 storing actual character strings as metadata is used to determine the metadata, but the embodiment is not limited to this example. For example, document data from which metadata has already been extracted can also be used to determine the metadata. This configuration will be described as a second embodiment.
[0055] 11 is a diagram schematically illustrating the configuration of a document processing device 200 according to embodiment 2. The document processing device 200 includes a character block type determination information storage unit 201, a character string DB 102, a metadata extraction condition information storage unit 103, a character block identification unit 104, a character block type determination unit 205, a metadata extraction unit 206, and a document information DB 207.
[0056] The character string DB 102, metadata extraction condition information storage unit 103, and character block identification unit 104 of the document processing device 200 according to embodiment 2 are similar to the character string DB 102, metadata extraction condition information storage unit 103, and character block identification unit 104 of the document processing device 100 according to embodiment 1.
[0057] The document information DB 207 is a document information storage unit that stores document data from which metadata has already been extracted, in association with the extracted metadata. The document data stored in the document information DB 207 is also referred to as accumulated document data.
[0058] Character block type determination information storage unit 201 stores character block type determination information. The character block type determination information in the second embodiment also includes information for determining the type of a character block based on the relationship with document data stored in document information DB 207.
[0059] Fig. 12 is a schematic diagram showing an example of character block type determination information according to embodiment 2. Character block type determination information 201a shown in Fig. 12 is information in a table format including an ID column 201b, a character block type column 201c, a feature column 201d, and a score addition column 201e.
[0060] Here, ID column 201b, character block type column 201c, feature column 201d, and score addition column 201e of character block type determination information 201a in embodiment 2 are similar to ID column 101b, character block type column 101c, feature column 101d, and score addition column 101e of character block type determination information 101a in embodiment 1. However, as indicated by ID10 and ID11, character block type determination information 201a in embodiment 2 includes information for determining the type of character block based on its relationship with document data stored in document information DB 207.
[0061] Here, for example, the number of words appearing in both the document indicated by the document data to be processed and the document indicated by the document data stored in the document information DB 207 is calculated, and if the number of words appearing in the document indicated by the document data to be processed that also appear in the document indicated by the document data stored in the document information DB 207 out of the total number of words appearing in the document indicated by the document data to be processed exceeds a threshold, it can be determined that these document data are similar. Note that the similarity of document data may be determined using another method.
[0062] Character block type determination unit 205 calculates a score for each character block type depending on whether the character blocks identified by character block identification unit 104 satisfy the characteristics registered in character block type determination information storage unit 201, and determines the character block type, such as title, author, or body, based on the calculated score. In the second embodiment, character block type determination unit 205 also references document data stored in document information DB 207 to determine the character block type.
[0063] The metadata extraction unit 206 extracts, as metadata, character strings that match the extraction target character strings in the character block type from the corresponding character blocks in accordance with the metadata extraction condition information stored in the metadata extraction condition information storage unit 103 .
[0064] Here, in the second embodiment, when the stored document data is similar to the document data from which metadata is extracted, the metadata extraction unit 206 extracts a character string from the document data that matches a specific character string contained in the stored document data.
[0065] Specifically, in the second embodiment, the metadata extraction unit 206 may refer to the document data and metadata stored in the document information DB 207, for example, search the document information DB 207 for document data similar to the document data to be processed, and extract metadata from the identified character block by determining whether the name of the creator of the similar document data is included in the character string.
[0066] As described above, according to the second embodiment, by using document data from which metadata has already been extracted, it is possible to extract metadata more appropriately.
[0067] 100, 200 Document processing device; 101, 201 Character block type determination information storage unit; 102 Character string DB; 103 Metadata extraction condition information storage unit; 104 Character block identification unit; 105, 205 Character block type determination unit; 106, 206 Metadata extraction unit; 207 Document information DB.
Claims
1. A document processing device comprising: a character block identification unit that identifies a plurality of character blocks, each containing a group of a plurality of characters, from a document represented by document data; a character block type determination unit that determines the character block type which is the type of each of the plurality of character blocks; and a metadata extraction unit that extracts, as metadata, from one character block, a string that matches the extraction target string in the character block type determined for one character block included in the plurality of character blocks, in accordance with metadata extraction condition information indicating an extraction target string which is a string to be extracted from each of the plurality of character block types.
2. The document processing device according to claim 1, wherein the character block type determination unit refers to character block type determination information indicating an additive value for a feature possessed by each of two or more character block types, calculates a score for each of the two or more character block types by adding up the additive values when the multiple characters have the feature, determines a character block having the highest score in one character block type included in the two or more character block types among the multiple character blocks to be the one character block type, and determines a character block not determined to be one of the two or more character block types among the multiple character blocks to be a character block type other than the two or more character block types.
3. The document processing device according to claim 2, further comprising a document information storage unit that stores document data from which metadata has already been extracted as accumulated document data, wherein the characteristics include a relationship with the accumulated document data.
4. A document processing device as claimed in any one of claims 1 to 3, characterized in that when the metadata extraction condition information indicates a string contained in string information as the string to be extracted, the metadata extraction unit extracts a string that matches the string contained in the string information as metadata from the one character block.
5. A document processing device as described in claim 1 or 2, further comprising a document information storage unit that stores document data from which metadata has already been extracted as accumulated document data, wherein the metadata extraction unit extracts, when the accumulated document data is similar to the document data from which the character blocks have been identified, a character string that matches a specific character string contained in the accumulated document data from the document data from which the character blocks have been identified.
6. A program causing a computer to function as: a character block identification unit that identifies, from a document represented by document data, a plurality of character blocks, each of which contains a group of a plurality of characters; a character block type determination unit that determines the character block type which is the type of each of the plurality of character blocks; and a metadata extraction unit that extracts, as metadata, from one character block, a string that matches the extraction target string in the character block type determined for one character block included in the plurality of character blocks, in accordance with metadata extraction condition information indicating an extraction target string which is a string to be extracted from each of the plurality of character block types.
7. A document processing method comprising the steps of: identifying a plurality of character blocks, each containing a group of a plurality of characters, from a document represented by document data; determining a character block type which is a type of each of the plurality of character blocks; and extracting, as metadata, from one character block, a string which matches the extraction target string in the character block type determined for one character block included in the plurality of character blocks, in accordance with metadata extraction condition information which indicates an extraction target string which is a string to be extracted from each of the plurality of character block types.
Citation Information
Patent Citations
Metadata extraction device and method therefor
JP2010102668A
