WO2023062798A1 - 情報処理システム、項目値抽出方法、モデル生成方法及びプログラム - Google Patents

情報処理システム、項目値抽出方法、モデル生成方法及びプログラム Download PDF

Info

Publication number
WO2023062798A1
WO2023062798A1 PCT/JP2021/038147 JP2021038147W WO2023062798A1 WO 2023062798 A1 WO2023062798 A1 WO 2023062798A1 JP 2021038147 W JP2021038147 W JP 2021038147W WO 2023062798 A1 WO2023062798 A1 WO 2023062798A1
Authority
WO
WIPO (PCT)
Prior art keywords
item
value
candidate
character string
learning
Prior art date
Application number
PCT/JP2021/038147
Other languages
English (en)
French (fr)
Inventor
克仁 島▲崎▼
Original Assignee
株式会社Pfu
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 株式会社Pfu filed Critical 株式会社Pfu
Priority to PCT/JP2021/038147 priority Critical patent/WO2023062798A1/ja
Publication of WO2023062798A1 publication Critical patent/WO2023062798A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/412Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables

Definitions

  • the present disclosure relates to technology for extracting item values included in images.
  • an extraction target region in a document image is specified, character regions containing extracted terms are extracted from the vicinity of the extraction target region as item name candidate regions, and extraction rules are generated based on the extraction target region and item name candidate regions.
  • the item name candidate area is used as the item name area, and an extraction rule is generated based on the positional relationship between the extraction target area and the item name area, and there are a plurality of item name candidate areas.
  • Patent Document 1 a method has been proposed for generating an extraction rule based on the positional relationship between the extraction target area and the identified item name area.
  • At least one scoring application utilizing information from at least one training document to determine at least one potential target value; applying the information to at least one new document utilizing at least one scoring application to determine at least one value of the target (US Pat. reference).
  • the present disclosure aims to extract item values from a document image even if the document has an undefined layout.
  • An example of the present disclosure includes recognition result acquisition means for acquiring a character recognition result that is a result of character recognition of a target image, and candidate character that is a character string that can be an item value of an extraction target item in the character recognition result of the target image.
  • Item value candidate extraction means for extracting a plurality of strings; and for each candidate character string, a plurality of item keywords, which are keyword word strings for extracting the item value of the extraction target item, and candidate character strings in the target image.
  • the character string is extracted from the extraction target item model storage means for storing a learned model generated by machine learning so as to output information indicating validity, which is an item value of; and an item value extracting means for extracting the item value of the extraction target item from the plurality of candidate character strings by inputting .
  • the present disclosure can be understood as an information processing device, a system, a method executed by a computer, or a program to be executed by a computer.
  • the present disclosure can also be understood as recording such a program in a recording medium readable by a computer, other device, machine, or the like.
  • a computer-readable recording medium is a recording medium that stores information such as data and programs by electrical, magnetic, optical, mechanical or chemical action and can be read by a computer. say.
  • FIG. 1 is a schematic diagram showing the configuration of an information processing system according to an embodiment
  • FIG. 1 is a diagram showing an outline of a functional configuration of a learning device according to an embodiment
  • FIG. 10 is a diagram showing an example of extraction of item value candidates (learning image 1) according to the embodiment
  • FIG. 10 is a diagram showing an example of extraction of item value candidates (learning image 2) according to the embodiment
  • It is a figure which shows an example of the correct answer definition table which concerns on embodiment.
  • FIG. 10 is a diagram showing a calculation example of distance weights and direction weights in the learning image 1 according to the embodiment
  • FIG. 10 is a diagram showing a calculation example of distance weights and direction weights in a learning image 2 according to the embodiment; It is a figure which shows the calculation example of the effectiveness score which concerns on embodiment.
  • FIG. 4 is a diagram showing an example of extraction of positional relationship information in the learning image 1 according to the embodiment;
  • FIG. 10 is a diagram showing an example of a positional relationship information list during learning processing according to the embodiment;
  • FIG. 10 is a diagram showing an example of a feature list during learning processing according to the embodiment; It is a figure which shows the outline of the functional structure of the information processing apparatus which concerns on embodiment.
  • FIG. 4 is a diagram showing an example of extraction of positional relationship information in the learning image 1 according to the embodiment
  • FIG. 10 is a diagram showing an example of a positional relationship information list during learning processing according to the embodiment
  • FIG. 10 is a diagram showing an example of a feature list during learning processing according to the embodiment; It is a figure which shows the outline of the functional structure of the information processing apparatus which
  • 11 is a diagram showing an example of a correct definition generation screen (when "billing amount” is selected) according to the embodiment; It is a figure which shows an example of the correct definition generation screen (when "payment deadline” is selected) which concerns on embodiment.
  • 7 is a flowchart showing an overview of the flow of correct definition generation processing according to the embodiment;
  • FIG. 1 is a schematic diagram showing the configuration of an information processing system 9 according to this embodiment.
  • An information processing system 9 according to the present embodiment includes one or a plurality of information processing devices 1, a learning device 2, and document reading devices 3 (3A, 3B) that can communicate with each other by being connected to a network.
  • the learning device 2 generates a trained model for extracting the item values of the extraction target items (item attributes) in the document.
  • the information processing device 1 uses the learned model generated by the learning device 2 to extract the item values of the extraction target items included in the target image.
  • a form is exemplified as a document, but the document may be any document other than a form as long as it contains items (item values).
  • the term "form” means a form in a broad sense including ledger, slip, documentary evidence, and the like. Further, the form is not limited to a type of form (semi-standard form) with a different layout depending on the document, even if it is the same type of form, and may be a type of form with a predetermined layout (standard form).
  • an "item value” is a value corresponding to an item (item attribute), and is information (character string) input (written) for the target item.
  • the item value is, for example, a numeric character string such as "12,800” or “7,340” if the item is the billing amount, or "August 2, 2021” or “2022” if the item is the payment due date. /3/5".
  • Item name is the name given to the item and is the name written in the document (manuscript). For example, if the item (item attribute) is the invoiced amount, item names such as “invoiced amount”, “total amount”, and “invoiced total” are listed. Item names such as “deadline” and "payment due date” are described. In a document with an undefined layout, even for the same item, the item name and its description position may differ depending on the manuscript (issuing company, etc.).
  • Item attribute is an attribute that is defined to uniformly handle items that indicate the same concept but may be given multiple different item names, regardless of the item name actually given in the document. . Item attributes can be arbitrarily named (determined) by the user. For example, for items with item names such as “billed amount”, “total amount”, and “billed total”, the item attribute is determined to be “billed amount”, and “payment due date”, “transfer deadline”, " For items with item names such as "payment due date”, the item attribute is determined to be "payment due date”. As described above, the item name may differ depending on the manuscript, but the item attribute is a name (attribute) that can be used in common for all manuscripts. It should be noted that, in the present embodiment, "extraction target item” is synonymous with “extraction target item attribute”.
  • An "item keyword” is a word string (keyword word string) written in a document (manuscript) that includes an item name, and serves as a mark for extracting information (item value) to be extracted.
  • Item keywords can include not only item names that are directly related to item values, but also item names that are not related to item values, and word strings other than item names.
  • the information processing device 1 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, an EEPROM (Electrically Erasable and Programmable Read Only Memory), HDD (Hard Disk) storage, etc. It is a computer including a device 14, a communication unit 15 such as a NIC (Network Interface Card), an input device 16 such as a keyboard or touch panel, and an output device 17 such as a display.
  • NIC Network Interface Card
  • the specific hardware configuration of the information processing apparatus 1 can be appropriately omitted, replaced, or added according to the mode of implementation.
  • the information processing device 1 is not limited to a device consisting of a single housing.
  • the information processing device 1 may be realized by a plurality of devices using so-called cloud or distributed computing technology.
  • the information processing device 1 receives from the learning device 2 a learned model and an item keyword list for extracting item values of extraction target items in a document (original) of a predetermined document type, which is a target document type for which item values are to be extracted. Get and store. Further, the information processing apparatus 1 acquires an image (extraction target image) of the document (manuscript) of the predetermined document type from the document reading apparatus 3A. Then, the information processing apparatus 1 extracts the item values of the extraction target items from the extraction target images by using the learned model and the item keyword list. Document types (predetermined document types) from which item values are extracted are exemplified by various types of documents such as bills, order forms, statements of delivery, slips, and expense books.
  • the document image is not limited to electronic data (image data) such as TIFF (Tagged Image File Format), JPEG (Joint Photograph Experts Group), PNG (Portable Network Graphics), but electronic data in PDF (Portable Document Format).
  • image data such as TIFF (Tagged Image File Format), JPEG (Joint Photograph Experts Group), PNG (Portable Network Graphics), but electronic data in PDF (Portable Document Format).
  • PDF Portable Document Format
  • the document image may be electronic data (PDF file) obtained by scanning a document and converted to PDF, or electronic data created as a PDF file from the beginning.
  • the method of acquiring the extraction target image is not limited to the above example, and a method of acquiring via another device, a USB (Universal Serial Bus) memory, an SD memory card (Secure Digital memory card), an optical disc, etc.
  • An arbitrary method may be used, such as a method of acquiring by reading from an external recording medium or the storage device 14 . If the extraction target image is not acquired from the document reading device 3A, the information processing system 9 does not have to include the document reading device 3A.
  • the method of acquiring the learned model and the item keyword list is not limited to the example described above, and any method may be used.
  • the learning device 2 is a computer including a CPU 21, a ROM 22, a RAM 23, a storage device 24, a communication unit 25, and the like.
  • the specific hardware configuration of the learning device 2 can be appropriately omitted, replaced, or added according to the mode of implementation.
  • the learning device 2 is not limited to a device consisting of a single housing.
  • the learning device 2 may be realized by a plurality of devices using so-called cloud or distributed computing technology.
  • the learning device 2 acquires an image (learning image) of a document of a predetermined document type (for example, an invoice) from the document reading device 3B. Then, the learning device 2 performs learning processing using the learning images to generate a learned model and an item keyword list for extracting item values of extraction target items in documents of a predetermined document type.
  • a predetermined document type for example, an invoice
  • the method of acquiring the learning image is not limited to the example described above, and any method such as a method of acquiring via another device, a method of acquiring by reading from an external recording medium or the storage device 24, etc. can be used. may be used.
  • the document reading device 3B may not be provided in the information processing system 9 when the learning images are not acquired from the document reading device 3B.
  • the information processing device 1 and the learning device 2 which are separate devices (separate housings), are exemplified, but the present invention is not limited to this example, and the information processing device 9 performs learning processing and document type identification processing. A single device (casing) that performs both may be provided.
  • the document reading device 3 is a device that acquires a document image by optically reading a document on a paper medium in response to a scan instruction or the like from a user, and is exemplified by a scanner, a multifunction machine, and the like. .
  • the document reading device 3A acquires an extraction target image by reading a form from which the user wants to extract item values (a form from which item values are to be extracted), such as a bill requiring data input.
  • the document reading device 3B acquires a plurality of learning images by reading a plurality of forms of the same type (documents of a predetermined document type) with different layouts.
  • the document reading device 3A and the document reading device 3B may be the same device (housing).
  • the document reading device 3 is not limited to having a function of transmitting an image to another device, and may be an imaging device such as a digital camera or a smart phone. Also, the document reading device 3 may not have a character recognition (OCR) function.
  • OCR character
  • FIG. 2 is a diagram showing an outline of the functional configuration of the learning device according to this embodiment.
  • the program recorded in the storage device 24 is read out to the RAM 23, executed by the CPU 21, and each hardware provided in the learning device 2 is controlled, so that the image acquisition unit 51, Functions as a device comprising a recognition result acquisition unit 52, a format definition storage unit 53, an item value candidate extraction unit 54, a correct definition acquisition unit 55, an item keyword determination unit 56, a feature generation unit 57, a model generation unit 58, and a storage unit 59.
  • each function of the learning device 2 is executed by the CPU 21, which is a general-purpose processor. may be performed by
  • each functional unit included in the learning device 2 is not limited to being implemented in a device consisting of a single housing (one device), but is remotely and/or distributed (for example, on the cloud). MAY be implemented.
  • a learned model and an item keyword list for extracting item values from a target form are generated based on the relationship between item values and item names in a general form (document).
  • the concept of item value extraction based on the relationship (positional relationship) between item values and item names in a document will be described below.
  • the item name corresponding to the item value is often written to the left or above the item value.
  • item names corresponding to item values are usually written near the item values.
  • the item It is possible to judge whether the value candidate is the target item value (the item value of the extraction target item). In other words, by statistically aggregating and learning what kind of item keywords (word strings) are described in the left direction and upward direction from the item value (item value candidate), how far and in which direction, the target It becomes possible to generate a trained model capable of judging the validity of the item value of the item. In other words, by inputting what the item keyword described around the item value candidate is, in what direction, and how far away it is as characteristics, the validity of the item value candidate being the item value of the target item is identified. It becomes possible to generate possible models.
  • the image acquisition unit 51 acquires a plurality of learning images (sample images) used in the learning process.
  • the image acquisition unit 51 acquires, as learning images, a plurality of images (image data) of the same type of document with different layouts.
  • Forms such as invoices may have different layouts such as positions of items and names of items in the form, depending on the issuing company or the like. Therefore, for example, images of a plurality of bills issued by different issuers are used as learning images.
  • the image acquisition unit 51 acquires the scanned image of the bill as a learning image.
  • the document image includes information in the document as an image.
  • the number of learning images in each layout is arbitrary, and one learning image or multiple learning images are used for each layout.
  • By using a plurality of learning images for one layout it is possible to perform learning with higher accuracy.
  • By adjusting the number of learning images with the user's environment it is possible to perform learning according to the user's environment.
  • the recognition result acquisition unit 52 acquires the character recognition result (character string data) for each learning image.
  • the recognition result acquiring unit 52 acquires the character recognition result (hereinafter referred to as “full-text OCR result”) for the learning image by reading the entire learning image (entire region) using OCR.
  • the data structure of the full-text OCR result is arbitrary as long as it includes the character recognition result for each character string (character string image) in the learning image.
  • the method of acquiring the full-text OCR result is not limited to the above-described example. Any method, such as a method of obtaining, may be used.
  • a character string is a string of one or more characters (a string of characters), and the characters include hiragana, katakana, kanji, alphabets, numerals, symbols, and the like.
  • the format definition storage unit 53 stores format definitions related to extraction target items, which are used when extracting item value candidates. Specifically, in the item value candidate extraction process, a character string matching the format definition of the extraction target item is extracted as the item value candidate of the extraction target item. Therefore, in order to extract character strings that can be the item value of the extraction target item as item value candidates, the format definition must include the character string format related to the extraction target item (character string that can correspond to the item value of the extraction target item). format) is defined. For example, in the case of an item attribute "payment due date" related to dates, the format definition for the item attribute "payment due date” includes A format related to "date” is defined as a string format related to . Also, for example, in the format definition of the item attribute "billed amount” related to the amount, a format related to "amount” is defined as a character string format related to "billed amount”. Examples of specific format definitions are shown below.
  • the format definition for the item attribute "payment deadline” includes "' ⁇ d ⁇ 4 ⁇ [ ⁇ / ⁇ . ⁇ -] ⁇ d ⁇ 1,2 ⁇ [ ⁇ / ⁇ . ⁇ -] ⁇ d ⁇ 1,2 ⁇ ' ⁇ '
  • dates written using slashes such as "2020/08/09”
  • dates written using periods such as “2021.2.17”
  • dates written using periods such as “2020/07/24"
  • Extract dates in various notations such as dates written in kanji characters such as "day” and dates written in English such as "JAN 23 2020”, as item value candidates (candidate character strings) for the item attribute "payment deadline”. It becomes possible.
  • the format definition for the item attribute "billing amount” includes "' ⁇ d ⁇ 0,3 ⁇ [.,]? ⁇ d ⁇ 0,3 ⁇ [. , ]? ⁇ d ⁇ 1,3 ⁇ [.,] ⁇ d ⁇ 0,3 ⁇ '" is defined. According to this example of the format definition, it is possible to extract a character string containing a number every three digits and a delimiter such as a comma or a period as an item value candidate for the item attribute "billed amount”.
  • a format definition created in advance by the user is exemplified, but the format definition is not limited to this example, and the format definition may be automatically generated based on the correct answer definition described later.
  • the format definition is not limited to the format definition by the regular expression described above, and may be defined by expressions other than the regular expression.
  • an example is shown in which an item attribute is associated with a format definition for each item attribute to be extracted.
  • the present invention is not limited to this. good too.
  • the format (format definition) related to the amount may be associated with the item attribute "billing amount" and the item attribute "unit price”.
  • the item value candidate extraction unit 54 extracts a plurality of candidate character strings (item value candidates) that are character strings that can be the item value of the extraction target item in the character recognition results of each learning image.
  • the item value candidate extraction unit 54 extracts a character string that matches (matches) the format definition related to the extraction target item as an item value candidate related to the extraction target item.
  • FIGS. 3 and 4 are diagrams showing examples of extraction of item value candidates according to the present embodiment.
  • FIG. 3 illustrates a learning image 1, which is a learning image for invoices.
  • FIG. 4 illustrates a learning image 2, which is a learning image for invoices.
  • FIGS. 3 and 4 illustrate a case where the item attribute to be extracted is "claimed amount” and the format definition for "claimed amount” is the format definition illustrated in the specific example of the format definition. In this case, as indicated by the dashed lines in FIG. 990", “85”, “20”, “1,700”, “3,690", “369", and “4,059” are extracted. Similarly, as indicated by the dashed lines in FIG. 4, character strings (item value candidates related to "claimed amount”) that match the format definition related to the item attribute "claimed amount" are "3,290” and "1,200”. , "4,490", “449”, and “4,939” are extracted.
  • the correct definition acquisition unit 55 acquires a correct definition in which one or more extraction target items are associated with the item values of the extraction target items in each learning image.
  • the correct definition acquisition unit 55 acquires a correct definition when a correct definition generated (defined) by the user is input to the learning device 2 .
  • the user determines an extraction target item (item attribute) and refers to each learning image to extract the item value of the extraction target item described in each learning image.
  • the user generates a correct answer definition (correct answer definition table) by storing the extraction target item and the item value of the extraction target item in each extracted learning image in association with each other. input.
  • FIG. 5 is a diagram showing an example of a correct definition table according to this embodiment.
  • "billing amount”, "payment deadline” and “slip number” are exemplified as item attributes to be extracted, but the item attributes are not limited to these and can be set arbitrarily.
  • each item attribute in each of a plurality of learning images (“Sheet — 001.jpg”, “Sheet — 002.jpg”, “Sheet — 003.jpg”, etc.)
  • the item value (correct answer definition value) corresponding to is stored.
  • “Sheet — 001.jpg” is the learning image 1 (see FIG. 3)
  • “Sheet — 002.jpg” is the learning image 2 (see FIG. 4).
  • item attributes of "billed amount”, "payment deadline” and “slip number” are stored in the correct answer definition table shown in FIG.
  • the value "2021/7/25" is defined as the correct definition value for the item attribute "payment deadline”
  • the item value "BN0000868022" for the item name "invoice number” is defined as the correct definition value for the item attribute "invoice number” by the user. stored in a table.
  • the user inputs the item values for the extraction target items described in the learning image, thereby generating the correct answer definition (correct answer definition table).
  • the data structure for storing item values is not limited to a table format such as a CSV (comma-separated values) format, and may be in any format.
  • the method for obtaining the correct answer definition is not limited to the example described above, and any method such as a method of obtaining via another device, a method of obtaining by reading from an external recording medium or the storage device 24, or the like can be used. you can
  • the item keyword determination unit 56 determines a plurality of item keywords to be keywords for extracting item values of extraction target items. As will be described later, in the information processing apparatus 1, after the item value candidates of the extraction target item are extracted, the validity of each item value candidate is determined based on the positional relationship between each item value candidate and a plurality of item keywords. , the most appropriate item value candidate is determined as the item value of the extraction target item. Therefore, it is desirable that the item keyword be a keyword that is useful for extracting the item value of the extraction target item.
  • the item names described in invoices, etc. may fluctuate (differ) depending on the issuing company. It is desirable to select as However, if keywords that are completely unrelated to the item you want to extract or irregular keywords are selected as item keywords, there are concerns about problems such as adverse effects on item value extraction, bloated trained models, and decreased processing speed. be done. Therefore, in the present embodiment, keywords predicted to be useful for item value extraction are determined (selected) as item keywords from among the word strings described in the form. A method for determining the item keyword will be described below. Note that the item keyword determination unit 56 determines a plurality of item keywords for each extraction target item.
  • the item keyword determination unit 56 identifies the position in the learning image of the item value (correct definition value) of the item attribute to be extracted, which is stored in the correct definition. Then, the item keyword determination unit 56 extracts, from the character recognition result of the learning image, word strings around the correct definition value whose position is specified as item keyword candidates for the item attribute.
  • a word string is a string (a row of words) consisting of one or more words.
  • the word string surrounding the correct definition value is a word string positioned within a predetermined range from the correct definition value, and is not limited to word strings close to the correct definition value. It may be a word string included.
  • the item keyword determination unit 56 performs this item keyword candidate extraction process on each learning image.
  • the position of the correct definition value "4,059" of the item attribute "claimed amount” stored in the correct answer definition is specified, and the word string ( For example, “unit price”, “price”, “subtotal”, “total”, etc.) are extracted as item keyword candidates.
  • the word string For example, “unit price”, “price”, “subtotal”, “total”, etc.
  • Columns for example, “content”, “amount”, “subtotal”, “total”, etc. are extracted as item keyword candidates.
  • the item keyword determination unit 56 generates an item keyword candidate list including item keyword candidates extracted from each learning image for each extraction target item. For example, first, a list of words (single words) around the correct definition value and a word string consisting of multiple words around the correct definition value (a word string that combines a word with the words before and after that word). After the lists are generated, an item keyword candidate list is generated that stores the word strings included in these lists. Note that the method of generating the item keyword candidate list is not limited to the example described above, and may be generated by any method.
  • item keywords for example, “Total” and “Sub Total”, “Date” and “Due Date”, “Invoice Even if the item name includes other item names such as "Date”, they can be distinguished and identified, and extracted as item keyword candidates (item keywords). As a result, it is possible to prevent the extraction of item values from being adversely affected by confusing the intended item keyword with another keyword.
  • the item keyword determination unit 56 selects an item keyword (item keyword for extracting the item value of the extraction target item) from the item keyword candidates for the extraction target item extracted from each learning image. to decide (elect). That is, the item keyword related to the extraction target item is determined from the item keyword candidates (item keyword candidate list) related to the extraction target item, each of which is extracted from at least one learning image.
  • the item keyword determining unit 56 determines an item keyword from the item keyword candidates based on the attributes of the item keyword candidates.
  • the attributes of item keyword candidates are, for example, (1) the degree of appearance of word strings that are item keyword candidates in learning images, and (2) the relationship between item keyword candidates (areas) and correct definition values (areas) in learning images. and (3) at least the direction from one of the correct definition value (region) and the item keyword candidate (region) to the other in the learning image (for example, the direction of the correct definition value seen from the item keyword candidate)
  • One attribute may be determined based on any one of these three attributes, or the item keyword may be determined based on two or all of the three attributes.
  • the item keyword determination unit 56 calculates, for each item keyword candidate, an effectiveness score indicating the effectiveness of the item keyword candidate as a keyword for extracting an item value based on the attribute of the item keyword candidate, and calculates the effectiveness score. You may determine an item keyword based on.
  • the item keyword determining unit 56 selects, for example, a predetermined number (eg, 100) of item keyword candidates in descending order of effectiveness score, and determines the selected item keyword candidates as item keywords. In addition, by setting a predetermined threshold for the effectiveness score, item keyword candidates exceeding the predetermined threshold may be determined as item keywords.
  • the effectiveness score is calculated based on the attributes of the item keyword candidates. For example, in the case of attribute (1), the effectiveness score is calculated such that the effectiveness score of an item keyword candidate that appears in more learning images is higher. In the case of attribute (2), the effectiveness score is calculated such that the effectiveness score of an item keyword candidate having a smaller distance from the correct definition value is higher. In the case of attribute (3), the effectiveness score is calculated such that the item keyword candidate located in the horizontal left direction or the vertical upper direction of the correct definition value has a higher effectiveness score.
  • the effectiveness score may be calculated based on at least one of the three attributes described above, and any calculation method may be used.
  • a method using weighting weight based on distance and weight based on direction (angle)
  • the effectiveness score (effectiveness total score) S of the item keyword candidates is calculated by the following formula 1.
  • Si is the effectiveness single score of the learning image i
  • xi is the appearance count of the item value keyword candidate in the learning image i
  • w1i is the weight of attribute (2) in the learning image i
  • w2i is The weight of attribute (3) in training image i
  • N is the number of training images.
  • Si is the effectiveness single score of the learning image i.
  • the effectiveness single score is the effectiveness score of the item keyword candidate calculated for each learning image.
  • An effectiveness score (effectiveness total score) S is calculated by totaling effectiveness single scores for all learning images.
  • the count number is the number of times of detection
  • the distance weight and direction weight are the distance related to one detection out of multiple detections. Weights and direction weights may be used.
  • the total effectiveness score is a score obtained by summing the effectiveness single scores for the number of training images in which the item keyword candidate appears. It is possible to calculate the effectiveness score so that the item keyword candidate that appears in the .
  • w1i is the weight of attribute (2) in the learning image i (hereinafter referred to as “distance weight”), and the distance between the character string of the item value keyword candidate detected in the learning image and the correct definition value is small. In other words, when both positions are close to each other, the value (weight) is calculated to be large. For example, when the detected item keyword candidate and the correct definition value are separated at the ends of the manuscript (learning image), that is, when the distance between the two is equal to the length of the diagonal line of the manuscript (the longest distance). , the distance weight is set to the minimum value (eg, 1).
  • the distance weight is set to the maximum value (eg, 10). If the distance between the two is between the minimum distance and the maximum distance, a distance weight is given according to the distance between the two. For example, the distance weight is calculated so as to decrease linearly as the distance between them increases.
  • w2i is the weight of the attribute (3) in the learning image i (hereinafter referred to as “direction weight”), and the character string of the item value keyword candidate detected in the learning image is the horizontal left direction of the correct definition value or It is calculated so that the value (weight) increases when it is in the vertically upward direction.
  • the directional weight is calculated according to the degree to which the item keyword candidates are horizontally left or vertically above the correct definition value. For example, the direction weight w2i in the learning image i is calculated by Equation 2 below.
  • Equation 2 above w2hi is the first weight of attribute (3) in learning image i, and w2vi is the second weight of attribute (3) in learning image i.
  • the first weight w2hi (hereinafter referred to as the “first direction weight”) of the attribute (3) in the learning image i is the degree to which the item keyword candidate is in the horizontal left direction of the correct definition value in the learning image i. is a weight based on The first direction weight is calculated so that the value increases as the character string of the item value keyword candidate detected in the learning image is located horizontally to the left of the correct definition value.
  • the first direction weight is set to the maximum value (eg, 10). Then, as the vector tilts, the value of the first direction weight is decreased, and the minimum value (for example, 1) is set when the angle between two points is 45 degrees and -45 degrees, and when the angle between two points is 0 degrees ⁇ 45 degrees. Even if it is outside the range, the minimum value (for example, 1) is used.
  • the clockwise direction is the positive direction (the direction in which the angle increases).
  • the second weight w2vi (hereinafter referred to as the “second direction weight”) of attribute (3) in the learning image i is the degree to which the item keyword candidate is vertically above the correct definition value in the learning image i. is a weight based on The second direction weight is calculated so that the value increases as the character string of the item value keyword candidate detected in the learning image is positioned vertically above the correct definition value. For example, when the item keyword candidate is vertically above the correct definition value, that is, when the angle between the two points is 90 degrees, the second direction weight is set to the maximum value (eg, 10).
  • the minimum value (for example, 1) is set when the angle between two points is 45 degrees and 135 degrees, and the angle between two points is in the range of 90 degrees ⁇ 45 degrees. Even if it is outside, the minimum value (for example, 1) is used.
  • the direction weight is calculated by calculating the angle between two points related to the correct definition value and the item keyword candidate.
  • the direction weight may be calculated by determining in which quadrant among the first to fourth quadrants the item keyword candidate is located. For example, when it is determined that the item keyword candidate is in the second quadrant or the third quadrant, the first direction weight may be calculated to be higher. Further, for example, when it is determined that the item keyword candidate is in the first quadrant or the second quadrant, the second direction weight may be calculated to be higher.
  • FIG. 6 is a diagram showing an example of calculation of direction weights according to this embodiment.
  • the horizontal axis is the angle between two points, and the vertical axis is the direction weight.
  • the minimum value of the direction weights (the first direction weight and the second direction weight) is 1, and the maximum value is 10.
  • the maximum value is 10.
  • the direction weight linearly decreases from a maximum value of 10 to a minimum value of 1 in this angular range, as shown in FIG.
  • the direction weight increases linearly from a minimum value of 1 to a maximum value of 10 over this angular range, as shown in FIG.
  • the direction weight linearly decreases from a maximum value of 10 to a minimum value of 1 in this angular range, as shown in FIG.
  • the direction weight increases linearly from a minimum value of 1 to a maximum value of 10 over this angular range, as shown in FIG.
  • the minimum and maximum values of the distance weight and direction weight can be adjusted (set) to arbitrary numerical values.
  • the range of angles between two points in which the directional weight is from the maximum value to the minimum value is not limited to the range of ⁇ 45 degrees, but can be adjusted to any angle (range).
  • the angle between two points related to the correct definition value and the item keyword candidate is the angle formed by the vector from the item keyword candidate to the correct definition value to the right horizontal direction. If so, the angle is not limited to the horizontal right direction.
  • the angle between two points may be an angle formed by a vector pointing from the correct definition value to the item keyword candidate and the horizontal right direction.
  • arbitrary points in the area related to the correct definition value and the area related to the item keyword candidate in the learning image are used to calculate the distance between the correct definition value and the item keyword candidate and the angle between two points.
  • the upper left vertex of the circumscribing rectangle for each of the correct definition value and item keyword candidate in the learning image may be used.
  • a vector from the upper left vertex of the circumscribing rectangle of the item keyword candidate in the learning image to the upper left vertex of the circumscribing rectangle of the correct definition value in the learning image is used to obtain the distance and the angle between the two points. may be calculated (extracted).
  • FIG. 7 is a diagram showing a calculation example of the distance weight and the direction weight in the learning image 1 according to this embodiment.
  • FIG. 7 shows numerical examples of distance weights and direction weights for each item keyword candidate (“unit price”, “amount”, “subtotal”, “total”, etc.) of the item attribute “billing amount” in the training image 1. show.
  • the correct definition value "4,059" for each item keyword candidate "unit price”, “amount”, “subtotal”, and “total” and the item attribute "billing amount” in the learning image 1. are calculated as “88 mm", "72 mm”, “36 mm”, and “29 mm", respectively. Further, as shown in FIG.
  • the calculated distance and angle between two points are converted into distance weight and direction weight, respectively.
  • the distance weights of the item keyword candidates "unit price”, “amount”, “subtotal”, and “total” are calculated as “5", “6", “8”, and “9”. be.
  • the directional weights of the item keyword candidates "unit price”, “amount”, “subtotal”, and “total” are calculated as “1”, "10", “1”, and "10".
  • FIG. 8 is a diagram showing a calculation example of the distance weight and direction weight in the learning image 2 according to this embodiment.
  • FIG. 8 shows numerical examples of the distance weight and direction weight for each item keyword candidate (such as "content”, “amount”, “subtotal”, and “total") of the item attribute "billing amount” in the training image 2. show.
  • the correct definition value "4,939” for each item keyword candidate "content”, “amount”, “subtotal”, and “total” and the item attribute "billing amount” in the learning image 2. are calculated as “89 mm”, “78 mm”, “39 mm”, and “30 mm”, respectively. Also, as shown in FIG.
  • the angle of the vector from each item keyword candidate "content”, “money”, “subtotal”, and “total” to the correct defined value "4,939" in the learning image 2 are calculated as “61 degrees”, “90 degrees”, “45 degrees”, and "0 degrees", respectively.
  • the calculated distance and angle between two points are converted into distance weight and direction weight, respectively.
  • the distance weights of the item keyword candidates "content”, “amount”, “subtotal”, and “total” are calculated as “5", “7”, “8”, and “9”. be.
  • the directional weights of the item keyword candidates "content”, “price”, “subtotal”, and “total” are calculated as "4", "10", “1”, and "10".
  • FIG. 9 is a diagram showing an example of calculating an effectiveness score according to this embodiment.
  • the effectiveness score of each item keyword candidate related to the item attribute "claimed amount" calculated based on the distance weight and the direction weight in the learning image 1 and the learning image 2 calculated in FIGS. shows a numerical example of As shown in FIG. 9, for each item keyword candidate, a distance weight and a direction weight are calculated for each learning image in which the item keyword candidate is detected, and an effectiveness score (effectiveness single score, total effectiveness score) will be calculated.
  • the item keyword candidate “money” is detected in each of the learning images 1 and 2, and the distance weight and direction weight are calculated for each.
  • the distance weight is “6” and the direction weight is “10”.
  • the distance weight and the direction weight for the item keyword candidate “money” detected in the learning image 2 are “7” and “10” respectively.
  • the item keyword candidate "amount” by totaling the effectiveness single scores of each of the learning images 1 to N, the item keyword candidate " The total effectiveness score for "amount” is calculated as "53,320".
  • the effectiveness total scores for the item keyword candidates "total” and “content” related to the item attribute "billing amount” are calculated as "90,870” and "2,245", respectively.
  • the item keyword determination unit 56 uses a table as shown in FIG. 9 (learning images, distance weights, direction weights, and effectiveness scores (single scores, A table) in which the total score) is stored may be generated.
  • the item keyword determination unit 56 determines a plurality of item keywords from the item keyword candidates based on the effectiveness score (effectiveness total score) calculated by the illustrated method for calculating the effectiveness score. Further, in the present embodiment, the item keyword determination unit 56 generates an item keyword list including the determined item keyword for each extraction target item. The generated item keyword list is stored in the storage unit 59 . Note that the data structure for storing item keywords is not limited to the list format, and may be in any other format.
  • the item value extraction rules are created based on the correspondence between item names and item values. A skilled engineer or the like made the determination by observing the semi-standard form.
  • the item keyword determination unit 56 it is possible for the item keyword determination unit 56 to automatically determine item keywords for extracting (identifying) item values. This eliminates the need for the user to manually determine the item keyword, making it possible to reduce the user's workload.
  • the feature generation unit 57 generates a feature amount of each item value candidate related to the extraction target item in the learning image.
  • the feature generation unit 57 generates a feature amount of the item value candidate based on the positional relationship between the item value candidate and the plurality of item keywords related to the extraction target item in the learning image.
  • the feature generation unit 57 generates feature amounts of item value candidates of each learning image. In the learning process, which will be described later, the feature amount of each item value candidate is used as the feature amount (learned model input) for extracting the item value.
  • the feature generation unit 57 generates item value candidates based on information (hereinafter referred to as “positional relationship information”) indicating the positional relationship between a plurality of item keywords related to the extraction target item in the learning image and the item value candidates. generate the features of As the positional relationship information, information indicating the distance between the item value candidate and the item keyword, and information indicating the direction from one of the item value candidate and the item keyword to the other are used. In this embodiment, as the positional relationship information, the distance (mm) between the item value candidate and the item keyword in the learning image and the vector angle (two point-to-point angle) (deg) is used.
  • FIG. 10 is a diagram showing an example of extraction of positional relationship information in the learning image 1 according to this embodiment.
  • each item keyword (“total”, “subtotal”, “ amount”) to the item value candidate “3,690” (distance and direction between them (angle between two points)) are extracted as the positional relationship information.
  • the angle between two points related to the item value candidate and the item keyword is not limited to the angle in the horizontal right direction, similarly to the above-described angle between two points related to the correct definition value and the item keyword candidate. It may be an angle about the vector from the candidate to the item keyword. In addition, any point in the area related to the item value candidate and the area related to the item keyword in the learning image may be used to calculate the distance between the item value candidate and the item keyword and the angle between two points. .
  • the feature generation unit 57 generates a positional relationship information list storing positional relationship information for each extraction target item.
  • FIG. 11 is a diagram showing an example of the positional relationship information list during the learning process according to this embodiment.
  • FIG. 11 shows a positional relationship information list for the item attribute "billing amount".
  • the positions of each item value candidate of the item attribute "claimed amount” extracted from each learning image and a plurality of item keywords related to the item attribute "claimed amount” are displayed. Relational information (distance and angle between two points) is stored.
  • item value candidates (“3,690”, “4,059”, “1,990”, etc. (see FIG. 3)
  • the unit of positional relationship information is not limited to the unit (mm, deg) shown in FIG.
  • the item keyword "billing amount” in the positional relationship information list in FIG. Although the values "999" and “- (hyphen)" indicating none are used, the value indicating not applicable is not limited to these values, and any numerical value, character, symbol, or the like may be used.
  • a list format (table format) is exemplified as a data structure for storing positional relationship information, but the data structure may be in any other format.
  • the feature generating unit 57 generates feature amounts (distance feature amount and direction feature amount) of item value candidates based on the extracted positional relationship information (distance between both and angle between two points).
  • the distance and the angle between two points are determined according to the degree of possibility that the item value candidate and the item keyword are related (relationship) (the item keyword is likely to be a keyword related to the item value candidate). They are converted into a distance feature quantity and a direction feature quantity, respectively.
  • a distance feature amount is a feature amount based on information indicating the distance between an item value candidate and an item keyword. As described above, item names and item values are often described as a set, so they are expected to be described close together. Therefore, it is predicted that the smaller the distance between the item value candidate and the item keyword, the higher the possibility that the item value candidate and the item keyword are related. Therefore, the feature generation unit 57 generates (calculates) the distance feature amount so that the value increases or decreases according to the distance between the two. In this embodiment, the value of the distance feature amount is calculated to increase as the distance between the two becomes smaller. For example, the distance feature amount is set to a maximum value of 100 points when both are close to each other, decreases as the two are separated, and is set to a minimum value of 0 points when both are located at the edges of the document.
  • the direction feature amount is a feature amount based on information indicating the direction from one of the item value candidate and the item keyword to the other. As described above, item names are often written to the left or above the item values, aligned with the item values. Therefore, it is predicted that the item value candidate and the item keyword are more likely to be related when the item keyword is horizontally to the left of the item value candidate than when it is vertically above the item value candidate. Therefore, the feature generation unit 57 generates (calculates) the direction feature amount so that the value increases or decreases according to the degree to which the item keyword is horizontally leftward and vertically upward of the item value candidate.
  • the direction feature amount is divided into a horizontal feature amount that increases or decreases according to the degree to which the item keyword is horizontally leftward of the item value candidate, and a vertical direction feature amount that increases or decreases according to the degree to which the item keyword is vertically upward.
  • the value of the horizontal feature amount is calculated to increase as the item keyword is located horizontally to the left of the item value candidate.
  • the value of the vertical feature amount is calculated to increase as the item keyword is located vertically above the item value candidate. For example, when the angle between two points is 0 degrees (when there is an item keyword in the horizontal left direction of the item value candidate), the horizontal feature value is set to the maximum value of 100 points, and the value is decreased as the vector between them inclines. , and when the angle between the two points is 0° ⁇ 90°, the minimum value of 0 points is set. Even when the angle between the two points is outside the range of 0° ⁇ 90°, the horizontal feature amount is set to 0 point, which is the minimum value.
  • the vertical feature amount is set to the maximum value of 100 points. is reduced, and the minimum value of 0 points is set when the angle between the two points is 90° ⁇ 90°. Even when the angle between two points is outside the range of 90° ⁇ 90°, the vertical feature amount is set to the minimum value of 0 points. Note that the maximum and minimum values of the feature amount can be adjusted (set) to arbitrary numerical values.
  • the feature generation unit 57 generates a feature list that stores feature amounts (distance feature amount and direction feature amount) of item value candidates based on the positional relationship information.
  • FIG. 12 is a diagram showing an example of a feature list during learning processing according to this embodiment. As shown in FIG. 12, the calculation is such that the smaller the distance between the two, the larger the distance feature amount. Also, the horizontal feature amount is calculated to increase as the item keyword is positioned horizontally to the left of the item value candidate, and the vertical feature amount is calculated to increase as the item keyword is positioned vertically above the item value candidate.
  • the feature value is calculated so as to increase the feature amount (higher points) when there is a high possibility that the item value candidate and the item keyword are related, but the present invention is not limited to this example. It may be calculated so that the feature amount is small when there is a high possibility that it will occur. Further, the feature amount of the item value candidate that is the input of the trained model may be the positional relationship information itself.
  • the model generation unit 58 performs machine learning (supervised learning) to generate a learned model for extracting item values of extraction target items for each extraction target item for a predetermined document type.
  • machine learning for each learning image, there are feature amounts of item value candidates and information (correct label) indicating whether or not the item value candidate is the item value (correct definition value) of the extraction target item.
  • associated learning data a dataset of feature values and correct labels (teacher data)
  • Information indicating whether or not an item value candidate is a correct definition value (correct label) is information based on the correct definition acquired by the correct definition acquisition unit 55 .
  • the correct label for the item value candidate is determined to be "correct answer (eg, label 1)".
  • the character string can be extracted. It is possible to generate a discriminator capable of determining whether or not it is an item value of an item. More specifically, by inputting the feature value of a character string, it is possible to generate a discriminator (learned model) that can output information indicating the validity that the character string is the item value of the extraction target item. .
  • Information indicating the validity of the character string being the item value of the extraction target item is information (such as a label) indicating whether the character string is the item value of the extraction target item and/or is information (reliability, probability, etc.) indicating the likelihood of the item value of .
  • the generated learned model is stored in the storage unit 59 .
  • the trained model may be any model such as a discriminative model or a generative model. Any machine learning method may be used, and any method may be used among random forests, naive Bayes, decision trees, logistic regression, neural networks, and the like. Further, in the present embodiment, for each item value candidate, a feature amount based on the positional relationship between the item value candidate and a plurality of item keywords, and information indicating whether or not the item value candidate is the item value of the extraction target item. Although learning data associated with is used, the present invention is not limited to this example.
  • the storage unit 59 stores the item keyword list generated by the item keyword determination unit 56 and the learned model generated by the model generation unit 58 for extracting item values of item attributes for each extraction target item. .
  • the storage unit 58 may store the item keyword list and the learned model in association with each extraction target item.
  • FIG. 13 is a diagram showing an outline of the functional configuration of the information processing device according to this embodiment.
  • a program recorded in the storage device 14 is read out to the RAM 13 and executed by the CPU 11 to control each hardware provided in the information processing apparatus 1, whereby the image acquisition unit 41 , a recognition result acquisition unit 42 , a model storage unit 43 , an item keyword list storage unit 44 , a format definition storage unit 45 , an item value candidate extraction unit 46 , a feature generation unit 47 and an item value extraction unit 48 .
  • each function of the information processing apparatus 1 is executed by the CPU 11, which is a general-purpose processor. It may be executed by a processor.
  • each functional unit provided in the information processing device 1 is not limited to being implemented in a device consisting of a single housing (one device), but is remotely and/or distributed (for example, on the cloud ) may be implemented.
  • the image acquisition unit 41 acquires a form image (hereinafter referred to as an "extraction target image") from which item values are extracted in the item value extraction process.
  • an extraction target image a form image
  • the image acquisition unit 41 acquires a scanned image that is the reading result as an extraction target image.
  • the recognition result acquisition unit 42 acquires the character recognition result (full-text OCR result) for the extraction target image. Note that the processing in the recognition result acquisition unit 42 is the same as the processing in the recognition result acquisition unit 52, so detailed description thereof will be omitted.
  • the model storage unit 43 stores a learned model generated by the learning device 2 for extracting item values of extraction target items for a predetermined document type. Note that the model storage unit 54 stores a learned model for each extraction target item. Since the details of the learned model have been described in the explanation of the functional configuration (model generation unit 58) of the learning device 2, the explanation is omitted.
  • the item keyword list storage unit 44 stores an item keyword list generated in the learning device 2 for extracting item values of extraction target items for a predetermined document type.
  • the item keyword list storage unit 44 stores an item keyword list for each extraction target item. The details of the item keyword list have been described in the description of the functional configuration (item keyword determination unit 56) of the learning device 2, so the description will be omitted.
  • the format definition storage unit 45 stores format definitions related to extraction handling items, which are used in the item value candidate extraction process. Since the details of the format definition have been described in the description of the functional configuration (the format definition storage unit 53) of the learning device 2, the description will be omitted.
  • the format definition stored by the format definition storage unit 45 is limited to the same format definition as the format definition stored by the format definition storage unit 53 as long as it defines a character string format related to the extraction target item. However, the format definition may be different from the format definition stored in the format definition storage unit 53 .
  • the item value candidate extraction unit 46 extracts candidate character strings (item value candidates) that are character strings that can be the item value of the extraction target item in the character recognition result of the extraction target image.
  • the item value candidate extraction unit 46 extracts a character string that matches the format definition related to the item attribute stored in the format definition storage unit 45 from the character recognition result acquired by the recognition result acquisition unit 42 as the item of the item attribute. Extract as a value candidate.
  • the item value candidate extraction method by the item value candidate extraction unit 46 is the same as the method described in the functional configuration of the learning device 2 (the item value candidate extraction unit 54), so detailed description thereof will be omitted.
  • the feature generation unit 47 generates a feature amount of each item value candidate related to the extraction target item in the extraction target image.
  • the feature generation unit 47 combines a plurality of item keywords related to the extraction target item stored by the item keyword list storage unit 44 and the eye value candidates related to the extraction target item extracted by the item value candidate extraction unit 46. Based on the positional relationship, feature quantities of item value candidates are generated. Since the method of generating the feature amount by the feature generation unit 47 is the same as the method described in the functional configuration (feature generation unit 57) of the learning device 2, detailed description thereof will be omitted.
  • the feature generation unit 47 also generates a positional relationship information list and a feature list for the extraction target image. 11), detailed description is omitted. However, although the list generated by the feature generation unit 57 (FIGS. 10 and 11) targets item value candidates in each learning image, the feature list generated by the feature generation unit 47 differs from that. Only the item value candidates in the extraction target image are targeted.
  • the item value extraction unit 48 uses the learned model to extract (determine) an item value candidate that is likely to be the item value of the extraction target item from a plurality of item value candidates related to the extraction target item in the extraction target image.
  • the item value extraction unit 48 inputs the feature amount (distance feature amount and direction feature amount) of each item value candidate related to the extraction target item to the trained model related to the extraction target item, so that each item value candidate is It is determined whether or not the item value of the extraction target item is appropriate.
  • the item value extraction unit 48 outputs the determination result (extracted item value candidate).
  • the learned model outputs information (label and/or probability) that indicates the validity of the character string being the item value of the extraction target item.
  • the item value extraction unit 48 inputs the feature amount of each item value candidate to the learned model, thereby obtaining information (label (For example, if it is the item value of the extraction target item, the label is "1", otherwise the label is "0")) and information indicating the likelihood that each item value candidate is the item value of the extraction target item (reliability, probability, etc.).
  • the item value extracting unit 48 acquires only the probability of being the item value of the extraction target item from the learned model, and determines whether or not it is the item value of the extraction target item based on the acquired probability.
  • the item value extraction unit 48 extracts item value candidates based on information (reliability, probability, etc.) that indicates the likelihood that the item value candidate is the item value of the extraction target item, which is output from the trained model.
  • a validity score is calculated that indicates the likelihood that the item is the item value of the item.
  • the validity score may be the information (probability, etc.) that indicates the likelihood output from the trained model itself, or a numerical value (score) that is calculated based on the information (probability, etc.) that indicates the likelihood. There may be.
  • An item value extraction method using validity scores will be described below.
  • the item value extraction unit 48 determines the item value candidate as the item value of the extraction target item. On the other hand, if there are a plurality of item value candidates determined to be valid as the item value of the extraction target item, the item value extraction unit 48 extracts the item value candidate with the highest validity score among the plurality of item value candidates. It is determined that the item value candidate is likely to be the item value of the target item, and the item value candidate is determined as the item value of the extraction target item. Note that the item value candidate with the highest validity score may be determined by comparing the validity scores of all the item value candidates.
  • FIG. 14 is a diagram showing an example of the positional relationship information list and validity score for the extraction target image according to this embodiment.
  • a plurality of item value candidates (“4,000,” “4,400,” “1,800,” etc.) related to the item attribute “claimed amount” extracted from the extraction target image, and the item attribute “
  • a positional relationship information list relating to the positional relationship with a plurality of item keywords (“total”, “subtotal”, “amount”, “claimed amount”, etc.) relating to “billed amount” is exemplified.
  • the reliability and the like (validity score) for each item value candidate is output from the learned model. As shown in FIG.
  • FIG. 15 is a flowchart showing an overview of the flow of learning processing according to this embodiment.
  • the process shown in this flowchart is executed when the learning device 2 receives an instruction to scan a form (document). Note that this flowchart may be executed when a user's instruction to acquire a form image stored in the storage device 24 is received.
  • step S101 a plurality of document images (learning images) are acquired.
  • the image acquisition unit 51 acquires scanned images of documents (original documents) of a predetermined document type (for example, an invoice) having different layouts. After that, the process proceeds to step S102.
  • step S102 a correct definition is acquired.
  • the correct definition acquisition unit 55 associates an item attribute to be extracted (e.g. billing amount) for a predetermined document type (e.g. invoice) with the correct definition value of the item attribute in each learning image. Get the correct answer definition. After that, the process proceeds to step S103.
  • an item attribute to be extracted e.g. billing amount
  • a predetermined document type e.g. invoice
  • step S103 the character recognition result (full-text OCR result) is obtained.
  • the recognition result acquisition unit 52 acquires the character recognition result for each learning image by performing character recognition on each learning image acquired in step S101.
  • the order of steps S102 and S103 is random.
  • step S101 and step S102 are in random order. After that, the process proceeds to step S104.
  • step S104 item keyword determination processing is performed.
  • a plurality of item keywords are determined for extracting item values related to one item attribute (for example, "billing amount") among the item attributes to be extracted. Details of the item keyword determination process will be described later with reference to FIG. After that, the process proceeds to step S105.
  • step S105 a trained model generation process is performed.
  • a trained model is generated for extracting the item value of one item attribute (for example, "billing amount") among the item attributes to be extracted. Details of the learned model generation process will be described later with reference to FIG. 17 . After that, the process proceeds to step S106.
  • step S106 it is determined whether or not item keyword determination processing (step S104) and learned model generation processing (step S105) have been executed for all extraction target items.
  • the CPU 21 determines whether or not an item keyword list and a learned model have been generated for each extraction target item. By referring to the correct answer definition, it is possible to check (recognize) all the extraction target items. If all the extraction target items have not been processed (NO in step S106), the process returns to step S104, and the item keyword determination process and the learned model Generation processing is executed. On the other hand, if all extraction target items have been processed (YES in step S106), the process shown in this flowchart ends.
  • FIG. 16 is a flowchart showing an overview of the flow of item keyword determination processing according to this embodiment. The process shown in this flowchart is executed when the process of step S103 in FIG. 15 is completed. Note that this flowchart illustrates the processing when the item attribute to be extracted is "billing amount". Note that the item keyword determination process corresponds to the analysis process of analyzing the learning image.
  • step S1041 the position of the correct definition value of the extraction target item is specified in one learning image among all the learning images.
  • the item keyword determining unit 56 determines at which position in the learning image 1 the correct definition value “4,059” of the item attribute “claimed amount” of the learning image 1 in the correct definition (see FIG. 5). Identify what is listed. After that, the process proceeds to step S1042.
  • step S1042 in one learning image out of all the learning images, word strings around the correct definition value of the extraction target item are extracted as item keyword candidates related to the extraction target item.
  • the item keyword determination unit 56 extracts item keyword candidates from the character recognition result of the learning image. For example, the recognized character string for the character string image around the correct definition value "4,059" in the learning image 1 whose position was specified in step S1041 is extracted as the item keyword candidate for the item attribute "billed amount”. (see Figure 7). After that, the process proceeds to step S1043.
  • step S1043 it is determined whether or not item keyword candidates related to the item attribute "billed amount” have been extracted for all learning images (whether the processes of steps S1041 and S1042 have been executed).
  • the CPU 21 determines whether or not item keyword candidates related to the item attribute “billed amount” are extracted from each of all the learning images. If all the learning images have not been processed (NO in step S1043), the process returns to step S1041, and the processing of the unprocessed learning image (for example, learning image 2) is performed. On the other hand, if all the learning images have been processed (YES in step S1043), the process proceeds to step S1044.
  • an item keyword for the item attribute "billed amount” is determined (generates an item keyword list).
  • the item keyword determination unit 56 selects a plurality of item keywords related to the item attribute "billed amount” from among the item keyword candidates related to the item attribute "billed amount” in each learning image extracted in step S1042, Generate a list. Then, the storage unit 59 stores the generated item keyword list. After that, the processing shown in this flowchart ends.
  • FIG. 17 is a flowchart showing an overview of the flow of trained model generation processing according to this embodiment. The process shown in this flowchart is executed when the process of step S104 (the process of FIG. 16) in FIG. 15 ends. This flowchart also exemplifies processing when the item attribute is "billing amount”.
  • step S1051 item value candidates related to the extraction target item are extracted from the character recognition results for one learning image among all the learning images.
  • the item value candidate extracting unit 54 uses the format definition related to the extraction target item stored in the format definition storage unit 53 to extract item value candidates related to the extraction target item. For example, the item value candidate extraction unit 54 extracts a word string that matches the format definition related to the item attribute "billed amount" from the character recognition result of the learning image 1, Extract as an item value candidate. After that, the process proceeds to step S1052.
  • step S1052 the position (place) of the item keyword related to the extraction target item is specified in one learning image among all the learning images.
  • the feature generation unit 57 searches for a word string that matches the item keyword in the item keyword list related to the item attribute “billing amount” from the character recognition result of the learning image 1, and generates the matched word string (item keyword) is described in the image 1 for learning. After that, the process proceeds to step S1053.
  • step S1053 for one learning image out of all the learning images, feature amounts of item value candidates are generated based on the positional relationships between item value candidates and a plurality of item keywords in the learning image.
  • the feature generation unit 57 uses the position of the item keyword specified in step S1052, the feature generation unit 57 generates a feature amount for each item value candidate extracted in step S1051.
  • the feature generation unit 57 converts the feature amount of each item value candidate of the item attribute "billed amount" in the learning image 1 into the positional relationship between the item value candidate and a plurality of item keywords related to the item attribute "billed amount”. generated based on After that, the process proceeds to step S1054.
  • step S1054 it is determined whether feature amounts for item value candidates have been generated for all learning images (whether the processes from steps S1051 to S1053 have been executed).
  • the CPU 21 determines whether or not the feature amount of each item value candidate related to the item attribute "billing amount" is generated in each of all the learning images. If all the learning images have not been processed (NO in step S1054), the process returns to step S1051, and the processing of the unprocessed learning image (for example, learning image 2) is performed. On the other hand, if all the learning images have been processed (YES in step S1054), the process proceeds to step S1055.
  • step S1055 a learned model for the extraction target item is generated using the feature amount and the correct definition (information indicating whether or not the item value candidate is the correct definition value).
  • the model generation unit 58 associates the feature amount of the item value candidate related to the item attribute "claimed amount” generated in step S1053 with information indicating whether or not the item value candidate is a correct definition value.
  • the storage unit 59 stores the generated learned model. After that, the processing shown in this flowchart ends.
  • FIG. 18 is a flowchart showing an overview of the flow of extraction processing according to this embodiment.
  • the processing shown in this flowchart is executed when the information processing apparatus 1 receives an instruction to scan a form (document) or the like. Note that this flowchart may be executed when a user's instruction to acquire a form image stored in the storage device 14 is received. This flowchart also exemplifies processing when the item attribute is "billing amount”.
  • step S201 a document image (extraction target image) is acquired.
  • the image acquisition unit 41 acquires a scanned image of a document (manuscript) of a predetermined document type (for example, an invoice). After that, the process proceeds to step S202.
  • step S202 the character recognition result (full-text OCR result) is obtained.
  • the recognition result acquisition unit 42 acquires a character recognition result (full-text OCR result) for the extraction target image by performing character recognition on the extraction target image acquired in step S201. After that, the process proceeds to step S203.
  • step S203 item value candidates related to the extraction target item are extracted from the character recognition result of the extraction target image.
  • the item value candidate extracting unit 46 extracts word strings matching the format definition related to the item attribute "billed amount” stored in the format definition storage unit 45 as item value candidates related to the item attribute "billed amount”. After that, the process proceeds to step S204.
  • step S204 the position (part) of the item keyword related to the extraction target item is specified in the extraction target image.
  • the feature generation unit 47 searches for a word string that matches the item keyword in the item keyword list related to the item attribute “billed amount” from the character recognition result of the extraction target image, and the matched word string (item keyword) is extracted. Identify where in the image it is written. After that, the process proceeds to step S205.
  • step S205 the feature amount of the item value candidate is generated based on the positional relationship between the item value candidate and the plurality of item keywords in the extraction target image. Using the position of the item keyword specified in step S204, the feature generation unit 47 generates a feature amount of each item value candidate related to the item attribute "billed amount" extracted in step S203. After that, the process proceeds to step S206.
  • step S206 the validity of each item value candidate is determined using the feature amount and learned model of each item value candidate related to the extraction target item.
  • the item value extraction unit 48 adds the feature amount of each item value candidate related to the item attribute “billing amount” generated in step S205 to the learned model of the item attribute “billing amount” stored in the model storage unit 43. By inputting, it is determined whether or not each item value candidate is appropriate as the item value of the item attribute "billing amount”. Also, the item value extraction unit 48 uses the learned model to calculate, for each item value candidate, a validity score indicating the likelihood that the item value candidate is the item value. After that, the process proceeds to step S207.
  • step S207 a plausible item value candidate is selected (extracted) as the item value of the extraction target item based on the validity score. If there is only one item value candidate determined to be appropriate as the item value in step S206, the item value extraction unit 48 selects the item value candidate as a likely item value candidate for the extraction target item value (extraction target item item value). On the other hand, if there are a plurality of item value candidates determined to be valid as the item value to be extracted, the item value candidate with the highest validity score calculated in step S206 among the plurality of item value candidates is selected as the extraction target item value. A plausible item value candidate (item value of the extraction target item) is determined as the item value.
  • the item value extraction unit 48 outputs the determined (extracted) item value.
  • the process proceeds to step S208.
  • step S208 it is determined whether or not item values have been extracted for all extraction target items.
  • the CPU 11 determines whether or not an item value (likely item value candidate) is extracted for each extraction target item. By referring to the correct answer definition, it is possible to check (recognize) all the extraction target items. If the item values of all the extraction target items have not been extracted (NO in step S208), the process returns to step S203, and the processing of the extraction target items that have not been processed (for example, the item attribute "payment deadline") is executed. be. On the other hand, if the item values have already been extracted for all extraction target items (YES in step S208), the processing shown in this flowchart ends.
  • an invoice is exemplified as the predetermined document type
  • the learning process for extracting the item values in the invoice and the extraction process for the item values in the invoice were exemplified.
  • the learning device 2 may be performed for each of a plurality of predetermined document types.
  • the learning device 2 generates a learned model and an item keyword list for each extraction target item for each of a plurality of predetermined document types (for example, an invoice and a statement of delivery).
  • the information processing apparatus 1 can extract item values in documents (manuscripts) of various document types by acquiring learned models and item keyword lists for each document type from the learning apparatus 2. Become.
  • the user who has viewed the extraction target image may determine which document type of the trained model or the like is to be used for the acquired extraction target image. It may be determined by having a function to automatically identify the document type of the indicated document (original).
  • the learning device 2 extracts the character string (item value candidate) from the feature amount based on the positional relationship between the character string (item value candidate) in the image and the plurality of item keywords. ) is the item value of the target item. It is also possible to generate a model (extractor) that can extract item values. Further, according to the present embodiment, the information processing apparatus 1 selects the character string (item value candidate) from the feature amount based on the positional relationship between the character string (item value candidate) in the image and the plurality of item keywords.
  • an item value extractor (learned model) that can also handle images of documents with undefined layouts.
  • an item value extractor (learned model) that can also handle images of documents with undefined layouts.
  • OCR display definition
  • the target form sample (a plurality of learning images related to the same type of form with different layouts) and the correct definition of the item value to be extracted (the item value candidates are the items of the extraction target item) It is possible to automatically (semi-automatically) create a learned model and item keywords to replace (correspond to) extraction rules for extracting item values. Therefore, even a general worker can easily generate an extractor (learned model) for extracting item values from a semi-standard form. In other words, according to the present embodiment, it is possible to generate an extractor (learned model) that can handle documents with undefined layouts. It becomes possible to extract item values.
  • the learning device 2 in addition to the CPU 21, ROM 22, RAM 23, storage device 24, and communication unit 25, the learning device 2 according to this embodiment further includes an input device 26 such as a mouse, keyboard, or touch panel, and an output device 27 such as a display.
  • FIG. 19 is a diagram showing an outline of the functional configuration of the learning device according to this embodiment.
  • the program recorded in the storage device 24 is read out to the RAM 23, executed by the CPU 21, and each hardware provided in the learning device 2 is controlled, so that the image acquisition unit 51,
  • recognition result acquisition unit 52 format definition storage unit 53, item value candidate extraction unit 54, correct definition acquisition unit 55, item keyword determination unit 56, feature generation unit 57, model generation unit 58 and storage unit 59
  • display unit 60 , a designation reception unit 61 and a correct answer definition generation unit 62 .
  • the display unit 60, the designation reception unit 61 reception unit 61, and the correct answer definition generation unit 62 which are different from the above-described embodiment, will be described below.
  • the display unit 60 executes various display processes via the output device 27 in the learning device 2. For example, the display unit 60 generates and displays a correct definition generation screen for the user (correct definition generation worker) to select the item values (correct definition values) of the extraction target items in order to generate the correct definition. .
  • the display unit 60 displays each learning image on the correct definition generation screen, encloses the item value candidates in the displayed learning image with a red frame, a dotted line frame, or the like, so that the extracted item value candidates are displayed as items. Display the value candidate in a user-visible way.
  • the display unit 60 also displays the OCR result character string (item value candidate) of the portion selected as the correct definition value by the user in the correct definition value table that displays the character string selected as the correct definition value.
  • the display unit 60 is a user interface (UI, User Interface) (correct answer selection UI) for displaying learning images, extracted item value candidates, selected correct answer definition values, and the like.
  • FIG. 20 is a diagram showing an example of the correct definition generation screen (when "billing amount" is selected) according to this embodiment.
  • the correct definition generation screen displays a learning image (correct definition image) for which correct definition is to be performed (left side of the screen in FIG. 20) and a correct definition value table (right side of the screen in FIG. 20).
  • the correct definition screen is not limited to the configuration of the screen illustrated in FIG. 20, and has a configuration in which a correct definition image and item value candidates are displayed, and a correct definition value can be selected from the displayed item value candidates. If so, any screen configuration may be used.
  • FIG. 20 shows an example in which the correct definition value for the item attribute "billing amount” is determined in learning image 1.
  • item value candidates related to the item attribute "claimed amount” are displayed in dotted-line frames.
  • the display unit 60 displays the selected OCR Display the result string "4,059".
  • an arrow or the like may be displayed at the corresponding item attribute in the correct definition value table.
  • the display unit 60 displays a screen for extracting the correct definition value for the next item attribute (for example, "payment deadline"). do.
  • FIG. 21 is a diagram showing an example of the correct definition generation screen (when "payment deadline” is selected) according to this embodiment.
  • the example of FIG. 21 shows an example in which the correct definition value of the item attribute “payment deadline” is determined in the learning image 1 .
  • item value candidates related to the item attribute "payment deadline” are displayed in dotted-line frames.
  • the focus (arrow) moves to the corresponding item attribute "payment deadline” in the correct definition value table. ing. As a result, the user can be prompted to select the correct definition value for the next item attribute.
  • the designation reception unit 61 receives various inputs (designations) from the user via the input device 26 such as a mouse.
  • the designation receiving unit 61 receives, for example, a user's designation of one item value candidate as a correct definition value from among the item value candidates displayed on the correct definition generation screen.
  • the specification accepting unit 61 accepts a specification related to selection of a correct definition value when a user selects an item value candidate, which is an item value of an extraction target item, using a mouse or the like.
  • the user who visually recognized the item value candidate selects the item value candidate "4,059" as the correct definition value with the mouse (arrow (pointer) location), and the selected location in the correct definition value table is displayed as the correct definition value.
  • the item value candidate "2021/7/25" is selected as the correct definition value
  • the OCR result character string "2021/7/25" of the selected portion is the correct answer. It is displayed as a defined value.
  • the correct answer definition generating unit 62 converts item value candidates (OCR result character strings at specified locations) related to extraction target items (item attributes) specified by the user into item values ( correct definition value) to generate a correct definition.
  • the correct definition generating unit 62 generates a correct definition by storing, as correct definition values, item value candidates for each extraction target item whose designation is received by the designation receiving unit 61 .
  • the correct answer definition is not limited to the CSV format, and may be in another format.
  • the correct definition generation unit 62 outputs the generated correct definition, and the correct definition acquisition unit 55 acquires the correct definition generated and output by the correct definition generation unit 62 .
  • the user presses the "fix correct definition” button to Generate a correct answer definition that stores a value (correct answer definition value).
  • the item attribute of the target (extraction target) for defining the item value (correct definition value) may be determined in advance by the user and stored in the storage device 24 or the like as definition target item attribute data.
  • the process of determining (selecting) the correct definition value described above is executed for each definition target item attribute included in the definition target item attribute data.
  • the correct answer definition generation process is performed by the learning device 2 , but the processing is not limited to this, and may be performed by another device other than the learning device 2 . In this case, the learning device 2 performs the learning process by acquiring the correct definition from another device on which the correct definition generation process has been executed.
  • FIG. 22 is a flowchart showing an overview of the flow of correct definition generation processing according to this embodiment.
  • the process shown in this flowchart is executed when, for example, an instruction to scan a form (document) is accepted on the correct definition generation screen displayed in the learning processing device 2 .
  • this flowchart may be executed when a user's instruction to acquire a form image stored in the storage device 24 is received.
  • the processing shown in this flowchart is executed prior to the learning processing as preprocessing for the learning processing shown in FIG. 15 .
  • This flowchart also exemplifies processing when the item attribute is "billing amount".
  • step S301 a plurality of document images (correct answer definition images that are learning images) are acquired.
  • the image acquisition unit 51 acquires scanned images of documents (original documents) of a predetermined document type (for example, an invoice) having different layouts. After that, the process proceeds to step S302.
  • step S302 the character recognition result (full-text OCR result) is acquired.
  • the recognition result acquisition unit 52 acquires a character recognition result (full-text OCR result) for each correct definition image by performing character recognition on each correct definition image acquired in step S301. After that, the process proceeds to step S303.
  • step S303 item value candidates related to the item attribute to be extracted are extracted from the character recognition result of the correct answer definition image.
  • the item value candidate extracting unit 54 uses the format definition related to the extraction target item stored in the format definition storage unit 53 to extract item value candidates related to the extraction target item. For example, the item value candidate extraction unit 54 extracts a word string that matches the format definition related to the item attribute "billed amount" from the character recognition result of the learning image 1, Extract as an item value candidate. After that, the process proceeds to step S304.
  • step S304 item value candidates are displayed on the correct definition generation screen.
  • the display unit 60 displays the item value candidates on the correct definition generation screen so that the user can recognize which word string is the item value candidate extracted in step S303 (see FIG. 20). After that, the process proceeds to step S305.
  • step S305 the specification of the correct definition value from the user is accepted.
  • the designation reception unit 61 receives designation by the user of the correct definition value.
  • the user designates the item value candidate "4,059", which is the item value of the item attribute "claimed amount” in the learning image 1, as the correct definition value, thereby specifying the correct definition value. Acceptable.
  • the display unit 60 displays the OCR result character string "4,059" of the selected portion as the correct definition value in the correct definition value table of the correct definition generation screen. . After that, the process proceeds to step S306.
  • step S306 it is determined whether or not the designation of the correct definition value has been accepted (whether the processes of steps S303 to S305 have been executed) for all the extraction target items (item attributes).
  • the CPU 21 determines whether or not the specification of the correct definition value has been accepted for each extraction target item. If all the extraction target items have not been processed (NO in step S306), the process returns to step S303, and the extraction target items that have not been processed (for example, the item attribute "payment deadline") are processed. On the other hand, if all extraction target items have been processed (YES in step S306), the process proceeds to step S307.
  • step S307 the correct definition value of each extraction target item (item attribute) in the learning image is determined.
  • the specification accepting unit 61 accepts the user's instruction to determine the item value candidates of all the item attributes specified in step S305 as the correct definition value
  • the correct definition generating unit 62 generates a learning image (for example, a learning Determine the correct definition value of each item attribute in image 1). After that, the process proceeds to step S308.
  • step S308 it is determined whether or not the correct definition values have been determined for all of the learning images.
  • the CPU 21 determines whether or not the correct definition value of each extraction target item (item attribute) has been determined in each of all the learning images. If all the learning images have not been finalized (NO in step S308), the process returns to step S303, and the correct definition generation screen for the unprocessed learning image (for example, learning image 2) is displayed. Processing is performed. On the other hand, if all the learning images have been confirmed (YES in step S308), the process proceeds to step S309.
  • step S309 a correct answer definition is generated.
  • the correct definition generation unit 62 generates and outputs a correct definition that stores the correct definition value of each item attribute for all the learning images determined in step S307. After that, the processing shown in this flowchart ends.
  • the correct definition acquisition unit 55 acquires the correct definition from the correct definition generation unit 62 (step S102 in FIG. 15).
  • steps S101 and S103 of the learning processing in the learning device 2 in FIG. may be omitted.
  • step S1051 of the trained model generation process in the learning apparatus 2 in FIG. 17 may be omitted.
  • a plurality of correct definition images are collectively obtained in step S301, but the present invention is not limited to this, and the processing of steps 301 to S307 is executed for each correct definition image. You can do it.
  • the automatically extracted item value candidates are displayed, and the operator can generate a correct answer definition simply by selecting the correct item value from the displayed item value candidates. is possible, it is possible to make the work of generating the correct definition more efficient than the method in which the operator manually inputs the correct definition value. As a result, it is possible to make the work for extracting item values (the work of generating a trained model and an item keyword list) more efficient.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)

