Character processing system, character processing method, and character processing program

The character processing system addresses the challenge of accurately extracting dates from document images by evaluating date candidates based on their positional relationships and image positions, resulting in improved extraction accuracy.

JP2025049847APending Publication Date: 2025-04-04SHARP KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023158306
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Conventional character recognition systems struggle to accurately extract dates from images of documents, as keywords like '/' and '.' can lead to incorrect extraction of character strings that contain these symbols, even if they are not dates.

Method used

A character processing system that includes an acquisition processing unit to recognize character strings, a calculation processing unit to evaluate date candidates based on predetermined conditions, a specific processing unit to identify the most accurate date string, and an output processing unit to output the extracted date.

Benefits of technology

The system effectively extracts dates from input images by evaluating the positional relationships of date candidates with related and non-related words, and their positions within the image, thereby improving the accuracy of date extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025049847000001_ABST
    Figure 2025049847000001_ABST
Patent Text Reader

Abstract

To provide a character processing system, a character processing method, and a character processing program, which can properly extract the date of an input image.SOLUTION: An acquisition processing section 113 acquires a result of character recognition processing to be executed for a character string included in an image of a document. A calculation processing section 114 calculates an evaluation value according to a prescribed condition for each of a plurality of date character string candidates included in the result of the character recognition processing. A specification processing section 115 specifies a prescribed date character string candidate on the basis of the evaluation value of each of the plurality of date character string candidates calculated by the calculation processing section 114. An output processing section 116 outputs the prescribed date character string candidate specified by the specification processing section 115.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to techniques for performing processing such as character recognition on images such as documents. [Background technology]