Abstract

情報処理システムに、対象画像の文字認識結果を取得する認識結果取得部と、対象画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列を複数抽出する項目値候補抽出部と、各候補文字列について、複数の項目キーワードと候補文字列との対象画像内での位置関係に基づく特徴量を生成する特徴生成部と、文字列と複数の項目キーワードとの画像内での位置関係に基づく特徴量が入力されることで、当該文字列が抽出対象項目の項目値である妥当性を示す情報が出力されるよう、機械学習により生成された学習済みモデルを記憶するモデル記憶部と、対象画像における各候補文字列の特徴量を学習済みモデルに入力することで、複数の候補文字列から抽出対象項目の項目値を抽出する項目値抽出部とを備えた。

Description

情報処理システム、項目値抽出方法、モデル生成方法及びプログラム
 本開示は、画像に含まれる項目値を抽出するための技術に関する。
 従来、文書画像における抽出対象領域を指定し、抽出対象領域の近傍から抽出用語を含む文字領域を抽出し項目名候補領域とし、抽出対象領域と項目名候補領域とに基づき、抽出ルールを生成する方法であって、項目名候補領域が一つの場合、項目名候補領域を項目名領域として、抽出対象領域と項目名領域との位置関係に基づき抽出ルールを生成し、項目名候補領域が複数あり、複数の項目名候補領域から一つの項目名領域が特定できた場合、抽出対象領域と特定できた項目名領域との位置関係に基づき、抽出ルールを生成する方法が提案されている(特許文献1を参照)。
 また、帳票画像から検出され認識された文字列に対し、項目値表記スコアを計算した後、項目値候補ペアの配置関係に対し、異なる属性の項目値同士の配置関係としての妥当さを表す項目値候補配置スコアを計算し、更に、項目値候補スコアと項目値候補配置スコアの値に基づいて、異なる属性の項目値同士のペアとしての妥当さを表す項目値候補ペアスコアを計算することにより、項目値グループの項目値を決定する方法が提案されている(特許文献2を参照)。
 更に、少なくとも1つのトレーニング文書からの情報を利用する少なくとも1つのスコアリングアプリケーションを利用して、少なくとも1つの可能性あるターゲット値を決定することと、少なくとも1つの新たな文書上で、少なくとも1つのターゲットの少なくとも1つの値を決定するために、少なくとも1つのスコアリングアプリケーションを利用して、少なくとも1つの新たな文書に情報を適用すること、とを含む方法が提案されている(特許文献3を参照)。
特開2020-20512号公報 特開2016-51339号公報 特表2013-509663号公報
 従来、文書に記載された情報(項目値)を抽出する技術として、OCR(Optical Character Recognition、光学文字認識)を用いて、定型帳票から項目値を抽出する技術が提案されている。定型帳票等の定型文書の場合、項目の記載位置(レイアウト)が定まっているため、OCRによる項目の読み取り位置を事前に定義することで、所望の情報(項目値)を抽出可能である。
 しかし、同一種の文書であっても様々なレイアウト(フォーマット)が存在する文書の場合、原稿によってレイアウトが異なるため、各レイアウトについて、OCRによる項目の読み取り位置を事前に定義することは煩雑であり、上述した従来の方法では、項目値を抽出することが困難である。
 本開示は、上記した問題に鑑み、レイアウトが定まっていない文書であっても、文書画像から項目値を抽出することを課題とする。
 本開示の一例は、対象画像を文字認識した結果である文字認識結果を取得する認識結果取得手段と、前記対象画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列を複数抽出する項目値候補抽出手段と、各候補文字列について、前記抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと候補文字列との前記対象画像内での位置関係に基づく特徴量を生成する特徴生成手段と、文字列と前記複数の項目キーワードとの画像内での位置関係に基づく特徴量が入力されることで、該文字列が前記抽出対象項目の項目値である妥当性を示す情報が出力されるよう、機械学習により生成された学習済みモデルを記憶するモデル記憶手段と、前記対象画像における各候補文字列の前記特徴量を前記学習済みモデルに入力することで、前記複数の候補文字列から前記抽出対象項目の項目値を抽出する項目値抽出手段とを備える情報処理システムである。
 本開示は、情報処理装置、システム、コンピュータによって実行される方法またはコンピュータに実行させるプログラムとして把握することが可能である。また、本開示は、そのようなプログラムをコンピュータその他の装置、機械等が読み取り可能な記録媒体に記録したものとしても把握できる。ここで、コンピュータ等が読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的又は化学的作用によって蓄積し、コンピュータ等から読み取ることができる記録媒体をいう。
 本開示によれば、レイアウトが定まっていない文書であっても、文書画像から項目値を抽出することが可能となる。