[0002] Conventionally, there is known a technique for extracting dates, amounts, etc. from text data obtained by character recognition of images of documents such as documents and slips. For example, there is known a technique for extracting dates and amounts from text data using keywords such as "month", "day", " / ", and "." (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2015-118488 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, with conventional technology, for example, when a character string other than a date (such as an email address or URL) contains the keywords " / " or ".", the character string is extracted as a date.

[0005] An object of the present disclosure is to provide a character processing system, a character processing method, and a character processing program capable of appropriately extracting a date from an input image. [Means for solving the problem]

[0006] A character processing system according to one aspect of the present disclosure includes an acquisition processing unit, a calculation processing unit, an identification processing unit, and an output processing unit. The acquisition processing unit acquires a result of a character recognition process executed on a character string included in an image of a document. The calculation processing unit calculates an evaluation value according to a predetermined condition for each of a plurality of date string candidates included in the result of the character recognition process. The identification processing unit identifies a predetermined date string candidate based on the evaluation value of each of the plurality of date string candidates calculated by the calculation processing unit. The output processing unit outputs the predetermined date string candidate identified by the identification processing unit.

[0007] A character processing method according to another aspect of the present disclosure is a method in which one or more processors perform the following steps: obtain the result of a character recognition process performed on a character string included in an image of a document; calculate an evaluation value according to predetermined conditions for each of a plurality of date string candidates included in the result of the character recognition process; identify a predetermined date string candidate based on the evaluation value for each of the plurality of date string candidates; and output the predetermined date string candidate.

[0008] A character processing program according to another aspect of the present disclosure is a program for causing one or more processors to execute the following steps: obtain the result of a character recognition process performed on a character string included in an image of a document; calculate an evaluation value according to predetermined conditions for each of a plurality of date string candidates included in the result of the character recognition process; identify a predetermined date string candidate based on the evaluation value for each of the plurality of date string candidates; and output the predetermined date string candidate. Effect of the Invention

[0009] According to the present disclosure, it is possible to provide a character processing system, a character processing method, and a character processing program capable of appropriately extracting the date of an input image. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a functional block diagram showing a configuration of a character processing device according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a diagram illustrating an example of a document (an invoice) according to an embodiment of the present disclosure. [Diagram 3] FIG. 3 is a diagram illustrating an example of a character string list of character strings extracted by character recognition processing according to an embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram illustrating an example of a rectangle extracted from a document image according to an embodiment of the present disclosure. [Diagram 5] FIG. 5 is a diagram showing an example of a target character string candidate list used in the character processing device according to the embodiment of the present disclosure. [Figure 6] FIG. 6 is a diagram showing an example of a date character string candidate list used in the character processing device according to the embodiment of the present disclosure. [Figure 7] FIG. 7 is a diagram showing an example of a date (numeric value) specified in the character processing device according to the embodiment of the present disclosure. [Figure 8] FIG. 8 is a diagram showing an example of keyword information used in the character processing device according to the embodiment of the present disclosure. [Figure 9] FIG. 9 is a diagram showing an example of an evaluation value calculated in the character processing device according to the embodiment of the present disclosure. [Figure 10] FIG. 10 is a diagram showing an example of an extraction target determined in the character processing device according to the embodiment of the present disclosure. [Figure 11] FIG. 11 is a flowchart showing an example of a procedure of character processing executed in the character processing device according to the embodiment of the present disclosure. [Figure 12] FIG. 12 is a diagram showing another example of a method for calculating an evaluation value in a character processing device according to an embodiment of the present disclosure. [Figure 13] FIG. 13 is a diagram showing another example of a method for calculating an evaluation value in a character processing device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. Note that the following embodiments are examples of the present disclosure and are not intended to limit the technical scope of the present disclosure.

[0012] [Character Processing Device 1] 1 is a block diagram showing a configuration of a character processing device 1 according to an embodiment of the present disclosure. The character processing device 1 recognizes a character string included in an input image (image data), performs a well-known character recognition process (OCR process) on the recognized character string, and further performs a predetermined character process (character string process) on the result of the OCR process, and outputs the process result. Note that the character processing device 1 may obtain the result of the OCR process executed in an external device and execute the predetermined character process.

[0013] 1, the character processing device 1 includes a control unit 11, a storage unit 12, an operation display unit 13, a communication unit 14, etc. The character processing device 1 is an information processing device such as a personal computer or a cloud server. The character processing device 1 may be one or more cloud servers, or one or more physical servers.

[0014] The communication unit 14 is a communication interface for connecting the character processing device 1 to a network in a wired or wireless manner and for executing data communication with an external device via the network in accordance with a predetermined communication protocol. The network is, for example, the Internet, a LAN, or the like.

[0015] The operation display unit 13 is a user interface that includes a display unit, such as a liquid crystal display or an organic EL display, that displays various information, and an operation unit, such as a mouse, a keyboard, or a touch panel, that accepts operations.

[0016] The storage unit 12 is a non-volatile storage unit such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory that stores various information. The storage unit 12 stores a control program such as a character processing program (one example of the character processing program of the present disclosure) for causing the control unit 11 to execute character processing (see FIG. 11 ) described below. For example, the character processing program is non-temporarily recorded on a computer-readable recording medium such as a CD or a DVD, and is read by a reading device (not shown) such as a CD drive or a DVD drive provided in the character processing device 1 and stored in the storage unit 12. The character processing program may be distributed from a cloud server and stored in the storage unit 12.

[0017] The storage unit 12 also stores image data (scanned data, etc.) of documents and the like acquired from external devices.

[0018] FIG. 2 shows an invoice as an example of a document. As shown in FIG. 2, an invoice includes multiple character strings such as document classification ("invoice"), invoice number, issue date, destination, issuer contact information (company name, postal code, address, telephone number, etc.), invoice amount, product name, quantity, unit, unit price, amount, subtotal, consumption tax, total amount, and transfer destination. A user scans the invoice in an external device and uploads image data (input image) to the character processing device 1. When the control unit 11 acquires image data of the invoice, it stores the image data in the storage unit 12. As another embodiment, the control unit 11 may acquire a document file of the invoice created in an external device and store the document file in the storage unit 12.

[0019] The control unit 11 has control devices such as a CPU, a ROM, and a RAM. The CPU is a processor that executes various arithmetic operations. The ROM stores in advance control programs such as a BIOS and an OS for causing the CPU to execute various processes. The RAM stores various information and is used as a temporary storage memory (work area) for the various processes executed by the CPU. The control unit 11 controls the character processing device 1 by executing, by the CPU, various control programs that are stored in advance in the ROM or the storage unit 12.

[0020] When the control unit 11 acquires image data of a document, it performs preprocessing such as resolution conversion processing, skew correction processing, and background removal processing on the image data, and then performs character string (document part) recognition processing (extraction processing). For example, the control unit 11 recognizes each part such as character strings, tables, illustrations, and seals as rectangular areas of objects in the image data that has been subjected to the preprocessing. Furthermore, after performing document part recognition processing, the control unit 11 performs character recognition processing (OCR processing) on ​​the entire image data (entire image). Furthermore, the control unit 11 performs a predetermined character processing on the result of the OCR processing.

[0021] In this embodiment, the control unit 11 performs OCR processing and character processing on character strings of dates such as an issue date and a deadline included in an input image.

[0022] Specifically, as shown in Fig. 1, the control unit 11 includes various processing units such as a detection processing unit 111, a recognition processing unit 112, an acquisition processing unit 113, a calculation processing unit 114, a specific processing unit 115, and an output processing unit 116. The control unit 11 functions as the various processing units by executing various processes according to the character processing program. Some or all of the processing units included in the control unit 11 may be configured with electronic circuits. The character processing program may be a program for causing a plurality of processors to function as the various processing units.

[0023] The control unit 11 acquires an input image. Specifically, the control unit 11 acquires an image (input data) to be subjected to character recognition from an external device. For example, the control unit 11 acquires image data of various document images such as an invoice shown in FIG. 2.

[0024] The detection processing unit 111 detects character rectangles, which are character regions of each character in a character string, from an input image.

[0025] The recognition processing unit 112 executes character recognition processing (OCR processing). Specifically, the recognition processing unit 112 executes OCR processing on the characters of the character rectangle detected by the detection processing unit 111. The recognition processing unit 112 extracts characters in units of one character by the OCR processing. The recognition processing unit 112 also executes a wordization process that groups the characters in units of one character into word units (character strings). When the recognition processing unit 112 extracts each character string, it registers it in a character string list D1 (see FIG. 3). In the character string list D1, information such as a number, a character string, and position coordinates is associated with each extracted character string and registered. Note that the position coordinates are represented, for example, by the start point coordinates (upper left coordinates) and end point coordinates (lower right coordinates) of the rectangle of the character string.

[0026] The acquisition processing unit 113 acquires the result of OCR processing executed on character strings of a predetermined item included in the input image. Specifically, the acquisition processing unit 113 acquires the result of OCR processing executed by the recognition processing unit 112. For example, the acquisition processing unit 113 acquires a character string list D1 (see FIG. 3) corresponding to the invoice in FIG. 2. As another embodiment, the acquisition processing unit 113 may acquire the result of OCR processing (character string list D1) executed in an external device. The character string list D1 is stored in the storage unit 12.

[0027] The calculation processing unit 114 calculates an evaluation value according to a predetermined condition for each of a plurality of date character string candidates included in the result of the OCR processing.

[0028] Specifically, the calculation processing unit 114 extracts, from the multiple character strings (character string list D1) acquired by OCR processing, character strings that include characters related to dates and are composed of a predetermined number of characters as target character string candidates. For example, when a character string begins with "20" or "19", it indicates the top two digits of the Gregorian calendar year, while "Reiwa" or "Heisei" indicates the era name. For this reason, the calculation processing unit 114 extracts character strings that begin with "20", "19", "Reiwa", or "Heisei".

[0029] Furthermore, when expressing a date, delimiters such as " / ", ".", ",", and "-" may be used. For this reason, the calculation processing unit 114 extracts character strings that include " / ", ".", ",", or "-".

[0030] For example, as shown in Fig. 4, an invoice includes character strings beginning with "20" such as "March 31, 2023", "April 4, 2023", and "20,000", and a character string beginning with "19" such as "19,200". The calculation processing unit 114 extracts these character strings from the character string list D1 as target character string candidates. Fig. 5 shows a target character string candidate list D2 in which the target character string candidates are registered.

[0031] Here, when the target character string candidate contains an erroneously recognized character, the calculation processing unit 114 executes a correction process to correct the character. For example, when the characters for "year", "month", and "day" are recognized as erroneous characters, the calculation processing unit 114 corrects the character error. Also, when the characters for the date numeric value are recognized as erroneous characters, the calculation processing unit 114 corrects the character error of the numeric value. The calculation processing unit 114 registers the corrected character string corrected by the correction process in the target character string candidate list D2.

[0032] Next, the calculation processing unit 114 extracts date string candidates from the plurality of string candidates registered in the target string candidate list D2. Specifically, the calculation processing unit 114 extracts the delimiter characters for dates from the target string candidates and identifies the positions of the extracted delimiter characters within the string. For example, the calculation processing unit 114 determines whether the character "year" is included in the string of the target string candidate. When the character "year" is not included in the string, the calculation processing unit 114 determines whether there are characters (such as "dan" etc.) that are easily misrecognized as "year", and replaces them with "year" if they exist. The calculation processing unit 114 makes the same determination for the characters "month" and "day".

[0033] The calculation processing unit 114 identifies the character strings of numerical values indicating the year, month, and day from the identified positions. The calculation processing unit 114 excludes the target strings for which the character strings of numerical values indicating the year, month, and day cannot be identified, and extracts the date string candidates. FIG. 6 shows a date string candidate list D3 in which date string candidates are registered.

[0034] Next, the calculation processing unit 114 converts the character strings of numerical values indicating the identified year, month, and day into numerical values. The calculation processing unit 114 determines whether there are characters (such as the English letter "O" etc.) that are easily misrecognized as numerical values, and replaces them with the correct characters (such as the number "0" etc.) if they exist. Also, the calculation processing unit 114 determines whether the converted numerical values are within a reasonable range as the year, month, and day, and if they are within the reasonable range, determines each numerical value of the year, month, and day as a date candidate. FIG. 7 shows the result of determining that each numerical value of the converted year, month, and day is within a reasonable range.

[0035] When the calculation processing unit 114 determines the date string candidates, it calculates an evaluation value for each candidate. Specifically, the calculation processing unit 114 calculates the evaluation value of each date string candidate based on at least one of the following conditions: (1) the positional relationship between the date string candidate and the related word, (2) the positional relationship between the date string candidate and the NG word, and (3) the position of the date string candidate within the image.

[0036] (1) The positional relationship between the date string candidate and the related word Specifically, when a related word related to a date is included within a predetermined range from the position of a date string candidate in the input image, the calculation processing unit 114 adds a predetermined evaluation value to the date string candidate. FIG. 8 shows an example of keyword information D4. In the keyword information D4, related words and NG words are associated and registered for each type (classification) of document. The related words are terms related to a document, terms essential to a document, etc. For example, related words for an invoice include terms such as issue date and billing date, and related words for an estimate include terms such as issue date and estimate date. The NG words are terms that are less related to a document, terms that are not essential to a document, etc. For example, NG words for an invoice include terms such as payment deadline, closing date, and delivery date, and related words for an estimate include terms such as payment deadline and order date. The related words and NG words may be registered in advance by a user's registration operation, or may be registered in advance by the control unit 11 according to the classification of the document.

[0037] When a related word related to a date is included within a predetermined range from the position of the date string candidate in the input image (image data), the calculation processing unit 114 assigns a predetermined evaluation value to the date string candidate. For example, "issue date" (position (x2, y2)), which is a related word of "invoice", exists near the position (x3, y3) of the character string "March 31, 2023" of the date string candidate. In this case, the calculation processing unit 114 assigns a positive evaluation value A1 to "March 31, 2023". The predetermined range is set to a predetermined length in each of the up, down, left and right directions based on the center position (center coordinates) of the rectangle of the date string candidate. Note that, when a character string existing within the predetermined range does not completely match a related word of the keyword information D4, the calculation processing unit 114 may assign an evaluation value according to the number of characters included in the character string that match characters included in the related word. For example, the calculation processing unit 114 sets a higher positive evaluation value as the number of matching characters increases.

[0038] (2) Positional relationship between date string candidates and NG words When an NG word (non-related character) not related to a date is included within a predetermined range from the position of the date string candidate in the input image (image data), the calculation processing unit 114 subtracts a predetermined evaluation value from the date string candidate (assigns a negative evaluation value). For example, near the position (x18, y18) of the character string "April 4, 2023" of the date string candidate, there is a "payment deadline" (position (x17, y17)), which is an NG word for "invoice". In this case, the calculation processing unit 114 assigns a negative evaluation value B1 to "April 4, 2023". Note that, when a character string existing within the predetermined range does not completely match a related word of the keyword information D4, the calculation processing unit 114 may assign an evaluation value according to the number of characters included in the character string that match characters included in the related word. For example, the calculation processing unit 114 sets a higher negative evaluation value as the number of matching characters increases.

[0039] (3) Position of the date string candidate in the image The calculation processing unit 114 assigns an evaluation value to the date string candidate according to the distance from the center position (P0 in FIG. 4) of the input image (image data) to the position of the date string candidate. For example, for the date string candidate ("March 31, 2023") that includes a related word related to the date within the predetermined range, the calculation processing unit 114 assigns an evaluation value according to the distance from the center position P0 (see FIG. 4) to the center position of the rectangle of "March 31, 2023". For example, the calculation processing unit 114 sets a higher positive evaluation value the farther the distance is.

[0040] In the above configuration, the reference point for the distance is set to the center position of the input image. For example, when the document category is "invoice", character strings to be extracted, such as "issue date" and "invoice date", are usually placed in the corners (top right, top left, etc.) of the document, and are rarely placed in the center of the document. Therefore, the control unit 11 sets the reference point to a position where it is unlikely to be placed. However, the position of the reference point is not limited to the center of the document, and may be set according to the document category, such as the top right corner or the top left corner.

[0041] The calculation processing unit 114 calculates a total evaluation value for each date string candidate by adding up the evaluation values ​​calculated based on at least one of the above conditions: (1) the positional relationship between the date string candidate and related words, (2) the positional relationship between the date string candidate and NG words, and (3) the position of the date string candidate within the image. FIG. 9 shows an example of the total evaluation value for each date string candidate. The calculation processing unit 114 may also convert the total evaluation value into a reliability indicating the likelihood of the extraction target. For example, the calculation processing unit 114 sets a reference value (initial value) of the reliability to 50%, and calculates a reliability of 0 to 100% according to the total evaluation value.

[0042] The identification processing unit 115 identifies a date to be extracted. Specifically, the identification processing unit 115 identifies a predetermined date string candidate based on the evaluation value of each of the multiple date string candidates calculated by the calculation processing unit 114. For example, the identification processing unit 115 identifies the date string candidate having the highest evaluation value (total evaluation value) among the multiple date string candidates. Also, the identification processing unit 115 identifies the date string candidate having the highest reliability among the multiple date string candidates. In the above example, the identification processing unit 115 identifies the date string candidate "March 31, 2023" with a reliability of 90% (see FIG. 10). As another embodiment, the identification processing unit 115 may identify a predetermined number (for example, the top 5) of date string candidates in descending order of reliability among the multiple date string candidates.

[0043] The output processing unit 116 outputs the predetermined date character string candidate identified by the identification processing unit 115. In the above example, the output processing unit 116 outputs "March 31, 2023". For example, the output processing unit 116 displays "March 31, 2023" on the operation display unit 13 of the character processing device 1 or on the user terminal as the extraction result of the date of the "invoice" shown in FIG. 2. As another embodiment, the output processing unit 116 may display multiple (top five) date character string candidates identified by the identification processing unit 115 in order of decreasing evaluation value (reliability).

[0044] [Text processing] FIG. 11 is a flowchart showing an example of a procedure for character processing executed in the character processing device 1 according to this embodiment.

[0045] The present disclosure can be understood as a character processing method (character processing method of the present disclosure) that executes one or more steps included in the character processing. One or more steps included in the character processing described here may be omitted as appropriate. The steps in the character processing may be executed in a different order as long as the same action and effect is achieved. Furthermore, although an example is described here in which the control unit 11 of the character processing device 1 executes each step in the character processing, in other embodiments, one or more processors may execute each step in the character processing in a distributed manner.

[0046] In step S1, the control unit 11 acquires an input image. For example, the control unit 11 acquires image data of a document image (invoice) shown in FIG.

[0047] Next, in step S2, the control unit 11 detects character rectangles, which are character regions of each character in the character string, from the input image. For example, the control unit 11 detects character rectangles of each character from the image of the invoice shown in FIG.

[0048] Next, in step S3, the control unit 11 executes OCR processing. Specifically, the control unit 11 executes OCR processing on the characters in the character rectangle. The control unit 11 executes a word processing to extract characters in units of one character through the OCR processing, and to organize the characters in units of one character into word units (character strings). When the control unit 11 extracts each character string, it registers it in a character string list D1 (see FIG. 3).

[0049] Next, in step S4, the control unit 11 extracts target character string candidates. Specifically, the control unit 11 extracts character strings that include characters related to dates and are composed of a predetermined number of characters from a plurality of character strings (character string list D1) acquired by OCR processing as target character string candidates. For example, the control unit 11 extracts character strings beginning with "20", "19", "Reiwa", or "Heisei" from the character string list D1 (see FIG. 3), and character strings that include " / ", ".", ",", or "-". FIG. 5 shows a target character string candidate list D2 in which target character string candidates are registered.

[0050] Next, in step S5, if the target character string candidate contains an erroneously recognized character, the control unit 11 executes a correction process to correct the character. For example, if the characters for "year", "month", and "day" are recognized as erroneous characters, the control unit 11 corrects the character error. Also, for example, if the characters for the date numeric value are recognized as erroneous characters, the control unit 11 corrects the numeric character error. The calculation processing unit 114 registers the corrected character string corrected by the correction process in the target character string candidate list D2.

[0051] Next, in step S6, the control unit 11 extracts date string candidates from a plurality of string candidates registered in the target string candidate list D2. Specifically, the control unit 11 extracts date string candidates by determining whether the target string candidate includes a "year", a "month", or a "day" in the string of the target string candidate. The control unit 11 also identifies the characters "year", "month", and "day", and identifies numeric strings indicating the year, month, and day from the identified positions. The control unit 11 extracts date string candidates by excluding target strings for which numeric strings cannot be identified. FIG. 6 shows the date string candidate list D3 in which date string candidates are registered.

[0052] Furthermore, the control unit 11 identifies a string of numbers indicating the year, month, and day from the positions of the characters "year," "month," and "day," and converts (corrects) the string of numbers into a numeric value.

[0053] Next, in step S7, the control unit 11 calculates an evaluation value (reliability) for each of the extracted date string candidates. Specifically, the control unit 11 calculates the evaluation value for each date string candidate based on at least one of the following conditions: (1) the positional relationship between the date string candidate and related words, (2) the positional relationship between the date string candidate and NG words, and (3) the position of the date string candidate within the image. The calculation method for the evaluation values ​​corresponding to the conditions (1) to (3) is as described above. Fig. 9 shows an example of the evaluation value (total evaluation value) for each date string candidate.

[0054] Next, in step S8, the control unit 11 identifies a date to be extracted. Specifically, the control unit 11 identifies the date character string candidate having the highest total evaluation value (reliability) from among the multiple date character string candidates. As another embodiment, the control unit 11 may identify a predetermined number of date character string candidates from among the multiple date character string candidates in descending order of reliability.

[0055] Finally, in step S9, the control unit 11 outputs the specified date character string candidate that has been identified. For example, the control unit 11 causes the operation display unit 13 of the character processing device 1 or the user terminal to display "March 31, 2023" as the extraction result of the date of the "invoice" shown in Fig. 2. As another embodiment, the control unit 11 may cause the specified multiple (top five) date character string candidates to be displayed in order of decreasing evaluation value (reliability).

[0056] In this manner, the control unit 11 executes the character processing. The control unit 11 executes the character processing every time an input image is acquired, and outputs the date to be extracted.

[0057] As described above, the character processing device 1 according to this embodiment obtains the result of character recognition processing (OCR processing) executed on a character string included in a document image (input image), and calculates an evaluation value according to a predetermined condition for each of a plurality of date string candidates included in the result of the character recognition processing. Furthermore, the character processing device 1 identifies a predetermined date string candidate based on the calculated evaluation value for each of the plurality of date string candidates, and outputs the identified predetermined date string candidate.

[0058] According to the above configuration, for each of a plurality of date string candidates related to a date, an evaluation value can be calculated based on conditions such as (1) the positional relationship between the date string candidate and related words, (2) the positional relationship between the date string candidate and NG words, (3) the position of the date string candidate within the image, and the reliability of each date string candidate can be determined. This makes it possible to extract an appropriate date corresponding to a document.

[0059] In the method of calculating an evaluation value based on the condition of "(1) the positional relationship between the candidate date string and related words," for example, when a related character (related word) related to a date is included within a predetermined range from the position of the candidate date string in the image, the character processing device 1 adds a predetermined evaluation value to the candidate date string (assigns a positive evaluation value).

[0060] In the method of calculating the evaluation value based on the condition of "(2) the positional relationship between the date string candidate and the NG word", for example, when a non-date-related character (NG word) that is not related to the date is included within a predetermined range from the position of the date string candidate in the image, the character processing device 1 subtracts a predetermined evaluation value from the date string candidate (assigns a negative evaluation value).

[0061] In the method of calculating an evaluation value based on the condition of "(3) the position of the date string candidate in the image", for example, the character processing device 1 adds the evaluation value corresponding to the distance from the center position of the image to the position of the date string candidate (assigns a positive evaluation value) to the date string candidate.

[0062] As described above, the character processing device 1 performs OCR processing on a document image obtained by scanning (read image) or imaging an electronic document to convert it into characters (character extraction), converts the characters obtained by OCR processing into a string of characters based on the positional relationship with the preceding and following characters (word conversion), determines whether the text string matches a string specific to a date (target string extraction), and if a matching string is found, determines whether it is date text information (date string extraction), and if it satisfies specified conditions as date text information, converts it into numerical data (date data conversion), and extracts a target date from the relevance to surrounding strings and sorting to obtain the desired date (target date extraction).

[0063] In addition, the character processing device 1 extracts the desired date from the image and characters (improving extraction accuracy by using composite information rather than just one piece of information), extracts date candidates from the beginning of characters specific to the date (extraction based on character string information), corrects misrecognition in the OCR process by taking into account the character sequence specific to the date (word correct specialized for the date, executed within the date extraction process), evaluates the target date using the position information of the date string within the image (extraction based on position information within the image), and evaluates based on the proximity indexed by the character number with respect to a string highly related to the desired date.

[0064] [Other embodiments] As another embodiment of the present disclosure, the control unit 11 may set the date selected by the user as the extraction target. For example, in the invoice shown in FIG. 2, when the user selects "payment deadline" as the character to be extracted, the control unit 11 sets "payment deadline" as the extraction target. In this case, the control unit 11 sets words related to the payment deadline (such as "payment deadline," "closing date," and "delivery date") as related words in the keyword information D4, and sets words unrelated to the payment deadline (such as "issue date," "billing date," and "invoice date") as NG words. The control unit 11 executes a process of calculating the evaluation value using the keyword information D4 set according to the extraction target.

[0065] As another embodiment of the present disclosure, the control unit 11 may calculate the evaluation value by using the difference in the character string number ("character string No." in the character string list D1 in FIG. 3).

[0066] Specifically, the character string numbers are assigned in order from the top left corner of the document to the right and then downward. In general, a character string located to the left of the target character string is more likely to be a related word, and a character string located to the right of the target character string is less likely to be a related word. Therefore, for related words, the control unit 11 adds a score when the difference between the character string number of the target character string and the character string number of the related word (character string number of the related word-character string number of the target character string) is negative, and subtracts a score when the difference is positive. In addition, the control unit 11 subtracts a score for NG words regardless of whether the difference is positive or negative. FIG. 12 shows an example of a score table corresponding to the difference. In the score table, a higher score is registered when the target character string is closer to the keyword (the difference in character string number is smaller).

[0067] A specific example of a method for calculating an evaluation value will be described with reference to FIG. 13. For example, for "March 31, 2023" with character string number "3", the character string number of the related word "publication date" is "2", so the difference in character string number is "-1". Therefore, the control unit 11 obtains "+20" from the score table in FIG. 12. The control unit 11 multiplies the score obtained from the score table by (number of characters-1) to calculate an evaluation value. Since the number of characters in "publication date" is three, the control unit 11 multiplies the score "+20" by (3-1)=2 to calculate an evaluation value of "+40".

[0068] For example, for "April 4, 2023" with character string number "18", the character string number of the NG word "deadline" is "17", so the difference in character string numbers is "-1". Therefore, the control unit 11 obtains "-20" from the score table in FIG. 12. The control unit 11 multiplies the score obtained from the score table by (number of characters - 1) to calculate an evaluation value. Since the number of characters in "deadline" is two, the control unit 11 multiplies the score "-20" by (2-1) = 1 to calculate an evaluation value of "-20".

[0069] According to the above configuration, it is possible to calculate the evaluation value without using information from the image (here, coordinates with the upper left corner as the origin).

[0070] The character processing device 1 according to the present disclosure is an example of a character processing system according to the present disclosure. That is, the character processing system according to the present disclosure may be configured by the character processing device 1 alone. Also, the character processing system according to the present disclosure may be configured by the character processing device 1 and a character recognition device that executes OCR processing. Also, the character processing system according to the present disclosure may be configured by the character processing device 1, the character recognition device, and an output device that outputs (displays) the character recognition result. For example, the output device may be a user terminal (personal computer, smartphone, etc.), and the user terminal may execute a character recognition application (Web application) to request the character processing device 1 to perform character recognition processing of a document image, and obtain and display the character recognition result from the character processing device 1.

[0071] [Disclosure Note] The following will provide an outline of the disclosure extracted from the above-described embodiment. Note that the configurations and processing functions described in the following supplementary notes can be selected and combined in any desired manner.

[0072] <Appendix 1> an acquisition processing unit that acquires a result of a character recognition process executed on a character string included in an image of a document; a calculation processing unit that calculates an evaluation value according to a predetermined condition for each of a plurality of date character string candidates included in a result of the character recognition process; a specification processing unit that specifies a predetermined date string candidate based on the evaluation value of each of the plurality of date string candidates calculated by the calculation processing unit; an output processing unit that outputs the predetermined date character string candidate identified by the identification processing unit; A character processing system comprising:

[0073] <Appendix 2> the calculation processing unit extracts, from the plurality of character strings acquired by the character recognition processing, a character string that includes a character related to a date and is composed of a predetermined number of characters, as the date character string candidate; 2. A character processing system as described in appended claim 1.

[0074] <Appendix 3> the calculation processing unit adds a predetermined evaluation value to the date string candidate when a character related to a date is included within a predetermined range from a position of the date string candidate in the image; 3. A character processing system according to claim 1 or 2.

[0075] <Appendix 4> the calculation processing unit subtracts a predetermined evaluation value from the date string candidate when a character unrelated to a date is included within the predetermined range from a position of the date string candidate in the image; 4. A character processing system as described in appended claim 3.

[0076] <Appendix 5> the calculation processing unit adds, to the date string candidate, the evaluation value according to a distance from a center position of the image to a position of the date string candidate; 5. A character processing system according to any one of claims 1 to 4.

[0077] <Appendix 6> the identification processing unit identifies the date character string candidate having the highest evaluation value from among the plurality of date character string candidates. 6. A character processing system according to any one of appendix 1 to 5.

[0078] <Appendix 7> the related characters and the non-related characters are registered in advance in association with each other for each type of document; 5. A character processing system as described in appended claim 4.

[0079] <Appendix 8> the output processing unit displays the plurality of date string candidates in descending order of the evaluation value. A character processing system according to any one of appendix 1 to 7. [Explanation of symbols]

[0080] 1: Character processing device 11: Control section 12: Storage section 13: Operation display section 14: Communications Department 111: Detection processing unit 112: Recognition processing unit 113: Acquisition processing unit 114: Calculation processing unit 115: Specific Processing Unit 116: Output processing section D1: String list D2: List of candidate strings D3: Date string candidate list D4: Keyword information

Claims

1. an acquisition processing unit that acquires a result of a character recognition process executed on a character string included in an image of a document; a calculation processing unit that calculates an evaluation value according to a predetermined condition for each of a plurality of date character string candidates included in a result of the character recognition process; a specification processing unit that specifies a predetermined date string candidate based on the evaluation value of each of the plurality of date string candidates calculated by the calculation processing unit; an output processing unit that outputs the predetermined date character string candidate identified by the identification processing unit; A character processing system comprising:

2. the calculation processing unit extracts, from the plurality of character strings acquired by the character recognition processing, a character string that includes a character related to a date and is composed of a predetermined number of characters, as the date character string candidate; The character processing system according to claim 1 .

3. the calculation processing unit adds a predetermined evaluation value to the date string candidate when a character related to a date is included within a predetermined range from a position of the date string candidate in the image; The character processing system according to claim 1 .

4. the calculation processing unit subtracts a predetermined evaluation value from the date string candidate when a character unrelated to a date is included within the predetermined range from a position of the date string candidate in the image; The character processing system according to claim 3.

5. the calculation processing unit adds, to the date string candidate, the evaluation value according to a distance from a center position of the image to a position of the date string candidate; The character processing system according to claim 1 .

6. the identification processing unit identifies the date character string candidate having the highest evaluation value from among the plurality of date character string candidates. The character processing system according to claim 1 .

7. the related characters and the non-related characters are registered in advance in association with each other for each type of document; 5. The character processing system according to claim 4.

8. the output processing unit displays the plurality of date string candidates in descending order of the evaluation value. The character processing system according to any one of claims 1 to 7.

9. Obtaining the result of a character recognition process performed on a character string contained in an image of a document; calculating an evaluation value according to a predetermined condition for each of a plurality of date character string candidates included in the result of the character recognition process; identifying a predetermined candidate date string based on the evaluation value of each of the plurality of candidate date strings; outputting the predetermined date character string candidates; A character processing method executed by one or more processors.

10. Obtaining the result of a character recognition process performed on a character string contained in an image of a document; calculating an evaluation value according to a predetermined condition for each of a plurality of date character string candidates included in the result of the character recognition process; identifying a predetermined candidate date string based on the evaluation value of each of the plurality of candidate date strings; outputting the predetermined date character string candidates; A character processing program for executing the above on one or more processors.

Citation Information

Patent Citations

  • System, method and program for inputting account data

    JP2015118488A