実施形態に係る情報処理システムの構成を示す概略図である。 実施形態に係る学習装置の機能構成の概略を示す図である。 実施形態に係る項目値候補の抽出例(学習用画像1)を示す図である。 実施形態に係る項目値候補の抽出例(学習用画像2)を示す図である。 実施形態に係る正解定義テーブルの一例を示す図である。 実施形態に係る方向重みの算出例を示す図である。 実施形態に係る学習用画像1における距離重み及び方向重みの算出例を示す図である。 実施形態に係る学習用画像2における距離重み及び方向重みの算出例を示す図である。 実施形態に係る有効性スコアの算出例を示す図である。 実施形態に係る学習用画像1における位置関係情報の抽出例を示す図である。 実施形態に係る学習処理時の位置関係情報リストの例を示す図である。 実施形態に係る学習処理時の特徴リストの例を示す図である。 実施形態に係る情報処理装置の機能構成の概略を示す図である。 実施形態に係る抽出対象画像についての位置関係情報リスト及び妥当性スコアの例を示す図である。 実施形態に係る学習処理の流れの概要を示すフローチャートである。 実施形態に係る項目キーワード決定処理の流れの概要を示すフローチャートである。 実施形態に係る学習済みモデル生成処理の流れの概要を示すフローチャートである。 実施形態に係る抽出処理の流れの概要を示すフローチャートである。 他の実施形態に係る学習装置の機能構成の概略を示す図である。 実施形態に係る正解定義生成画面(「請求金額」選択時)の一例を示す図である。 実施形態に係る正解定義生成画面(「支払期限」選択時)の一例を示す図である。 実施形態に係る正解定義生成処理の流れの概要を示すフローチャートである。
 以下、本開示に係る情報処理システム、方法及びプログラムの実施の形態を、図面に基づいて説明する。但し、以下に説明する実施の形態は、実施形態を例示するものであって、本開示に係る情報処理システム、方法及びプログラムを以下に説明する具体的構成に限定するものではない。実施にあたっては、実施の態様に応じた具体的構成が適宜採用され、また、種々の改良や変形が行われてよい。
 本実施形態では、本開示に係る情報処理システム、方法及びプログラムを、帳票画像から項目値を抽出するシステムにおいて実施した場合の実施の形態について説明する。但し、本開示に係る情報処理システム、方法及びプログラムは、文書画像から項目値を抽出するための技術について広く用いることが可能であり、本開示の適用対象は、実施形態において示した例に限定されない。
 <システムの構成>
 図1は、本実施形態に係る情報処理システム9の構成を示す概略図である。本実施形態に係る情報処理システム9は、ネットワークに接続されることで互いに通信可能な、1又は複数の情報処理装置1、学習装置2及び文書読取装置3(3A、3B)を備える。学習装置2では、文書内の抽出対象項目(項目属性)の項目値を抽出するための学習済みモデルが生成される。情報処理装置1では、学習装置2において生成された学習済みモデルを用いて、対象画像に含まれる抽出対象項目の項目値が抽出される。
 本実施形態では、文書として帳票を例示するが、文書は、項目(項目値)を含む文書であれば、帳票以外の任意の文書であってよい。なお、本実施形態で、「帳票」とは、帳簿、伝票及び証憑書類等を含む広義の帳票を意味する。また、帳票は、同一種の帳票であっても原稿によってレイアウトの異なるタイプの帳票(準定型帳票)に限らず、予めレイアウトが決まっているタイプの帳票(定型帳票)であってもよい。
 本実施形態で、「項目値」は、項目(項目属性)に対応する値であり、対象の項目について入力(記入)された情報(文字列)である。項目値は、例えば、項目が請求金額の場合、「12,800」や「7,340」等の数値文字列であり、項目が支払い期限の場合、「2021年8月2日」や「2022/3/5」等の日付文字列である。
 「項目名」は、項目に対して与えられた名称であり、文書(原稿)に記載される名称である。例えば、項目(項目属性)が請求金額の場合、「請求額」、「合計金額」、「請求合計」等の項目名が記載され、項目が支払い期限である場合、「支払期日」、「振込期限」、「支払期限日」等の項目名が記載される。レイアウトが定まっていない文書では、同一の項目であっても、項目名やその記載位置は、原稿(発行元の会社等)により異なる場合がある。
 「項目属性」は、文書中で実際に付与された項目名に関わらず、同一の概念を示すが複数の互いに異なる項目名が付与され得る項目を統一的に取り扱うために定義される属性である。項目属性は、ユーザにより任意に命名(決定)可能である。例えば、「請求額」、「合計金額」、「請求合計」等の項目名が付与される項目については、項目属性が「請求金額」と決定され、「支払期日」、「振込期限」、「支払期限日」等の項目名が付与される項目については、項目属性が「支払期限」と決定される。上述の通り、項目名は、原稿によって異なる場合があるが、項目属性は、全ての原稿で共通して用いることが可能な名称(属性)である。なお、本実施形態において、「抽出対象項目」は、「抽出対象の項目属性」と同義である。
 「項目キーワード」は、項目名を含む、文書(原稿)に記載された単語列であり、抽出したい情報(項目値)を抽出するための目印となる単語列(キーワード単語列)である。項目キーワードは、項目値と直接関係する項目名の他に、関係の薄い項目名や、項目名以外の単語列をも含み得る。
 情報処理装置1は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、EEPROM(Electrically Erasable and Programmable Read Only Memory)やHDD(Hard Disk Drive)等の記憶装置14、NIC(Network Interface Card)等の通信ユニット15、キーボードやタッチパネル等の入力デバイス16及びディスプレイ等の出力デバイス17、等を備えるコンピュータである。但し、情報処理装置1の具体的なハードウェア構成に関しては、実施の態様に応じて適宜省略や置換、追加が可能である。また、情報処理装置1は、単一の筐体からなる装置に限定されない。情報処理装置1は、所謂クラウドや分散コンピューティングの技術等を用いた、複数の装置によって実現されてよい。
 情報処理装置1は、項目値を抽出する対象の文書種である所定の文書種の文書(原稿)における抽出対象項目の項目値を抽出するための学習済みモデル及び項目キーワードリストを学習装置2から取得し、記憶する。また、情報処理装置1は、文書読み取り装置3Aから、当該所定の文書種の文書(原稿)の画像(抽出対象画像)を取得する。そして、情報処理装置1は、学習済みモデル及び項目キーワードリストを用いることで、抽出対象画像から抽出対象項目の項目値を抽出する。項目値を抽出する対象の文書種(所定の文書種)は、請求書や、注文書、納品書、伝票、経費帳等の、様々な文書の種類に例示される。
 なお、文書画像は、TIFF(Tagged Image File Format)、JPEG(Joint Photographic Experts Group)、PNG(Portable Network Graphics)等の電子データ(画像データ)に限らず、PDF(Portable Document Format)による電子データであってもよい。そのため、文書画像は、原稿をスキャンしてPDF化することにより得られる電子データ(PDFファイル)や、当初からPDFファイルとして作成された電子データであってもよい。
 なお、抽出対象画像を取得する方法は、上述した例に限定されず、他の装置を介して取得する方法や、USB(Universal Serial Bus)メモリ、SDメモリーカード(Secure Digital memory card)及び光ディスク等の外部記録媒体や記憶装置14から読み出すことで取得する方法等、任意の方法が用いられてよい。なお、抽出対象画像を、文書読取装置3Aから取得しない場合は、情報処理システム9に文書読取装置3Aを備えなくてもよい。また、同様に、学習済みモデル及び項目キーワードリストを取得する方法は、上述した例に限定されず、任意の方法が用いられてよい。
 学習装置2は、CPU21、ROM22、RAM23、記憶装置24及び通信ユニット25等を備えるコンピュータである。但し、学習装置2の具体的なハードウェア構成に関しては、実施の態様に応じて適宜省略や置換、追加が可能である。また、学習装置2は、単一の筐体からなる装置に限定されない。学習装置2は、所謂クラウドや分散コンピューティングの技術等を用いた、複数の装置によって実現されてよい。
 学習装置2は、文書読み取り装置3Bから、所定の文書種(例えば、請求書)の文書の画像(学習用画像)を取得する。そして、学習装置2は、学習用画像を用いて学習処理を行うことにより、所定の文書種の文書における抽出対象項目の項目値を抽出するための学習済みモデル及び項目キーワードリストを生成する。
 なお、学習用画像を取得する方法は、上述した例に限定されず、他の装置を介して取得する方法や、外部記録媒体や記憶装置24から読み出すことで取得する方法等、任意の方法が用いられてよい。なお、学習用画像を、文書読取装置3Bから取得しない場合は、情報処理システム9に文書読取装置3Bを備えなくてもよい。また、本実施形態では、別装置(別筐体)である情報処理装置1と学習装置2を例示するが、この例に限定されず、情報処理装置9は、学習処理及び原稿種識別処理の両者を行う一の装置(筐体)を備えるようにしてよい。
 文書読取装置3(3A、3B)は、ユーザからのスキャン指示等を受け、紙媒体の文書を光学的に読み取ることで、文書画像を取得する装置であり、スキャナや複合機等に例示される。文書読取装置3Aは、データ入力を要する請求書等の、ユーザが項目値を抽出したい帳票(項目値を抽出する対象の帳票)を読み取ることで、抽出対象画像を取得する。文書読取装置3Bは、レイアウトが互いに異なる同一種の帳票(所定の文書種の文書)を複数読み取ることで、複数の学習用画像を取得する。なお、文書読取装置3Aと文書読取装置3Bは、同一の装置(筐体)であってもよい。また、文書読取装置3は、他の装置に画像を送信する機能を備えるものに限定されず、デジタルカメラやスマートフォン等の撮像装置であってもよい。また、文書読取装置3は、文字認識(OCR)機能を備えなくてもよい。
 図2は、本実施形態に係る学習装置の機能構成の概略を示す図である。学習装置2は、記憶装置24に記録されているプログラムが、RAM23に読み出され、CPU21によって実行されて、学習装置2に備えられた各ハードウェアが制御されることで、画像取得部51、認識結果取得部52、書式定義記憶部53、項目値候補抽出部54、正解定義取得部55、項目キーワード決定部56、特徴生成部57、モデル生成部58及び記憶部59を備える装置として機能する。なお、本実施形態及び後述する他の実施形態では、学習装置2の備える各機能は、汎用プロセッサであるCPU21によって実行されるが、これらの機能の一部又は全部は、1又は複数の専用プロセッサによって実行されてもよい。また、学習装置2が備える各機能部は、単一の筐体からなる装置(1の装置)に実装されるものに限定されず、遠隔に及び/又は分散して(例えば、クラウド上に)実装されてもよい。
 本実施形態では、一般的な帳票(原稿)における項目値と項目名の関係性に基づき、対象帳票(帳票画像)から項目値を抽出するための学習済みモデル及び項目キーワードリストが生成される。以下、原稿における項目値と項目名の関係性(位置関係)に基づく、項目値抽出の概念を説明する。
 通常、項目値に対応する項目名は、項目値の左方向又は上方向に記載されることが多い。また、通常、項目値に対応する項目名は、項目値の近くに記載されることが多い。これらは、定型帳票及び準定型帳票のどちらにも共通する関係性である。例えば、請求金額の項目(項目属性「請求金額」)の項目値を抽出したい場合、その左側近くには、「合計」や「請求額」、「支払金額」、「振込額」等の項目値に対応する項目名が記載され、上方向には、「金額」等、斜め方向には、「消費税」や「小計」、「値引き分」等の関連キーワードが記載される。
 そのため、項目値候補と、当該項目値候補から左方向や上方向に記載された項目キーワード(項目値と関連性があると想定される項目値周囲の単語列)との位置関係から、その項目値候補が目的の項目値(抽出対象項目の項目値)である妥当性を判断することが可能である。つまり、項目値(項目値候補)から左方向及び上方向にどのような項目キーワード(単語列)が、どれくらいの距離及びどの方向に記載されているかを統計的に集計し学習することで、対象項目の項目値である妥当性を判定可能な学習済みモデルを生成可能となる。換言すると、項目値候補の周辺に記載された項目キーワードが何で、どの方向に、どれくらいの距離にあったかを特徴として入力することで、当該項目値候補が対象項目の項目値である妥当性を識別可能なモデルを生成することが可能となる。
 画像取得部51は、学習処理において使用される複数の学習用画像(サンプル画像)を取得する。画像取得部51は、学習用画像として、互いにレイアウトが異なる同一種の文書についての複数の画像(画像データ)を取得する。請求書等の帳票は、発行元の会社等が異なると、帳票における項目の記載位置や項目名等のレイアウトが異なる場合がある。そのため、例えば、発行元の異なる複数の請求書の画像を学習用画像として用いる。画像取得部51は、例えば、ユーザのスキャン指示により、文書読取装置3Bにおいて互いにレイアウトが異なる複数の請求書が読み取られると、その読み取り結果である請求書のスキャン画像を学習用画像として取得する。なお、文書画像には、文書中の情報が画像として含まれている。
 なお、各レイアウトの学習用画像の枚数は任意であり、レイアウト毎に一枚の学習用画又は複数枚の学習用画像を用いる。一つのレイアウトにつき複数枚の学習用画像を用いることで、より高精度な学習を行うことが可能である。また、例えば、業務において頻繁に取り扱う請求書(A社が発行する請求書等)がある場合、その請求書のレイアウトについての学習用画像を多くする等、取り扱うレイアウトの頻度(重要度)に合わせて学習用画像の数を調整することにより、ユーザの環境に合わせた学習を行うことが可能である。
 認識結果取得部52は、各学習用画像についての文字認識結果(文字列データ)を取得する。認識結果取得部52は、学習用画像全体(全領域)を、OCRを用いて読み取ることにより、学習用画像についての文字認識結果(以下、「全文OCR結果」と称する)を取得する。なお、全文OCR結果は、学習用画像内の各文字列(文字列画像)に対する文字認識結果を含むものあれば、データ構造は任意である。なお、全文OCR結果を取得する方法は、上述した例に限定されず、OCR処理を行う文字認識装置等の他の装置を介して取得する方法や、外部記録媒体や記憶装置24から読み出すことで取得する方法等、任意の方法が用いられてよい。なお、本実施形態において、文字列とは、1以上の文字からなる列(文字の連なり)であり、文字には、平仮名、片仮名、漢字、アルファベット、数字、記号等を含む。
 書式定義記憶部53は、項目値候補を抽出する際に用いられる、抽出対象項目に係る書式定義を記憶する。具体的には、項目値候補抽出処理では、抽出対象項目に係る書式定義に合致(マッチング)した文字列が、当該抽出対象項目の項目値候補として抽出される。そのため、抽出対象項目の項目値となり得る文字列が項目値候補として抽出されるよう、書式定義には、抽出対象項目に関連する文字列書式(抽出対象項目の項目値に該当し得る文字列の書式)が定義される。例えば、日付に関する項目属性「支払期限」の場合、「支払期限」の項目値となり得る文字列が項目値候補として抽出されるよう、項目属性「支払期限」の書式定義には、「支払期限」に関連する文字列書式として、「日付」に関する書式が定義される。また、例えば、金額に関する項目属性「請求金額」の書式定義には、「請求金額」に関連する文字列書式として、「金額」に関する書式が定義される。以下、具体的な書式定義の例を示す。
 例えば、項目属性「支払期限」に係る書式定義には、「日付」に関する書式として、「’¥d{4}[¥/¥.¥-]¥d{1,2}[¥/¥.¥-]¥d{1,2}’¥’|¥d{4}[年]¥d{1,2}[月]¥d{1,2}[日]’¥’|(JAN(UARY)?|FEB(LUARY)?|MAR(CH)?|APR(IL)?|MAY|JUNE?|JULY?|AUG(UST)?|SEP(TEMBER)?|OCT(OBER)?|NOV(EMBER)?|DEC(EMBER)?|JLY)[¥/¥.¥-]?¥d{1,2}(th)?[¥,¥/¥.¥-]?(¥d{4}|¥d{2})’」」が定義される。この書式定義の例によれば、「2020/08/09」等のスラッシュを用いた表記による日付や、「2021.2.17」等のピリオドを用いた表記による日付、「2020年7月24日」等の漢字表記による日付、「JAN 23 2020」等の英語表記による日付等の、多様な表記(書式)による日付を、項目属性「支払期限」の項目値候補(候補文字列)として抽出可能となる。
 また、他の例として、項目属性「請求金額」に係る書式定義には、「金額」に関する書式として、「’¥d{0,3}[.,]?¥d{0,3}[.,]?¥d{1,3}[.,]¥d{0,3}’」が定義される。この書式定義の例によれば、3桁毎の数字と、カンマ又はピリオドの区切り文字を含んだ文字列を、項目属性「請求金額」の項目値候補として抽出可能となる。
 なお、本実施形態では、ユーザにより予め作成された書式定義を例示するが、この例に限定されず、書式定義は、後述する正解定義に基づき自動で生成されてもよい。また、書式定義は、上述した正規表現による書式定義に限定されず、正規表現以外の表現により定義されてもよい。また、上述では、抽出対象の項目属性毎に、項目属性とそれに対する書式定義とを対応付ける例を示したが、これに限定されず、一つの書式定義に対して複数の項目属性を対応付けてもよい。例えば、金額に関する書式(書式定義)と、項目属性「請求金額」及び項目属性「単価」とが対応付けられてもよい。
 項目値候補抽出部54は、各学習用画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列(項目値候補)を複数抽出する。項目値候補抽出部54は、抽出対象項目に係る書式定義に合致(マッチング)する文字列を、当該抽出対象項目に係る項目値候補として抽出する。
 図3及び図4は、本実施形態に係る項目値候補の抽出例を示す図である。図3では、請求書についての学習用画像である学習用画像1を例示する。図4では、請求書についての学習用画像である学習用画像2を例示する。図3及び図4では、抽出対象の項目属性が「請求金額」であり、「請求金額」についての書式定義が、書式定義の具体例において例示された書式定義である場合について例示する。この場合、図3において破線で示す通り、項目属性「請求金額」に係る書式定義に合致する文字列(「請求金額」に係る項目値候補)として、「199」、「10」、「1,990」、「85」、「20」、「1,700」、「3,690」、「369」、「4,059」が抽出される。同様に、図4において破線で示す通り、項目属性「請求金額」に係る書式定義に合致する文字列(「請求金額」に係る項目値候補)として、「3,290」、「1,200」、「4,490」、「449」、「4,939」が抽出される。
 正解定義取得部55は、1以上の抽出対象項目と、各学習用画像における当該抽出対象項目の項目値とが対応付けられた正解定義を取得する。本実施形態では、正解定義取得部55は、学習装置2に、ユーザにより生成(定義)された正解定義が入力されることで、正解定義を取得する。例えば、ユーザは、抽出対象項目(項目属性)を決定し、各学習用画像を参照することで、各学習用画像に記載されている、抽出対象項目の項目値を抽出する。そして、ユーザは、抽出対象項目と、抽出された各学習用画像における当該抽出対象項目の項目値とを対応付ける形で格納することで、正解定義(正解定義テーブル)を生成し、学習装置2に入力する。
 図5は、本実施形態に係る正解定義テーブルの一例を示す図である。図5では、抽出対象の項目属性として、「請求金額」、「支払期限」及び「伝票番号」を例示するが、項目属性はこれらに限定されず任意に設定可能である。図5に示す通り、正解定義(正解定義テーブル)には、複数枚の学習用画像(「Sheet_001.jpg」、「Sheet_002.jpg」、及び「Sheet_003.jpg」等)の夫々における、各項目属性に対応する項目値(正解定義値)が格納されている。
 例えば、「Sheet_001.jpg」は学習用画像1(図3参照)、「Sheet_002.jpg」は学習用画像2(図4参照)であり、図3及び図4の学習用画像に夫々記載された、項目属性「請求金額」、「支払期限」及び「伝票番号」の項目値(項目属性に対応する項目名の項目値)が、図5に示された正解定義テーブルに格納されている。例えば、図3に示された学習用画像1に含まれる、項目名「合計」の項目値「4,059」が項目属性「請求金額」の正解定義値として、項目名「支払期限」の項目値「2021/7/25」が項目属性「支払期限」の正解定義値として、項目名「伝票番号」の項目値「BN0000868022」が項目属性「伝票番号」の正解定義値として、ユーザにより正解定義テーブルに格納される。このように、本実施形態では、ユーザにより、学習用画像に記載された抽出対象項目に対する項目値が入力されることで、正解定義(正解定義テーブル)が生成される。
 なお、項目値(正解定義値)を格納するためのデータ構造はCSV(comma-separated values)形式等のテーブル形式に限定されず、任意の形式であってよい。また、正解定義の取得方法は、上述した例に限定されず、他の装置を介して取得する方法や、外部記録媒体や記憶装置24から読み出すことで取得する方法等、任意の方法が用いられてよい。
 項目キーワード決定部56は、抽出対象項目の項目値を抽出するためのキーワードとなる項目キーワードを複数決定する。後述するように、情報処理装置1では、抽出対象項目の項目値候補が抽出された後、各項目値候補と複数の項目キーワードとの位置関係に基づき、各項目値候補の妥当性が判断され、最も妥当な項目値候補が当該抽出対象項目の項目値として決定される。そのため、項目キーワードは、抽出対象項目の項目値の抽出に有用なキーワードであることが望ましい。
 一方、請求書等に記載される項目名は、発行元の会社により揺らぎがある(異なる)場合があるため、各社からの多様な原稿に対応するためには、出来るだけ多くのキーワードを項目キーワードとして選出することが望ましい。しかし、抽出したい項目とは全く関係のないキーワードやイレギュラーなキーワード等を項目キーワードとして選出した場合、項目値の抽出に対する悪影響や、学習済みモデルの肥大化、処理速度の低下等の問題が懸念される。そのため、本実施形態では、帳票に記載された単語列のうち、項目値抽出に有用であると予測されるキーワードを項目キーワードとして決定(選出)する。以下、項目キーワードの決定方法を説明する。なお、項目キーワード決定部56は、抽出対象項目毎に、項目キーワードを複数決定する。
 まず、項目キーワード決定部56は、正解定義に格納されている、抽出対象の項目属性の項目値(正解定義値)の、学習用画像内の位置を特定する。そして、項目キーワード決定部56は、位置が特定された正解定義値の周囲にある単語列を、当該項目属性の項目キーワード候補として、当該学習用画像の文字認識結果から抽出する。なお、本実施形態において、単語列は、1以上の単語からなる列(単語の並び)である。また、正解定義値の周囲にある単語列とは、正解定義値から所定の範囲内に位置する単語列であり、正解定義値に近接した単語列に限定されず、学習用画像の全領域に含まれる単語列であってもよい。項目キーワード決定部56は、この項目キーワード候補の抽出処理を、各学習用画像に対して行う。
 例えば、図3に示された学習用画像1の場合、正解定義に格納された、項目属性「請求金額」の正解定義値「4,059」の位置が特定され、その周囲にある単語列(例えば、「単価」、「金額」、「小計」、「合計」等)が項目キーワード候補として抽出される。また、例えば、図4に示された学習用画像2の場合、正解定義に格納された、項目属性「請求金額」の正解定義値「4,939」の位置が特定され、その周囲にある単語列(例えば、「内容」、「金額」、「小計」、「合計」等)が項目キーワード候補として抽出される。
 本実施形態では、項目キーワード決定部56は、抽出対象項目毎に、各学習用画像において抽出された項目キーワード候補を含む項目キーワード候補リストを生成する。例えば、まず、正解定義値の周囲にある単語(単体)のリストと、正解定義値の周囲にある、複数単語からなる単語列(単語と当該単語の前後の単語とを組み合わせた単語列)のリストが生成された上で、これらのリストに含まれる単語列を格納する項目キーワード候補リストが生成される。なお、項目キーワード候補リストの生成方法は上述した例に限定されず、任意の方法で生成されてよい。
 このように、単語のみならず、複数単語からなる単語列を項目キーワード候補(項目キーワード)とすることで、例えば、「Total」と「Sub Total」、「Date」と「Due Date」、「Invoice Date」のように、項目名に他の項目名が含まれる場合にも、夫々を区別して識別し、夫々を項目キーワード候補(項目キーワード)として抽出可能である。これより、意図する項目キーワードが他のキーワードとして混同されることで、項目値の抽出に悪影響が及ぶことを防ぐことが可能となる。
 項目キーワード決定部56は、各学習用画像で抽出された、抽出対象項目に係る項目キーワード候補から、当該抽出対象項目に係る項目キーワード(当該抽出対象項目の項目値を抽出するための項目キーワード)を決定(選出)する。つまり、夫々が少なくとも一つの学習用画像において抽出された、抽出対象項目に係る項目キーワード候補(項目キーワード候補リスト)の中から、当該抽出対象項目に係る項目キーワードが決定される。
 項目キーワード決定部56は、項目キーワード候補の属性に基づき、項目キーワード候補から項目キーワードを決定する。項目キーワード候補の属性は、例えば、(1)項目キーワード候補である単語列の学習用画像における出現度合い、(2)学習用画像における、項目キーワード候補(領域)と正解定義値(領域)との間の距離、及び(3)学習用画像における、正解定義値(領域)と項目キーワード候補(領域)の一方から他方に向かう方向(例えば、項目キーワード候補から見た正解定義値の方向)の少なくとも一の属性である。例えば、これら三つの属性のうち何れか一つの属性に基づき項目キーワードが決定されてもよいし、三つの属性のうち二つ又は全ての属性に基づき、項目キーワードが決定されてもよい。これらの属性に基づき項目キーワードを決定することで、項目値と関係性がある(関係性が強い)可能性の高いキーワードを項目キーワードとして選出することが可能となる。以下、各属性に基づき項目キーワードを決定する方法について説明する。
 <属性(1)項目キーワード候補の出現度合い>
 多くの原稿(学習用画像)で共通して記載されるキーワードは汎用性が高く、項目値の抽出にも有用(有効)であると予測される。そのため、項目キーワード決定部56は、多くの原稿で共通して記載されている文字列、即ち、多くの学習用画像において出現している項目キーワード候補ほど、項目キーワードとして選出される可能性を高くする。
 <属性(2)項目キーワード候補と正解定義値との間の距離>
 多くの場合、項目名と項目値はセットで記載されるため、両者は近くに記載されると予測される。そのため、項目値の近くに記載されたキーワードは、当該項目値の項目を表す項目名や当該項目値に関連する項目名である可能性が高く、項目値の抽出にも有用であると予測される。そのため、項目キーワード決定部56は、学習用画像において、正解定義値との距離が小さい項目キーワード候補ほど、項目キーワードとして選出される可能性を高くする。
 <属性(3)正解定義値と項目キーワード候補の一方から他方に向かう方向>
 多くの場合、項目名は、項目値の左側又は上側に、項目値と揃えて記載されるため、項目値の水平左方向又は垂直上方向に項目値と揃えて記載されたキーワードは、当該項目値の項目を表す項目名や当該項目値に関連する項目名である可能性が高く、項目の抽出にも有用と予測される。そのため、項目キーワード決定部56は、学習用画像において、正解定義値の水平左方向又は垂直上方向にある項目キーワード候補ほど、項目キーワードとして選出される可能性を高くする。
 項目キーワード決定部56は、項目キーワード候補の属性に基づき、項目キーワード候補毎に、項目キーワード候補の、項目値を抽出するためのキーワードとしての有効性を示す有効性スコアを算出し、有効性スコアに基づき項目キーワードを決定してもよい。項目キーワード決定部56は、例えば、有効性スコアが高い順に所定数(例えば、100個)の項目キーワード候補を選出し、選出された項目キーワード候補を項目キーワードとして決定する。その他、有効性スコアに対して所定の閾値を設定することで、所定の閾値を超えた項目キーワード候補が項目キーワードとして決定されてもよい。
 有効性スコアは、項目キーワード候補の属性に基づき算出される。例えば、属性(1)の場合、多くの学習用画像で出現している項目キーワード候補ほど有効性スコアが高くなるよう、有効性スコアが算出される。属性(2)の場合、正解定義値との距離が小さい項目キーワード候補ほど有効性スコアが高くなるよう、有効性スコアが算出される。属性(3)の場合、正解定義値の水平左方向又は垂直上方向にある項目キーワード候補ほど有効性スコアが高くなるよう、有効性スコアが算出される。
 なお、有効性スコアは、上述した三つの属性のうち少なくとも1つの属性に基づき算出されればよく、その算出方法は任意である。以下では、上述した三つの属性に基づき有効性スコアを算出する例として、重み付け(距離に基づく重みと方向(角度)に基づく重み)を用いた方法を例示する。この方法では、項目キーワード候補の有効性スコア(有効性合計スコア)Sを、下記の数式1により算出する。
Figure JPOXMLDOC01-appb-M000001
 上記の数式1において、Siは学習用画像iの有効性単スコア、xiは学習用画像iにおける項目値キーワード候補の出現カウント数、w1iは学習用画像iにおける属性(2)の重み、w2iは習用画像iにおける属性(3)の重み、Nは学習用画像の数である。
 Siは、学習用画像iの有効性単スコアである。有効性単スコアは、各学習用画像において算出される項目キーワード候補の有効性スコアである。有効性スコア(有効性合計スコア)Sは、全ての学習用画像についての有効性単スコアを合計することで算出される。
 xiは、学習用画像における項目キーワード候補の出現カウント数(出現度合いを示す値)であり、例えば、学習用画像の文字認識結果において、当該項目キーワード候補が検出された数(箇所)が、xiに入力される。多くの場合、一枚の学習用画像において項目キーワード候補である単語列は一回のみ出現すると予測され、この場合xi=1となる。学習用画像の文字認識結果中に、対象の項目キーワード候補が含まれていない場合は、xi=0となる。なお、一枚の学習用画像で同一の項目キーワード候補が複数回検出された場合は、カウント数を検出回数とし、距離重み及び方向重みは、複数回検出されたうちの一回の検出に関する距離重み及び方向重みが用いられてよい。または、各検出について有効性単スコア(カウント数(=1)×距離重み×方向重み)を算出し、それらを合計することで、当該学習用画像についての有効性単スコアが算出されてもよい。
 なお、本実施形態では、項目キーワード候補の出現カウント数は、学習用画像において項目キーワード候補が検出された数(検出箇所の数)とするが、この例に限定されず、学習用画像において項目キーワード候補が検出されたか否かを示す数値であってもよい。つまり、一枚の学習用画像において項目キーワード候補が複数回検出された場合であっても、xi=1としてよい。このように、上述した出現カウント数を用いることで、有効性合計スコアは、項目キーワード候補が出現した学習用画像の数分の有効性単スコアを合計したスコアとなるため、多くの学習用画像において出現する項目キーワード候補ほど有効性スコアが高くなるよう有効性スコアを算出することが可能となる。
 w1iは、学習用画像iにおける属性(2)の重み(以下、「距離重み」と称する)であり、学習用画像において検出された項目値キーワード候補の文字列と正解定義値との距離が小さい場合、即ち、両者の位置が近い場合に、値(重み)が大きくなるよう算出される。例えば、検出された項目キーワード候補と正解定義値とが原稿(学習用画像)の端と端で離れた場合、即ち、両者の距離が、原稿の対角線の長さと等しい(最長距離である)場合に、距離重みを最小値(例えば、1)とする。一方、検出された項目キーワード候補と正解定義値とが隣接している場合、即ち、両者の距離が最短距離である場合に、距離重みを最大値(例えば、10)とする。そして、両者間の距離が最小距離と最大距離の間にある場合は、その両者間の距離に応じて距離重みが付与される。例えば、両者の距離が離れるに従い、距離重みが線形に減少するよう算出される。
 w2iは、学習用画像iにおける属性(3)の重み(以下、「方向重み」と称する)であり、学習用画像において検出された項目値キーワード候補の文字列が正解定義値の水平左方向又は垂直上方向にある場合に、値(重み)が大きくなるよう算出される。具体的には、項目キーワード候補が正解定義値の水平左方向にある度合い又は垂直上方向にある度合いにより、方向重みが算出される。例えば、学習用画像iにおける方向重みw2iを、下記の数式2により算出する。
Figure JPOXMLDOC01-appb-M000002
 上記の数式2において、w2hiは学習用画像iにおける属性(3)の第一の重み、w2viは学習用画像iにおける属性(3)の第二の重みである。
 学習用画像iにおける属性(3)の第一の重みw2hi(以下、「第一の方向重み」と称する)は、学習用画像iにおいて、項目キーワード候補が正解定義値の水平左方向にある度合いに基づく重みである。第一の方向重みは、学習用画像において検出された項目値キーワード候補の文字列が正解定義値の水平左方向にあるほど値が多くなるよう算出される。例えば、項目キーワード候補が正解定義値の水平左方向にある場合、即ち、項目キーワード候補から正解定義値に向かうベクトルが水平右方向(x軸)となす角度(以下、「二点間角度」と称する)が0度の場合に、第一の方向重みを最大値(例えば、10)とする。そして、ベクトルが傾くにつれ、第一の方向重みの値を小さくし、二点間角度が45度及び-45度で最小値(例えば、1)とし、二点間角度が0度±45度の範囲外にある場合も、最小値(例えば、1)とする。なお、二点間角度は、時計回りを正の向き(角度が増える向き)とする。
 学習用画像iにおける属性(3)の第二の重みw2vi(以下、「第二の方向重み」と称する)は、学習用画像iにおいて、項目キーワード候補が正解定義値の垂直上方向にある度合いに基づく重みである。第二の方向重みは、学習用画像において検出された項目値キーワード候補の文字列が正解定義値の垂直上方向にあるほど値が多くなるよう算出される。例えば、項目キーワード候補が正解定義値の垂直上方向にある場合、即ち、二点間角度が90度の場合に、第二の方向重みを最大値(例えば、10)とする。そして、ベクトルが傾くにつれ、第二の方向重みの値を小さくし、二点間角度が45度及び135度で最小値(例えば、1)とし、二点間角度が90度±45度の範囲外にある場合も、最小値(例えば、1)とする。
 なお、本実施形態では、正解定義値及び項目キーワード候補に係る二点間角度を算出することで、方向重みを算出することとしたが、これに限定されず、例えば、正解定義値を原点とした場合に、項目キーワード候補が第一象限~第四象限のうちどの象限にあるかを判定することで、方向重みが算出されてもよい。例えば、項目キーワード候補が第二象限又は第三象限にあると判定された場合に、第一の方向重みが高くなるよう算出されてよい。また、例えば、項目キーワード候補が第一象限又は第二象限にあると判定された場合に、第二の方向重みが高くなるよう算出されてよい。
 図6は、本実施形態に係る方向重みの算出例を示す図である。図6では、横軸を二点間角度とし、縦軸を方向重みとする。また、図6では、方向重み(第一の方向重み、第二の方向重み)の最小値を1、最大値を10とする。
 二点間角度が0~45度では、上述の通り、第一の方向重みが第二の方向重みより大きいため、w2i=w2hiとなる。その結果、図6に示す通り、この角度範囲では、方向重みは最大値10から最小値1に線形に減少する。また、二点間角度が45~90度では、上述の通り、第二の方向重みが第一の方向重みより大きいため、w2i=w2viとなる。その結果、図6に示す通り、この角度範囲では、方向重みは最小値1から最大値10に線形に増加する。また、二点間角度が90度~135度では、上述の通り、第二の方向重みが第一の方向重みより大きいため、w2i=w2viとなる。その結果、図6に示す通り、この角度範囲では、方向重みは最大値10から最小値1に線形に減少する。また、二点間角度が135度~315度では、上述の通り、第一の方向重み及び第二の方向重みは最小値1であるため、w2i=w2hi=w2vi=最小値1となる。また、二点間角度が315度~360度では、上述の通り、第一の方向重みが第二の方向重みより大きいため、w2i=w2hiとなる。その結果、図6に示す通り、この角度範囲では、方向重みは最小値1から最大値10に線形に増加する。
 なお、距離重み及び方向重みの最小値及び最大値は、任意の数値に調整(設定)可能である。また、方向重みが最大値から最小値となる二点間角度の範囲は、±45度の範囲に限定されるものではなく、任意の角度(範囲)に調整可能である。また、本実施形態では、正解定義値及び項目キーワード候補に係る二点間角度を、項目キーワード候補から正解定義値に向かうベクトルが水平右方向となす角度とするが、当該ベクトルの向きを示す角度であれば、水平右方向に対する角度に限定されない。また、二点間角度は、正解定義値から項目キーワード候補に向かうベクトルが水平右方向となす角度であってもよい。
 また、正解定義値と項目キーワード候補との間の距離及び二点間角度の算出には、学習用画像内の、正解定義値に係る領域及び項目キーワード候補に係る領域内の任意の点が用いられてよい。例えば、学習用画像内の正解定義値と項目キーワード候補夫々に対する外接矩形の左上の頂点が用いられてよい。具体的には、学習用画像内の項目キーワード候補の外接矩形の左上頂点から、当該学習用画像内の正解定義値の外接矩形の左上頂点に向かうベクトルにより、両者間の距離及び二点間角度が算出(抽出)されてよい。以下、学習用画像1及び学習用画像2における、距離重み及び方向重みの算出例を示す。
 図7は、本実施形態に係る学習用画像1における距離重み及び方向重みの算出例を示す図である。図7では、学習用画像1における、項目属性「請求金額」の各項目キーワード候補(「単価」、「金額」、「小計」、「合計」等)についての距離重み及び方向重みの数値例を示す。図7に示す通り、例えば、学習用画像1における、各項目キーワード候補「単価」、「金額」、「小計」、「合計」と、項目属性「請求金額」に対する正解定義値「4,059」との距離が夫々、「88mm」、「72mm」、「36mm」、「29mm」と算出される。また、図7に示す通り、例えば、学習用画像1における、各項目キーワード候補「単価」、「金額」、「小計」、「合計」から正解定義値「4,059」に向かうベクトルの角度(二点間角度)が夫々、「50度」、「90度」、「40度」、「0度」と算出される。
 そして、上述した距離重みと方向重みの算出方法に基づき、上記算出された距離と二点間角度が夫々、距離重みと方向重みに変換される。図7に示す通り、例えば、各項目キーワード候補「単価」、「金額」、「小計」、「合計」の距離重みが、「5」、「6」、「8」、「9」と算出される。また、各項目キーワード候補「単価」、「金額」、「小計」、「合計」の方向重みが、「1」、「10」、「1」、「10」と算出される。
 図8は、本実施形態に係る学習用画像2における距離重み及び方向重みの算出例を示す図である。図8では、学習用画像2における、項目属性「請求金額」の各項目キーワード候補(「内容」、「金額」、「小計」、「合計」等)についての距離重み及び方向重みの数値例を示す。図8に示す通り、例えば、学習用画像2における、各項目キーワード候補「内容」、「金額」、「小計」、「合計」と、項目属性「請求金額」に対する正解定義値「4,939」との距離が夫々、「89mm」、「78mm」、「39mm」、「30mm」と算出される。また、図8に示す通り、例えば、学習用画像2における、各項目キーワード候補「内容」、「金額」、「小計」、「合計」から正解定義値「4,939」に向かうベクトルの角度(二点間角度)が夫々、「61度」、「90度」、「45度」、「0度」と算出される。
 そして、上述した距離重みと方向重みの算出方法に基づき、上記算出された距離と二点間角度が夫々、距離重みと方向重みに変換される。図8に示す通り、例えば、各項目キーワード候補「内容」、「金額」、「小計」、「合計」の距離重みが、「5」、「7」、「8」、「9」と算出される。また、各項目キーワード候補「内容」、「金額」、「小計」、「合計」の方向重みが、「4」、「10」、「1」、「10」と算出される。
 図9は、本実施形態に係る有効性スコアの算出例を示す図である。図9では、図7及び図8において算出された学習用画像1及び学習用画像2における距離重み及び方向重みに基づき算出された、項目属性「請求金額」に係る各項目キーワード候補の有効性スコアの数値例を示す。図9に示す通り、各項目キーワード候補について、当該項目キーワード候補が検出された学習用画像毎に、距離重み及び方向重みが算出され、算出されたこれらの重みに基づき、有効性スコア(有効性単スコア、有効性合計スコア)が算出される。
 例えば、図7及び図8に示すように、項目キーワード候補「金額」は、学習用画像1及び2の夫々において検出されており、夫々において距離重み及び方向重みが算出されている。例えば、学習用画像1において検出された項目キーワード候補「金額」についての距離重みは「6」、方向重みは「10」であることから、有効性単スコアは、数式1に基づき、有効性単スコア=1×6×10=60と算出される。同様に、学習用画像2において検出された項目キーワード候補「金額」についての距離重みは「7」、方向重みは「10」であることから、有効性単スコアは、数式1に基づき、有効性単スコア=1×7×10=70と算出される。
 そして、図9に示す通り、項目キーワード候補「金額」についての、学習用画像1から学習用画像Nの夫々における有効性単スコアを合計することで、項目属性「請求金額」の項目キーワード候補「金額」についての有効性合計スコアが「53,320」と算出されている。同様に、例えば、項目属性「請求金額」に係る項目キーワード候補「合計」、「内容」についての有効性合計スコアが夫々、「90,870」、「2,245」と算出される。なお、項目キーワード決定部56は、有効性単スコア及び有効性合計スコアの算出結果として、図9に示すような表(学習用画像と、距離重み、方向重み、及び有効性スコア(単スコア、合計スコア)が格納されるテーブル)を生成するようにしてもよい。
 例示した有効性スコアの算出方法等により算出された有効性スコア(有効性合計スコア)に基づき、項目キーワード決定部56は、項目キーワード候補から複数の項目キーワードを決定する。また、本実施形態では、項目キーワード決定部56は、抽出対象項目毎に、決定された項目キーワードを含む項目キーワードリストを生成する。生成された項目キーワードリストは、記憶部59により記憶される。なお、項目キーワードを格納するためのデータ構造はリスト形式に限定されず、その他任意の形式であってもよい。
 準定型帳票についての従来の項目値抽出方法では、項目名と項目値の対応関係を基に項目値の抽出ルールが作成されているが、抽出したい項目値に対応する項目名(キーワード)は、熟練した技術者等が準定型帳票を観察することで決定されていた。しかし、上記説明したように、本実施形態によれば、項目値を抽出(識別)するための項目キーワードを項目キーワード決定部56により自動で決定することが可能である。そのため、ユーザにより手動で項目キーワードを決定する作業が不要となり、ユーザの作業負荷を軽減することが可能となる。
 特徴生成部57は、学習用画像内の、抽出対象項目に係る各項目値候補の特徴量を生成する。特徴生成部57は、学習用画像内での抽出対象項目に係る複数の項目キーワードと項目値候補との位置関係に基づき、当該項目値候補の特徴量を生成する。特徴生成部57は、各学習用画像の項目値候補の特徴量を生成する。後述する学習処理では、各項目値候補の特徴量を、項目値を抽出するための特徴量(学習済みモデルの入力)とする。
 特徴生成部57は、学習用画像内での抽出対象項目に係る複数の項目キーワードと当該項目値候補との位置関係を示す情報(以下、「位置関係情報」と称する)に基づき、項目値候補の特徴量を生成する。位置関係情報には、項目値候補と項目キーワードとの間の距離を示す情報、及び、項目値候補と項目キーワードの一方から他方に向かう方向を示す情報を用いる。本実施形態では、位置関係情報として、学習用画像内での項目値候補と項目キーワードとの間の距離(mm)及び学習用画像内での項目キーワードから項目値候補に向かうベクトルの角度(二点間角度)(deg)を用いる。
 図10は、本実施形態に係る学習用画像1における位置関係情報の抽出例を示す図である。図10に示す通り、学習用画像1における項目属性「請求金額」の項目値候補「3,690」の場合、項目属性「請求金額」に係る各項目キーワード(「合計」、「小計」、「金額」等)から項目値候補「3,690」に向かうベクトルの長さと向き(両者間の距離及び方向(二点間角度))が位置関係情報として抽出される。
 なお、項目値候補及び項目キーワードに係る二点間角度は、上述した、正解定義値及び項目キーワード候補に係る二点間角度と同様に、水平右方向に対する角度に限定されず、また、項目値候補から項目キーワードに向かうベクトルについての角度であってもよい。また、項目値候補と項目キーワードとの間の距離及び二点間角度の算出には、学習用画像内の、項目値候補に係る領域及び項目キーワードに係る領域内の任意の点を用いてよい。特徴生成部57は、抽出対象項目毎に、位置関係情報を格納する位置関係情報リストを生成する。
 図11は、本実施形態に係る学習処理時の位置関係情報リストの例を示す図である。図11は、項目属性「請求金額」についての位置関係情報リストを示す。図11に示す通り、位置関係情報リストには、各学習用画像において抽出された、項目属性「請求金額」の各項目値候補と、項目属性「請求金額」に係る複数の項目キーワードとの位置関係情報(距離及び二点間角度)が格納される。図11に示す通り、例えば、学習用画像1における、項目属性「請求金額」の項目値候補(「3,690」、「4,059」、「1,990」等(図3参照))と、項目属性「請求金額」に係る複数の項目キーワード(「合計」、「小計」、「金額」、「請求額」等)との位置関係を示す情報が格納される。
 なお、位置関係情報(距離及び二点間角度)の単位は、図11に示した単位(mm、deg)に限定されない。また、図11の位置関係情報リスト中の項目キーワード「請求額」は、学習用画像1に含まれないキーワードであるため、項目キーワード「請求額」との距離及び二点間角度を夫々、該当なしを示す値「999」、「-(ハイフン)」としたが、該当なしを示す値はこれらの値に限定されず、任意の数値や文字、記号等が用いられてよい。また、本実施形態では、位置関係情報を格納するためのデータ構造としてリスト形式(テーブル形式)を例示するが、データ構造は、その他任意の形式であってよい。
 そして、特徴生成部57は、抽出された位置関係情報(両者間の距離及び二点間角度)に基づき、項目値候補の特徴量(距離特徴量及び方向特徴量)を生成する。本実施形態では、項目値候補と項目キーワードとが関連(関係)する(項目キーワードが項目値候補に関連するキーワードとして有力である)可能性の高さに応じて、距離及び二点間角度を夫々、距離特徴量及び方向特徴量に変換する。これより、項目値候補と項目キーワードとの関連性の強さに応じた特徴量を学習することが可能となるため、より精度の高い項目値抽出が可能となる。
 <距離特徴量の生成>
 距離特徴量は、項目値候補と項目キーワードとの間の距離を示す情報に基づく特徴量である。上述の通り、多くの場合、項目名と項目値はセットで記載されるため、両者は近くに記載されると予測される。そのため、項目値候補と項目キーワードとの間の距離が小さい方が、項目値候補と項目キーワードとが関連する可能性が高いと予測される。よって、特徴生成部57は、両者間の距離に応じて値が増減するよう、距離特徴量を生成(算出)する。本実施形態では、両者間の距離が小さいほど、距離特徴量の値が増えるよう算出される。例えば、距離特徴量を、両者が近接した場合に最大値の100ポイントとし、両者が離れるほど値を減少させ、両者が原稿の端と端に位置する場合に最小値の0ポイントとする。
 <方向特徴量への変換>
 方向特徴量は、項目値候補と項目キーワードの一方から他方に向かう方向を示す情報に基づく特徴量である。上述の通り、多くの場合、項目名は、項目値の左側又は上側に、項目値と揃えて記載される。そのため、項目キーワードが項目値候補の水平左方向にある場合と垂直上方向にある方が、項目値候補と項目キーワードとが関連する可能性が高いと予測される。よって、特徴生成部57は、項目キーワードが項目値候補の水平左方向にある度合い及び垂直上方向にある度合いに応じて値が増減するよう、方向特徴量を生成(算出)する。本実施形態では、方向特徴量を、項目キーワードが項目値候補の水平左方向にある度合いに応じて増減する水平方向特徴量と、垂直上方向にある度合いに応じて増減する垂直方向特徴量の二つの特徴量に分割する。
  本実施形態では、項目キーワードが項目値候補の水平左方向にあるほど、水平方向特徴量の値が増えるよう算出される。同様に、項目キーワードが項目値候補の垂直上方向にあるほど、垂直方向特徴量の値が増えるよう算出される。例えば、水平方向特徴量を、二点間角度が0度の場合(項目値候補の水平左方向に項目キーワードがある場合)に最大値の100ポイントとし、両者間のベクトルが傾くにつれ値を減少させ、二点間角度が0度±90度の場合に最小値の0ポイントとする。なお、二点間角度が0度±90度の範囲外にある場合も、水平方向特徴量を最小値の0ポイントとする。同様に、垂直方向特徴量を、二点間角度が90度である場合(項目値候補の垂直上方向に項目キーワードがある場合)に最大値の100ポイントとし、両者間のベクトルが傾くにつれ値を減少させ、二点間角度が90度±90度の場合に最小値の0ポイントとする。なお、二点間角度が90度±90度の範囲外にある場合も、垂直方向特徴量を最小値の0ポイントとする。なお、特徴量の最大値及び最小値は、任意の数値に調整(設定)可能である。
 特徴生成部57は、位置関係情報に基づく項目値候補の特徴量(距離特徴量及び方向特徴量)を格納する特徴リストを生成する。
 図12は、本実施形態に係る学習処理時の特徴リストの例を示す図である。図12に示す通り、両者間の距離が小さいほど距離特徴量が大きくなるよう算出されている。また、項目キーワードが項目値候補の水平左方向にあるほど水平方向特徴量が大きくなるよう算出され、項目キーワードが項目値候補の垂直上方向にあるほど垂直方向特徴量が大きくなるよう算出されている。
 なお、本実施形態では、項目値候補と項目キーワードとが関連する可能性が高い場合に特徴量が大きく(ポイントが高く)なるよう算出する例を示したが、この例に限定されず、関連する可能性が高い場合に特徴量が小さくなるよう算出されてもよい。また、学習済みモデルの入力となる項目値候補の特徴量は、位置関係情報そのものであってもよい。
 モデル生成部58は、機械学習(教師あり学習)を行うことで、所定の文書種についての抽出対象項目毎に、抽出対象項目の項目値を抽出するための学習済みモデルを生成する。機械学習には、各学習用画像についての、項目値候補の特徴量と、当該項目値候補が抽出対象項目の項目値(正解定義値)であるか否かを示す情報(正解ラベル)とが、対応付けられた学習データ(特徴量と正解ラベルのデータセット(教師データ))が用いられる。
 項目値候補が正解定義値であるか否かを示す情報(正解ラベル)は、正解定義取得部55により取得された正解定義に基づく情報である。例えば、図12に示された、学習用画像1における項目属性「請求金額」に係る項目値候補「4,059」は、図5に示された正解定義中の、学習用画像1における項目属性「請求金額」の正解定義値と一致するため、当該項目値候補についての正解ラベルが「正解(例えば、ラベル1)」と決定される。また、例えば、図12に示された、学習用画像2における項目属性「請求金額」に係る項目値候補「3,690」は、図5に示された正解定義中の、学習用画像1における項目属性「請求金額」に係る正解定義値と一致しないため、当該項目値候補についての正解ラベルが「不正解(例えば、ラベル0)」と決定される。上述した学習データを用いて機械学習を行うことにより、項目値の特徴量(位置関係)を学習することが可能となる。
 これより、画像内の文字列の特徴量(当該文字列と抽出対象項目に係る複数の項目キーワードとの画像内での位置関係に基づく特徴量)を入力することで、当該文字列が抽出対象項目の項目値であるか否かを判定可能な識別器を生成することが可能である。より具体的には、文字列の特徴量を入力することで、当該文字列が抽出対象項目の項目値である妥当性を示す情報を出力可能な識別器(学習済みモデル)を生成可能である。なお、文字列が抽出対象項目の項目値である妥当性を示す情報は、文字列が抽出対象項目の項目値であるか否かを示す情報(ラベル等)及び/又は文字列が抽出対象項目の項目値である確からしさを示す情報(信頼度や確率等)である。生成された学習済みモデルは、記憶部59により記憶される。
 なお、学習済みモデルには、分類型(classification)の学習モデルを使用するが、学習済みモデルは、識別モデルや生成モデル等、任意のモデルであってよい。また、機械学習の方法は任意であり、ランダムフォレストや、ナイーブベイズ、決定木、ロジスティック回帰、ニューラルネットワーク等のうち任意の方法が用いられてよい。また、本実施形態では、各項目値候補について、項目値候補と複数の項目キーワードとの位置関係に基づく特徴量と、当該項目値候補が抽出対象項目の項目値であるか否かを示す情報とが対応付けられた学習データを使用したが、この例に限定されない。例えば、各学習用画像に含まれる、抽出対象項目の項目値(正解定義値)である文字列及び他の文字列の各文字列について、文字列と複数の項目キーワードとの位置関係に基づく特徴量と、当該文字列が抽出対象項目の項目値であるか否かを示す情報とが対応付けられた学習データが用いられてもよい。
 記憶部59は、各抽出対象項目について、項目キーワード決定部56により生成された項目キーワードリストと、モデル生成部58により生成された、項目属性の項目値を抽出するための学習済みモデルを記憶する。記憶部58は、項目キーワードリストと学習済みモデルを、抽出対象項目毎に対応付けて記憶してよい。
 図13は、本実施形態に係る情報処理装置の機能構成の概略を示す図である。情報処理装置1は、記憶装置14に記録されているプログラムが、RAM13に読み出され、CPU11によって実行されて、情報処理装置1に備えられた各ハードウェアが制御されることで、画像取得部41、認識結果取得部42、モデル記憶部43、項目キーワードリスト記憶部44、書式定義記憶部45、項目値候補抽出部46、特徴生成部47及び項目値抽出部48を備える装置として機能する。なお、本実施形態及び後述する他の実施形態では、情報処理装置1の備える各機能は、汎用プロセッサであるCPU11によって実行されるが、これらの機能の一部又は全部は、1又は複数の専用プロセッサによって実行されてもよい。また、情報処理装置1が備える各機能部は、単一の筐体からなる装置(1の装置)に実装されるものに限定されず、遠隔に及び/又は分散して(例えば、クラウド上に)実装されてもよい。
 画像取得部41は、項目値抽出処理において項目値を抽出する対象となる帳票画像(以下、「抽出対象画像」と称する)を取得する。本実施形態では、画像取得部41は、例えば、ユーザのスキャン指示により抽出対象の原稿(文書)が文書読取装置3Aにおいて読み取られると、その読み取り結果であるスキャン画像を抽出対象画像として取得する。
 認識結果取得部42は、抽出対象画像についての文字認識結果(全文OCR結果)を取得する。なお、認識結果取得部42における処理は、認識結果取得部52における処理の説明と同様であるため、詳細の説明を省略する。
 モデル記憶部43は、学習装置2において生成された、所定の文書種についての抽出対象項目の項目値を抽出するための学習済みモデルを記憶する。なお、モデル記憶部54は、抽出対象項目毎に、学習済みモデルを記憶する。学習済みモデルの詳細については、学習装置2の機能構成(モデル生成部58)の説明において記述したため、説明を省略する。
 項目キーワードリスト記憶部44は、学習装置2において生成された、所定の文書種についての抽出対象項目の項目値を抽出するための項目キーワードリストを記憶する。なお、項目キーワードリスト記憶部44は、抽出対象項目毎に、項目キーワードリストを記憶する。項目キーワードリストの詳細については、学習装置2の機能構成(項目キーワード決定部56)の説明において記述したため、説明を省略する。
 書式定義記憶部45は、項目値候補抽出処理に用いられる、抽出対処項目に係る書式定義を記憶する。書式定義の詳細については、学習装置2の機能構成(書式定義記憶部53)の説明において記述したため、説明を省略する。なお、書式定義記憶部45により記憶される書式定義は、抽出対象項目に関連する文字列書式を定義するものであれば、書式定義記憶部53が記憶する書式定義と同一の書式定義に限定されず、書式定義記憶部53が記憶する書式定義とは別の書式定義であってもよい。
 項目値候補抽出部46は、抽出対象画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列(項目値候補)を抽出する。項目値候補抽出部46は、認識結果取得部42により取得された文字認識結果から、書式定義記憶部45により記憶されている項目属性に係る書式定義に合致する文字列を、当該項目属性の項目値候補として抽出する。なお、項目値候補抽出部46による項目値候補抽出方法は、学習装置2の機能構成(項目値候補抽出部54)において説明した方法と同様であるため、詳細の説明を省略する。
 特徴生成部47は、抽出対象画像内の、抽出対象項目に係る各項目値候補の特徴量を生成する。特徴生成部47は、項目キーワードリスト記憶部44により記憶された、抽出対象項目に係る複数の項目キーワードと、項目値候補抽出部46により抽出された、当該抽出対象項目に係る目値候補との位置関係に基づき、項目値候補の特徴量を生成する。特徴生成部47による特徴量の生成方法は、学習装置2の機能構成(特徴生成部57)において説明した方法と同様であるため、詳細の説明を省略する。
 また、特徴生成部47は、抽出対象画像についての位置関係情報リスト及び特徴リストを生成するが、これらのリストは、特徴生成部57により生成される位置関係情報リスト及び特徴リスト(図10及び図11)と同様であるため、詳細の説明を省略する。但し、特徴生成部57により生成されるリスト(図10及び図11)では、各学習用画像における項目値候補を対象としていたが、特徴生成部47により生成される特徴リストでは、それとは異なり、抽出対象画像における項目値候補のみを対象とする。
 項目値抽出部48は、学習済みモデルを用いて、抽出対象画像における抽出対象項目に係る複数の項目値候補から、当該抽出対象項目の項目値として尤もらしい項目値候補を抽出(決定)する。項目値抽出部48は、抽出対象項目に係る各項目値候補の特徴量(距離特徴量及び方向特徴量)を、当該抽出対象項目に係る学習済みモデルに入力することで、各項目値候補が当該抽出対象項目の項目値として妥当か否かを判定する。項目値抽出部48は、判定結果(抽出した項目値候補)を出力する。上述の通り、文字列の特徴量が学習済みモデルに入力されると、当該文字列が抽出対象項目の項目値である妥当性を示す情報(ラベル及び/又は確率)が学習済みモデルから出力される。本実施形態では、項目値抽出部48は、各項目値候補の特徴量を学習済みモデルに入力することで、各項目値候補が抽出対象項目の項目値であるか否かを示す情報(ラベル(例えば、抽出対象項目の項目値の場合はラベル「1」、そうでない場合はラベル「0」))及び各項目値候補が抽出対象項目の項目値である確からしさを示す情報(信頼度や確率等)を取得する。
 なお、例えば、抽出対象項目の項目値である確率が、抽出対象項目の項目値でない確率を上回る場合や所定の閾値を超える場合等に、抽出対象項目の項目値であると判定可能である。そのため、項目値抽出部48は、学習済みモデルから、抽出対象項目の項目値である確率のみを取得し、取得した確率に基づき、抽出対象項目の項目値であるか否かを判定するようにしてもよい。
 また、項目値抽出部48は、学習済みモデルから出力される、項目値候補が抽出対象項目の項目値である確からしさを示す情報(信頼度や確率等)に基づき、項目値候補が抽出対象項目の項目値である確からしさを示す妥当性スコアを算出する。なお、妥当性スコアは、学習済みモデルから出力された確からしさを示す情報(確率等)自体であってもよいし、確からしさを示す情報(確率等)に基づき算出された数値(スコア)であってもよい。以下、妥当性スコアを用いた項目値抽出方法について説明する。
 項目値抽出部48は、抽出対象項目の項目値として妥当と判定された項目値候補が一つである場合、当該項目値候補を、当該抽出対象項目の項目値として決定する。一方、抽出対象項目の項目値として妥当と判定された項目値候補が複数ある場合、項目値抽出部48は、その複数の項目値候補のうち、妥当性スコアが最も高い項目値候補を、抽出対象項目の項目値として尤もらしい項目値候補であると判定し、当該項目値候補を、当該抽出対象項目の項目値として決定する。なお、全ての項目値候補についての妥当性スコアを比較することで、最も妥当性スコアが高い項目値候補を判定するようにしてもよい。
 図14は、本実施形態に係る抽出対象画像についての位置関係情報リスト及び妥当性スコアの例を示す図である。図14では、抽出対象画像において抽出された、項目属性「請求金額」に係る複数の項目値候補(「4,000」、「4,400」、「1,800」等)と、項目属性「請求金額」に係る複数の項目キーワード(「合計」、「小計」、「金額」、「請求額」等)との位置関係に係る位置関係情報リストを例示する。図14に示された位置関係情報に基づく特徴量が学習済みモデルに入力されることで、学習済みモデルから各項目値候補についての信頼度等(妥当性スコア)が出力される。図14に示す通り、各項目値候補「4,000」、「4,400」、「1,800」の特徴量が学習済みモデルに入力されることで、各項目値候補についての妥当性スコアが、「34」、「97」、「13」と算出され、妥当性スコアが最も高い「4,400」が項目属性「請求金額」の項目値として決定される。
 <処理の流れ>
 次に、本実施形態に係る学習装置2によって実行される学習処理の流れを説明する。なお、以下に説明する処理の具体的な内容及び処理順序は、本開示を実施するための一例である。具体的な処理内容及び処理順序は、本開示の実施の態様に応じて適宜選択されてよい。
 図15は、本実施形態に係る学習処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、学習装置2において、帳票(文書)のスキャン指示が受け付けられたこと等を契機として実行される。なお、本フローチャートは、ユーザによる、記憶装置24に記憶された帳票画像を取得する指示が受け付けられたこと等を契機として実行されてもよい。
 ステップS101では、複数の文書画像(学習用画像)が取得される。画像取得部51は、所定の文書種(例えば、請求書)の互いにレイアウトが異なる文書(原稿)についてのスキャン画像を取得する。その後、処理はステップS102へ進む。
 ステップS102では、正解定義が取得される。正解定義取得部55は、所定の文書種(例えば、請求書)についての抽出対象の項目属性(例えば、請求金額)と、各学習用画像における当該項目属性の正解定義値とが対応付けられた正解定義を取得する。その後、処理はステップS103へ進む。
 ステップS103では、文字認識結果(全文OCR結果)が取得される。認識結果取得部52は、ステップS101で取得された各学習用画像に対して文字認識を行うことで、各学習用画像についての文字認識結果を取得する。なお、ステップS102とステップS103は順不同である。また、ステップS101とステップS102は順不同である。その後、処理はステップS104へ進む。
 ステップS104では、項目キーワード決定処理が行われる。項目キーワード決定処理では、抽出対象の項目属性のうち一の項目属性(例えば、「請求金額」)に係る項目値を抽出するための複数の項目キーワードが決定される。項目キーワード決定処理の詳細については、図16を用いて後述する。その後、処理はステップS105へ進む。
 ステップS105では、学習済みモデル生成処理が行われる。学習済みモデル生成処理では、抽出対象の項目属性のうち一の項目属性(例えば、「請求金額」)の項目値を抽出するための学習済みモデルが生成される。学習済みモデル生成処理の詳細については、図17を用いて後述する。その後、処理はステップS106へ進む。
 ステップS106では、全ての抽出対象項目について、項目キーワード決定処理(ステップS104)及び学習済みモデル生成処理(ステップS105)が実行されたか否かが判定される。CPU21は、各抽出対象項目について、項目キーワードリスト及び学習済みモデルが生成されたか否かを判定する。なお、正解定義を参照することで、全ての抽出対象項目を確認(認識)可能である。全ての抽出対象項目について処理済みでない場合(ステップS106のNO)、処理はステップS104に戻り、処理済みでない抽出対象項目(例えば、項目属性「支払期限」)について、項目キーワード決定処理及び学習済みモデル生成処理が実行される。一方、全ての抽出対象項目について処理済みである場合(ステップS106のYES)、本フローチャートに示された処理は終了する。
 図16は、本実施形態に係る項目キーワード決定処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、図15においてステップS103の処理が終了したことを契機として実行される。なお、本フローチャートでは、抽出対象の項目属性が「請求金額」である場合の処理について例示する。なお、項目キーワード決定処理は、学習用画像の分析を行う分析処理に該当する。
 ステップS1041では、全ての学習用画像のうち一の学習用画像において、抽出対象項目の正解定義値の位置が特定される。項目キーワード決定部56は、例えば、正解定義(図5参照)中の、学習用画像1の項目属性「請求金額」の正解定義値「4,059」が、学習用画像1内のどの位置に記載されているかを特定する。その後、処理は、ステップS1042へ進む。
 ステップS1042では、全ての学習用画像のうち一の学習用画像において、抽出対象項目の正解定義値の周囲にある単語列が、当該抽出対象項目に係る項目キーワード候補として抽出される。項目キーワード決定部56は、学習用画像の文字認識結果から項目キーワード候補を抽出する。例えば、ステップS1041で位置が特定された学習用画像1内の正解定義値「4,059」の周囲にある文字列画像に対する認識文字列が、項目属性「請求金額」の項目キーワード候補として抽出される(図7参照)。その後、処理はステップS1043へ進む。
 ステップS1043では、全ての学習用画像について、項目属性「請求金額」に係る項目キーワード候補が抽出されたか否か(ステップS1041及びステップS1042の処理を実行済みか)が判定される。CPU21は、全ての学習用画像の夫々において、項目属性「請求金額」に係る項目キーワード候補が抽出されたか否かを判定する。全ての学習用画像において処理済みでない場合(ステップS1043のNO)、処理はステップS1041に戻り、処理済みでない学習用画像(例えば、学習用画像2)についての処理が実行される。一方、全ての学習用画像において処理済みである場合(ステップS1043のYES)、処理はステップS1044へ進む。
 ステップS1044では、項目属性「請求金額」についての項目キーワードが決定される(項目キーワードリストの生成)。項目キーワード決定部56は、ステップS1042において抽出された各学習用画像における項目属性「請求金額」に係る項目キーワード候補の中から、項目属性「請求金額」に係る項目キーワードを複数選択し、項目キーワードリストを生成する。そして、記憶部59は、生成された項目キーワードリストを記憶する。その後、本フローチャートに示された処理は終了する。
 図17は本実施形態に係る学習済みモデル生成処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、図15においてステップS104の処理(図16の処理)が終了したことを契機として実行される。なお、本フローチャートでも、項目属性が「請求金額」である場合の処理について例示する。
 ステップS1051では、全ての学習用画像のうち一の学習用画像についての文字認識結果から、抽出対象項目に係る項目値候補が抽出される。項目値候補抽出部54は、書式定義記憶部53が記憶する抽出対象項目に係る書式定義を用いて、当該抽出対象項目に係る項目値候補を抽出する。項目値候補抽出部54は、例えば、学習用画像1の文字認識結果から、項目属性「請求金額」に係る書式定義に合致する単語列を、学習用画像1における項目属性「請求金額」に係る項目値候補として抽出する。その後、処理は、ステップS1052へ進む。
 ステップS1052では、全ての学習用画像のうち一の学習用画像において、抽出対象項目に係る項目キーワードの位置(箇所)が特定される。特徴生成部57は、例えば、学習用画像1の文字認識結果から、項目属性「請求金額」に係る項目キーワードリスト中の項目キーワードと一致する単語列を探索し、一致した単語列(項目キーワード)が学習用画像1のどの位置に記載されているかを特定する。その後、処理は、ステップS1053へ進む。
 ステップS1053では、全ての学習用画像のうち一の学習用画像について、学習用画像内での項目値候補と複数の項目キーワードとの位置関係に基づく、項目値候補の特徴量が生成される。特徴生成部57は、ステップS1052で特定された項目キーワードの位置を用いて、ステップS1051で抽出された各項目値候補の特徴量を生成する。例えば、特徴生成部57は、学習用画像1における項目属性「請求金額」の各項目値候補の特徴量を、項目値候補と項目属性「請求金額」に係る複数の項目キーワードとの位置関係に基づき生成する。その後、処理は、ステップS1054へ進む。
 ステップS1054では、全ての学習用画像について、項目値候補の特徴量が生成されたか否か(ステップS1051からステップS1053の処理を実行済みか)が判定される。CPU21は、全ての学習用画像の夫々において、項目属性「請求金額」に係る各項目値候補の特徴量が生成されたか否かを判定する。全ての学習用画像において処理済みでない場合(ステップS1054のNO)、処理はステップS1051に戻り、処理済みでない学習用画像(例えば、学習用画像2)についての処理が実行される。一方、全ての学習用画像において処理済みである場合(ステップS1054のYES)、処理はステップS1055へ進む。
 ステップS1055では、特徴量及び正解定義(項目値候補が正解定義値であるか否かを示す情報)を用いて、抽出対象項目についての学習済みモデルが生成される。モデル生成部58は、ステップS1053において生成された項目属性「請求金額」に係る項目値候補の特徴量と、当該項目値候補が正解定義値であるか否かを示す情報とが対応付けられた学習データを用いて、項目属性「請求金額」に係る学習済みモデルを生成する。そして、記憶部59は、生成された学習済みモデルを記憶する。その後、本フローチャートに示された処理は終了する。
 上述の通り、準定型帳票等の所定の文書種の文書に係る画像と、当該画像に対応した正解定義を用いるだけで、学習済みモデル及び項目キーワードリストを自動で生成することが可能となる。
 図18は、本実施形態に係る抽出処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、情報処理装置1において、帳票(文書)のスキャン指示が受け付けられたこと等を契機として実行される。なお、本フローチャートは、ユーザによる、記憶装置14に記憶された帳票画像を取得する指示が受け付けられたこと等を契機として実行されてもよい。なお、本フローチャートでも、項目属性が「請求金額」である場合の処理について例示する。
 ステップS201では、文書画像(抽出対象画像)が取得される。画像取得部41は、所定の文書種(例えば、請求書)の文書(原稿)についてのスキャン画像を取得する。その後、処理はステップS202へ進む。
 ステップS202では、文字認識結果(全文OCR結果)が取得される。認識結果取得部42は、ステップS201で取得された抽出対象画像に対して文字認識を行うことで、抽出対象画像についての文字認識結果(全文OCR結果)を取得する。その後、処理はステップS203へ進む。
 ステップS203では、抽出対象画像の文字認識結果から、抽出対象項目に係る項目値候補が抽出される。項目値候補抽出部46は、書式定義記憶部45が記憶する項目属性「請求金額」に係る書式定義に合致する単語列を、項目属性「請求金額」に係る項目値候補として抽出する。その後、処理は、ステップS204へ進む。
 ステップS204では、抽出対象画像における、抽出対象項目に係る項目キーワードの位置(箇所)が特定される。特徴生成部47は、抽出対象画像の文字認識結果から、項目属性「請求金額」に係る項目キーワードリスト中の項目キーワードと一致する単語列を探索し、一致した単語列(項目キーワード)が抽出対象画像のどの位置に記載されているかを特定する。その後、処理は、ステップS205へ進む。
 ステップS205では、抽出対象画像内での項目値候補と複数の項目キーワードとの位置関係に基づく、項目値候補の特徴量が生成される。特徴生成部47は、ステップS204で特定された項目キーワードの位置を用いて、ステップS203で抽出された項目属性「請求金額」に係る各項目値候補の特徴量を生成する。その後、処理は、ステップS206へ進む。
 ステップS206では、抽出対象項目に係る各項目値候補の特徴量と学習済みモデルを用いて、各項目値候補の妥当性が判定される。項目値抽出部48は、モデル記憶部43に記憶された項目属性「請求金額」の学習済みモデルに、ステップS205で生成された、項目属性「請求金額」に係る各項目値候補の特徴量を入力することで、各項目値候補が、項目属性「請求金額」の項目値として妥当か否かを判定する。また、項目値抽出部48は、当該学習済みモデルを用いて、各項目値候補について、項目値候補が当該項目値である確からしさを示す妥当性スコアを算出する。その後、処理は、ステップS207へ進む。
 ステップS207では、妥当性スコアに基づき、抽出対象項目の項目値として尤もらしい項目値候補が選出(抽出)される。項目値抽出部48は、ステップS206において項目値として妥当と判定された項目値候補が一つである場合、当該項目値候補を、抽出対象の項目値として尤もらしい項目値候補(抽出対象項目の項目値)と決定する。一方、抽出対象の項目値として妥当と判定された項目値候補が複数ある場合、その複数の項目値候補のうち、ステップS206で算出された妥当性スコアが最も高い項目値候補を、抽出対象の項目値として尤もらしい項目値候補(抽出対象項目の項目値)と決定する。
 そして、項目値抽出部48は、決定(抽出)した項目値を出力する。これより、例えば、項目値抽出部48により出力された項目値がシステムに入力されることで、帳票の入力業務を自動化(半自動化)することが可能となる。その後、処理はステップS208へ進む。
 ステップS208では、全ての抽出対象項目について項目値が抽出されたか否かが判定される。CPU11は、各抽出対象項目についての項目値(尤もらしい項目値候補)が抽出されたか否かを判定する。なお、正解定義を参照することで、全ての抽出対象項目を確認(認識)可能である。全ての抽出対象項目の項目値が抽出されていない場合(ステップS208のNO)、処理はステップS203に戻り、処理済みでない抽出対象項目(例えば、項目属性「支払期限」)についての処理が実行される。一方、全ての抽出対象項目について項目値を抽出済みである場合(ステップS208のYES)、本フローチャートに示された処理は終了する。
 なお、本実施形態では、所定の文書種として請求書が例示され、請求書における項目値の抽出を行うための学習処理、及び、請求書における項目値の抽出処理について例示したが、学習処理は、複数の所定の文書種夫々に対して実行されてよい。その場合、学習装置2は、複数の所定の文書種(例えば、請求書及び納品書等)の夫々について、抽出対象項目毎に学習済みモデル及び項目キーワードリストを生成する。更に、この場合、情報処理装置1は、学習装置2から、各文書種についての学習済みモデル及び項目キーワードリストを取得することで、様々な文書種の文書(原稿)における項目値を抽出可能となる。なお、取得した抽出対象画像にどの文書種についての学習済みモデル等を用いるかは、抽出対象画像(原稿)を視認したユーザにより決定されてもよいし、情報処理装置1が、抽出対象画像に示された文書(原稿)の文書種を自動で識別する機能を有することで、決定されてもよい。
 上述の通り、準定型帳票等の抽出対象の文書に係る画像と、学習済みモデル及び項目キーワードリストを用いて抽出処理を行うことで、目的の項目値を出力することが可能となる。
 上記説明したように、本実施形態によれば、学習装置2は、画像内の文字列(項目値候補)と複数の項目キーワードとの位置関係に基づく特徴量から、当該文字列(項目値候補)が対象項目の項目値であるか否かを判定可能な学習済みモデルを生成することができるため、項目の記載位置(レイアウト)が定まっていない(レイアウトが多様な)文書の画像であっても項目値を抽出可能なモデル(抽出器)を生成することが可能となる。また、本実施形態によれば、情報処理装置1は、画像内の文字列(項目値候補)と複数の項目キーワードとの位置関係に基づく特徴量から、当該文字列(項目値候補)が対象項目の項目値であるか否かを判定可能な学習済みモデルを用いて、抽出対象画像における項目値候補夫々についての妥当性を判定することが出来るため、レイアウトが定まっていない文書の画像(抽出対象画像)であっても項目値を抽出することが可能となる。
 また、本実施形態によれば、レイアウトが定まっていない文書の画像にも対応可能な項目値抽出器(学習済みモデル)を容易に生成することが可能となる。従来、レイアウトが多様な帳票についても、ユーザが所望する項目のデータ(項目値)を自動で抽出したいという要望があるものの、帳票に記載される内容(項目)は、帳票の発行元の会社によらず概ね共通している一方、その記載位置(帳票レイアウト)は、発行元の会社により異なる場合が多かった。この場合、OCRによる項目の読み取り位置を事前に定義(レイアウト定義)する方法では、帳票レイアウト毎にレイアウト定義を行う必要があるため、レイアウトが多様な帳票に対応するためには、取引相手の会社数分の大量のレイアウトの書式定義を作成する必要があり、容易ではなかった。
 また、活用したい発行元会社名や支払い請求日、請求金額等の項目値に対応する項目名のキーワードや、両者の相対的な位置関係を抽出ルールとして手動で定義し抽出する準定型帳票OCRという方法がある。この方法では、帳票に精通した作業者(熟練者)が対象の準定型帳票を観察することで、手動で抽出ルールを作成していた。この方法は、上述した方法に比べて汎用的ではあるが、項目名のキーワードや相対的な位置関係等の抽出ルールを見つけるためには、知識や経験が必要となるため、レイアウトが多様な帳票に対応することは容易ではなかった。
 しかし、上述した本実施形態によれば、対象の帳票サンプル(レイアウトが互いに異なる同一種の帳票に係る複数の学習用画像)と抽出したい項目値の正解定義(項目値候補が抽出対象項目の項目値であるか否かを示す情報)を準備するだけで、項目値を抽出するための抽出ルールに代わる(相当する)学習済みモデル及び項目キーワードを自動で(半自動で)作成可能である。そのため、一般作業者であっても、準定型帳票からの項目値を抽出する抽出器(学習済みモデル)を容易に生成可能となる。つまり、本実施形態によれば、レイアウトが定まっていない文書にも対応可能な抽出器(学習済みモデル)を生成することが可能となり、本抽出器を用いることで、レイアウトが定まっていない文書の項目値を抽出することが可能となる。
 また、運用時には、レイアウトが定まっていない文書(準定型帳票)にも対応可能な学習済みモデル及び項目キーワードと、抽出対象画像を準備するだけで、抽出対象画像から項目値を抽出可能であるため、簡単に(手間少なく)準定型帳票からの項目値の抽出が可能である。また、従来は、熟練者であっても、多様な請求書やINVOICE等に対応しようとすると、抽出ルールの矛盾が発生してしまう場合もあった。しかし、本実施形態によれば、様々なレイアウトのサンプル画像を用いて機械学習を行うことで学習済みモデルを生成するため、より高精度に準定型帳票から項目値を抽出することが可能となる。
 <他の実施形態>
 上述した実施形態では、ユーザにより手動で正解定義値が入力されることで正解定義が生成される例を示したが、正解定義の生成方法は上述した方法に限定されず、正解定義を生成する支援ツールを用いて生成する方法であってもよい。また、上述した実施形態では、テーブル形式の正解定義を例示したが、正解定義の書式はCSV(comma-separated values)形式(CSVファイル)等のようなテーブル形式に限定されず、その他の形式であってもよい。本実施形態では、正解定義作成支援ツール(正解定義生成画面)を用いて、CSV形式の正解定義を生成する方法を例示する。
 なお、以下で説明する本実施形態の機能構成において、上述した実施形態で説明した内容と重複する項目については、同一の符号を付して説明を省略する。また、本実施形態に係る情報処理システム9の構成は、上述した実施形態に係る情報処理システム9の構成(図1)と同様であるため、説明を省略する。但し、本実施形態に係る学習装置2は、CPU21、ROM22、RAM23、記憶装置24及び通信ユニット25に加え、マウス、キーボードやタッチパネル等の入力デバイス26及びディスプレイ等の出力デバイス27を更に備える。
 図19は、本実施形態に係る学習装置の機能構成の概略を示す図である。学習装置2は、記憶装置24に記録されているプログラムが、RAM23に読み出され、CPU21によって実行されて、学習装置2に備えられた各ハードウェアが制御されることで、画像取得部51、認識結果取得部52、書式定義記憶部53、項目値候補抽出部54、正解定義取得部55、項目キーワード決定部56、特徴生成部57、モデル生成部58及び記憶部59に加え、表示部60、指定受付部61及び正解定義生成部62を備える装置として機能する。以下、上述した実施形態と異なる表示部60、指定受付部61受付部61及び正解定義生成部62について、説明する。
 表示部60は、学習装置2における出力デバイス27を介して、種々の表示処理を実行する。表示部60は、例えば、ユーザ(正解定義の生成作業者)が正解定義を生成するために、抽出対象項目の項目値(正解定義値)を選択するための正解定義生成画面を生成し表示する。表示部60は、正解定義生成画面において、各学習用画像を表示し、表示した学習用画像中の項目値候補を赤枠や点線枠等で囲む等して、抽出された項目値候補が項目値の候補であることをユーザが視認可能な方法で表示する。また、表示部60は、ユーザにより正解定義値として選択された箇所のOCR結果文字列(項目値候補)を、正解定義値として選出された文字列を表示する正解定義値表に表示する。このように、表示部60は、学習用画像や、抽出された項目値候補、選択された正解定義値等を表示するためのユーザインターフェース(UI、User Interface)(正解選択UI)である。
 図20は、本実施形態に係る正解定義生成画面(「請求金額」選択時)の一例を示す図である。図20に示す通り、正解定義生成画面には、正解定義を行う対象の学習用画像(正解定義用画像)(図20の画面左)及び正解定義値表(図20の画面右)が表示される。なお、正解定義画面は、図20に例示した画面の構成に限定されるものではなく、正解定義用画像及び項目値候補が表示され、表示された項目値候補から正解定義値を選択可能な構成であれば、任意の画面構成であってよい。
 図20では、学習用画像1において、項目属性「請求金額」の正解定義値が決定される例を示す。図20に示す通り、正解定義生成画面上では、項目属性「請求金額」に係る項目値候補が点線枠により表示されている。なお、表示部60は、後述するように、ユーザにより項目値候補「4,059」が選択されることで、正解定義値表の項目属性「請求金額」の欄に、選択された箇所のOCR結果文字列である「4,059」を表示する。
 この際、図20に示すように、正解定義値を決定する対象の項目属性(請求金額)をユーザが認識しやすくするため、正解定義値表の該当する項目属性に矢印等を表示してよい。また、表示部60は、項目属性「請求金額」に係る正解定義値が選択(決定)されたことにより、次の項目属性(例えば、「支払期限」)の正解定義値を抽出する画面を表示する。
 図21は、本実施形態に係る正解定義生成画面(「支払期限」選択時)の一例を示す図である。図21の例では、学習用画像1において、項目属性「支払期限」の正解定義値が決定される例を示す。図21に示す通り、正解定義生成画面上では、項目属性「支払期限」に係る項目値候補が点線枠により表示されている。また、図21に示す通り、図20の状態から、対象となる項目属性が変更されたことから、正解定義値表において、該当する項目属性である「支払期限」にフォーカス(矢印)が移動している。これより、ユーザに対して、次項目属性の正解定義値の選択を促すことができる。
 指定受付部61は、マウス等の入力デバイス26を介して、ユーザから種々の入力(指定)を受け付ける。指定受付部61は、例えば、正解定義生成画面に表示された項目値候補の中から、正解定義値として一の項目値候補についてのユーザによる指定を受け付ける。例えば、指定受付部61は、ユーザが、抽出対象項目の項目値である項目値候補をマウス等により選択することで、正解定義値の選択に係る指定を受け付ける。図20の例では、項目値候補を視認したユーザにより、正解定義値として項目値候補「4,059」がマウスにより選択され(矢印(ポインタ)箇所)、正解定義値表において、選択された箇所のOCR結果文字列「4,059」が正解定義値として表示されている。また、図21の例では、正解定義値として項目値候補「2021/7/25」が選択され、正解定義値表において、選択された箇所のOCR結果文字列「2021/7/25」が正解定義値として表示されている。
 正解定義生成部62は、ユーザにより指定された、抽出対象項目(項目属性)に係る項目値候補(指定された箇所のOCR結果文字列)を、学習用画像における当該抽出対象項目の項目値(正解定義値)として、正解定義を生成する。正解定義生成部62は、指定受付部61により指定が受け付けられた、各抽出対象項目についての項目値候補を、正解定義値として格納した正解定義を生成する。なお、正解定義は、CSV形式に限定されず、他の形式であってもよい。また、正解定義生成部62は、生成された正解定義を出力し、正解定義取得部55は、正解定義生成部62により生成及び出力された正解定義を取得する。
 図20及び図21の例では、全ての項目属性についての正解定義値がユーザにより選択された後、ユーザにより「正解定義確定」ボタンが押下されることで、選択された各項目属性に係る項目値(正解定義値)を格納する正解定義を生成する。なお、項目値(正解定義値)を定義する対象(抽出対象)の項目属性は、予めユーザにより決定され、定義対象項目属性データとして記憶装置24等に記憶されてよい。上述した正解定義値を決定(選択)する処理は、定義対象項目属性データに含まれる定義対象の項目属性毎に実行される。なお、本実施形態では、正解定義生成処理が学習装置2において実行されることとしたが、これに限定されず、他の学習装置2以外の他の装置において実行されてもよい。その場合、学習装置2は、正解定義生成処理が実行された他の装置から正解定義を取得することで、学習処理を行う。
 図22は、本実施形態に係る正解定義生成処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、学習処理装置2において表示された正解定義生成画面において、帳票(文書)のスキャン指示が受け付けられたこと等を契機として実行される。なお、本フローチャートは、ユーザによる、記憶装置24に記憶された帳票画像を取得する指示が受け付けられたこと等を契機として実行されてもよい。また、本フローチャートに示された処理は、図15に示された学習処理の事前処理として、学習処理に先んじて実行される。なお、本フローチャートでも、項目属性が「請求金額」である場合の処理について例示する。
 ステップS301では、複数の文書画像(学習用画像である正解定義用画像)が取得される。画像取得部51は、所定の文書種(例えば、請求書)の互いにレイアウトが異なる文書(原稿)についてのスキャン画像を取得する。その後、処理はステップS302へ進む。
 ステップS302では、文字認識結果(全文OCR結果)が取得される。認識結果取得部52は、ステップS301で取得された各正解定義用画像に対して文字認識を行うことで、各正解定義用画像についての文字認識結果(全文OCR結果)を取得する。その後、処理はステップS303へ進む。
 ステップS303では、正解定義用画像の文字認識結果から、抽出対象の項目属性に係る項目値候補が抽出される。項目値候補抽出部54は、書式定義記憶部53が記憶する抽出対象項目に係る書式定義を用いて、当該抽出対象項目に係る項目値候補を抽出する。項目値候補抽出部54は、例えば、学習用画像1の文字認識結果から、項目属性「請求金額」に係る書式定義に合致する単語列を、学習用画像1における項目属性「請求金額」に係る項目値候補として抽出する。その後、処理は、ステップS304へ進む。
 ステップS304では、正解定義生成画面において、項目値候補が表示される。表示部60は、ステップS303で抽出された項目値候補がどの単語列であるかをユーザが認識可能なよう、正解定義生成画面において項目値候補を表示する(図20参照)。その後、処理はステップS305へ進む。
 ステップS305では、ユーザからの正解定義値の指定が受け付けられる。指定受付部61は、正解定義値についてのユーザによる指定を受け付ける。図20の例では、学習用画像1における項目属性「請求金額」の項目値である項目値候補「4,059」が、正解定義値としてユーザにより指定されることで、正解定義値の指定が受け付けられる。また、ユーザにより正解定義値が選択されると、表示部60は、正解定義生成画面の正解定義値表において、選択された箇所のOCR結果文字列「4,059」を正解定義値として表示する。その後、処理は、ステップS306へ進む。
 ステップS306では、全ての抽出対象項目(項目属性)について、正解定義値の指定が受け付けられたか(ステップS303~ステップS305の処理が実行されたか)否かが判定される。CPU21は、各抽出対象項目について、正解定義値の指定を受け付けたか否かを判定する。全ての抽出対象項目について処理済みでない場合(ステップS306のNO)、処理はステップS303に戻り、処理済みでない抽出対象項目(例えば、項目属性「支払期限」)について処理が実行される。一方、全ての抽出対象項目について処理済みである場合(ステップS306のYES)、処理はステップS307へ進む。
 ステップS307では、学習用画像における各抽出対象項目(項目属性)の正解定義値が確定される。指定受付部61により、ステップS305で指定された全ての項目属性の項目値候補を、正解定義値として確定するユーザの指示が受け付けられると、正解定義生成部62は、学習用画像(例えば、学習用画像1)における各項目属性の正解定義値を確定する。その後、処理はステップS308へ進む。
 ステップS308では、全ての学習用画像について、正解定義値が確定されたか否かが判定される。CPU21は、全ての学習用画像の夫々において、各抽出対象項目(項目属性)の正解定義値が確定されたか否かを判定する。全ての学習用画像において確定済みでない場合(ステップS308のNO)、処理はステップS303に戻り、処理済みでない学習用画像(例えば、学習用画像2)についての正解定義生成画面が表示され、以降の処理が実行される。一方、全ての学習用画像において確定済みである場合(ステップS308のYES)、処理はステップS309へ進む。
 ステップS309では、正解定義が生成される。正解定義生成部62は、ステップS307で確定された、全ての学習用画像についての各項目属性の正解定義値を格納した正解定義を生成し、出力する。その後、本フローチャートに示された処理は終了する。なお、正解定義取得部55は、正解定義生成部62から正解定義を取得する(図15のステップS102)。
 なお、本実施形態では、正解定義生成処理の際、学習装置2において学習用画像及び学習用画像の文字認識結果が取得されるため、図15の学習装置2における学習処理のステップS101及びステップS103の処理は省略されてよい。また、正解定義生成処理の際、学習装置2において項目値候補が抽出されるため、図17の学習装置2における学習済みモデル生成処理のステップS1051の処理は省略されてよい。また、本実施形態では、ステップS301において複数の正解定義用画像をまとめて取得することとしたが、これに限定されるものではなく、ステップ301~ステップS307の処理を正解定義用画像毎に実行するようにしてよい。
 上述した通り、本実施形態では、自動で抽出された項目値候補が表示されることで、作業者は、表示された項目値候補から正解の項目値を選択するのみで正解定義を生成することが可能となるため、作業者が正解定義値を手入力する方法と比べて、正解定義を生成する作業を効率化することが可能となる。ひいては、項目値を抽出するための作業(学習済みモデル及び項目キーワードリストの生成作業)を効率化することが可能となる。
   1 情報処理装置
   2 学習装置
   3 文書読取装置
   9 情報処理システム

Claims (21)

  1.  対象画像を文字認識した結果である文字認識結果を取得する認識結果取得手段と、
     前記対象画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列を複数抽出する項目値候補抽出手段と、
     各候補文字列について、前記抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと候補文字列との前記対象画像内での位置関係に基づく特徴量を生成する特徴生成手段と、
     文字列と前記複数の項目キーワードとの画像内での位置関係に基づく特徴量が入力されることで、該文字列が前記抽出対象項目の項目値である妥当性を示す情報が出力されるよう、機械学習により生成された学習済みモデルを記憶するモデル記憶手段と、
     前記対象画像における各候補文字列の前記特徴量を前記学習済みモデルに入力することで、前記複数の候補文字列から前記抽出対象項目の項目値を抽出する項目値抽出手段と、
     を備える情報処理システム。
  2.  前記学習済みモデルは、レイアウトが互いに異なる文書についての複数の学習用画像の各々について、前記抽出対象項目の項目値となり得る文字列である候補文字列と前記複数の項目キーワードとの学習用画像内での位置関係に基づく特徴量と、該候補文字列が前記抽出対象項目の項目値であるか否かを示す情報とが対応付けられた学習データを用いた機械学習により生成されたモデルである、
     請求項1に記載の情報処理システム。
  3.  前記特徴量は、前記複数の項目キーワード夫々についての、対象の文字列と項目キーワードとの間の距離を示す情報に基づく特徴量、及び、該対象の文字列と該項目キーワードの一方から他方に向かう方向を示す情報に基づく特徴量である、
     請求項1又は2に記載の情報処理システム。
  4.  前記距離を示す情報に基づく特徴量は、前記対象の文字列と前記項目キーワードとの間の距離に応じて増減する特徴量である、
     請求項3に記載の情報処理システム。
  5.  前記方向を示す情報に基づく特徴量は、前記項目キーワードが前記対象の文字列の水平左方向にある度合い及び垂直上方向にある度合いに応じて増減する特徴量である、
     請求項3又は4に記載の情報処理システム。
  6.  前記項目値抽出手段は、前記対象画像における各候補文字列の前記特徴量を前記学習済みモデルに入力することで該学習済みモデルから出力される、各候補文字列が前記抽出対象項目の項目値である確からしさを示す情報に基づき、前記抽出対象項目の項目値を抽出する、
     請求項1~5の何れか一項に記載の情報処理システム。
  7.  前記項目キーワードは、前記機械学習において使用された複数の学習用画像のうち少なくとも一の学習用画像に含まれる単語列の中から、該単語列の属性に基づき決定された単語列である、
     請求項1~6の何れか一項に記載の情報処理システム。
  8.  前記単語列の属性は、該単語列の前記複数の学習用画像における出現度合いを含む、
     請求項7に記載の情報処理システム。
  9.  前記単語列の属性は、該単語列を含む学習用画像における、該単語列と前記抽出対象項目の項目値との間の距離を含む、
     請求項7又は8に記載の情報処理システム。
  10.  前記単語列の属性は、該単語列を含む学習用画像における、該単語列と前記抽出対象項目の項目値の一方から他方に向かう方向を含む、
     請求項7~9の何れか一項に記載の情報処理システム。
  11.  前記項目キーワードは、前記単語列が前記抽出対象項目の項目値の水平左方向にある度合い又は垂直上方向にある度合いに基づき決定される、
     請求項10に記載の情報処理システム。
  12.  前記単語列の属性に基づく該単語列の有効性を示す有効性スコアの高い順に、前記単語列が前記項目キーワードとして決定される、
     請求項7~11の何れか一項に記載の情報処理システム。
  13.  前記抽出対象項目に係る書式定義を記憶する書式定義記憶手段を更に備え、
     前記項目値候補抽出手段は、前記抽出対象項目に係る書式定義に合致する文字列を、前記候補文字列として抽出する、
     請求項1~12の何れか一項に記載の情報処理システム。
  14.  レイアウトが互いに異なる文書についての複数の学習用画像を文字認識した結果である文字認識結果を取得する認識結果取得手段と、
     各学習用画像に含まれる、抽出対象項目の項目値である文字列及び他の文字列の各文字列について、該抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと文字列との学習用画像内での位置関係に基づく特徴量を生成する特徴生成手段と、
     各学習用画像内の各文字列について、文字列の前記特徴量と該文字列が前記抽出対象項目の項目値であるか否かを示す情報とが対応付けられた学習データを用いて機械学習を行うことにより、学習済みモデルを生成するモデル生成手段と、
     を備える情報処理システム。
  15.  各学習用画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列を複数抽出する項目値候補抽出手段を更に備え、
     前記抽出対象項目値の項目値である文字列及び他の文字列は、抽出された前記複数の候補文字列である、
     請求項14に記載の情報処理システム。
  16.  前記抽出対象項目と、各学習用画像における該抽出対象項目の項目値とが対応付けられた正解定義を取得する正解定義取得手段を更に備え、
     前記モデル生成手段は、前記正解定義に基づき、前記文字列が前記抽出対象項目の項目値であるか否かを示す情報を取得する、
     請求項14又は15に記載の情報処理システム。
  17.  学習用画像の前記文字認識結果において抽出された、前記抽出対象項目に対する候補文字列を、該候補文字列が項目値の候補であることをユーザが視認可能な方法で表示する表示手段と、
     表示された前記候補文字列のうち一の候補文字列についてのユーザによる指定を受け付ける指定受付手段と、
     指定された前記一の候補文字列を、前記学習用画像における前記抽出対象項目の項目値として、前記正解定義を生成する正解定義生成手段と、を更に備え、
     前記正解定義取得手段は、前記正解定義生成手段により生成された前記正解定義を取得する、
     請求項16に記載の情報処理システム。
  18.  コンピュータが、
     対象画像を文字認識した結果である文字認識結果を取得する認識結果取得ステップと、
     前記対象画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列を複数抽出する項目値候補抽出ステップと、
     各候補文字列について、前記抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと候補文字列との前記対象画像内での位置関係に基づく特徴量を生成する特徴生成ステップと、
     文字列と前記複数の項目キーワードとの画像内での位置関係に基づく特徴量が入力されることで、該文字列が前記抽出対象項目の項目値である妥当性を示す情報が出力されるよう、機械学習により生成された学習済みモデルを記憶するモデル記憶ステップと、
     前記対象画像における各候補文字列の前記特徴量を前記学習済みモデルに入力することで、前記複数の候補文字列から前記抽出対象項目の項目値を抽出する項目値抽出ステップと、
     を実行する、項目値抽出方法。
  19.  コンピュータを、
     対象画像を文字認識した結果である文字認識結果を取得する認識結果取得手段と、
     前記対象画像の文字認識結果において、抽出対象項目の項目値となり得る文字列である候補文字列を複数抽出する項目値候補抽出手段と、
     各候補文字列について、前記抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと候補文字列との前記対象画像内での位置関係に基づく特徴量を生成する特徴生成手段と、
     文字列と前記複数の項目キーワードとの画像内での位置関係に基づく特徴量が入力されることで、該文字列が前記抽出対象項目の項目値である妥当性を示す情報が出力されるよう、機械学習により生成された学習済みモデルを記憶するモデル記憶手段と、
     前記対象画像における各候補文字列の前記特徴量を前記学習済みモデルに入力することで、前記複数の候補文字列から前記抽出対象項目の項目値を抽出する項目値抽出手段と、
     として機能させるためのプログラム。
  20.  コンピュータが、
     レイアウトが互いに異なる文書についての複数の学習用画像を文字認識した結果である文字認識結果を取得する認識結果取得ステップと、
     各学習用画像に含まれる、抽出対象項目の項目値である文字列及び他の文字列の各文字列について、該抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと文字列との学習用画像内での位置関係に基づく特徴量を生成する特徴生成ステップと、
     各学習用画像内の各文字列について、文字列の前記特徴量と該文字列が前記抽出対象項目の項目値であるか否かを示す情報とが対応付けられた学習データを用いて機械学習を行うことにより、学習済みモデルを生成するモデル生成ステップと、
     を実行する、モデル生成方法。
  21.  コンピュータを、
     レイアウトが互いに異なる文書についての複数の学習用画像を文字認識した結果である文字認識結果を取得する認識結果取得手段と、
     各学習用画像に含まれる、抽出対象項目の項目値である文字列及び他の文字列の各文字列について、該抽出対象項目の項目値を抽出するためのキーワード単語列である複数の項目キーワードと文字列との学習用画像内での位置関係に基づく特徴量を生成する特徴生成手段と、
     各学習用画像内の各文字列について、文字列の前記特徴量と該文字列が前記抽出対象項目の項目値であるか否かを示す情報とが対応付けられた学習データを用いて機械学習を行うことにより、学習済みモデルを生成するモデル生成手段と、
     として機能させるためのプログラム。
PCT/JP2021/038147 2021-10-14 2021-10-14 情報処理システム、項目値抽出方法、モデル生成方法及びプログラム WO2023062798A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/038147 WO2023062798A1 (ja) 2021-10-14 2021-10-14 情報処理システム、項目値抽出方法、モデル生成方法及びプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/038147 WO2023062798A1 (ja) 2021-10-14 2021-10-14 情報処理システム、項目値抽出方法、モデル生成方法及びプログラム

Publications (1)

Publication Number Publication Date
WO2023062798A1 true WO2023062798A1 (ja) 2023-04-20

Family

ID=85988191

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/038147 WO2023062798A1 (ja) 2021-10-14 2021-10-14 情報処理システム、項目値抽出方法、モデル生成方法及びプログラム

Country Status (1)

Country Link
WO (1) WO2023062798A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013509663A (ja) * 2009-11-02 2013-03-14 ビーデージービー・エンタープライズ・ソフトウェア・エスエーアールエル 動的変動ネットワークを使用するシステムおよび方法
JP2016051339A (ja) * 2014-08-29 2016-04-11 日立オムロンターミナルソリューションズ株式会社 帳票認識装置及び方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013509663A (ja) * 2009-11-02 2013-03-14 ビーデージービー・エンタープライズ・ソフトウェア・エスエーアールエル 動的変動ネットワークを使用するシステムおよび方法
JP2016051339A (ja) * 2014-08-29 2016-04-11 日立オムロンターミナルソリューションズ株式会社 帳票認識装置及び方法

Similar Documents

Publication Publication Date Title
US11170248B2 (en) Video capture in data capture scenario
US10366123B1 (en) Template-free extraction of data from documents
JP6871840B2 (ja) 計算機及び文書識別方法
US11710332B2 (en) Electronic document data extraction
JP6938228B2 (ja) 計算機、文書識別方法、及びシステム
RU2679209C2 (ru) Обработка электронных документов для распознавания инвойсов
US7769772B2 (en) Mixed media reality brokerage network with layout-independent recognition
US11176365B1 (en) Document data capture
US8195659B2 (en) Integration and use of mixed media documents
US20070050419A1 (en) Mixed media reality brokerage network and methods of use
US20070047008A1 (en) System and methods for use of voice mail and email in a mixed media environment
JPWO2019008766A1 (ja) 証憑処理システムおよび証憑処理プログラム
US20210081660A1 (en) Information processing apparatus and non-transitory computer readable medium
US20110052075A1 (en) Remote receipt analysis
JP5670787B2 (ja) 情報処理装置、帳票種別推定方法および帳票種別推定用プログラム
JP2019168857A (ja) 画像処理装置、画像処理方法および画像処理プログラム
JP2015118488A (ja) 会計データ入力システム、方法、およびプログラム
US20080008391A1 (en) Method and System for Document Form Recognition
JP2019191665A (ja) 財務諸表読取装置、財務諸表読取方法及びプログラム
US10114906B1 (en) Modeling and extracting elements in semi-structured documents
JP7379987B2 (ja) 情報処理装置及びプログラム
WO2023062798A1 (ja) 情報処理システム、項目値抽出方法、モデル生成方法及びプログラム
US11715318B2 (en) Systems and methods for spatial-aware information extraction from electronic source documents
JP6879034B2 (ja) プログラム、情報処理装置、及びシステム
JP6810303B1 (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: 21960655

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023553860

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE