Document analysis method, document analysis apparatus, document analysis program, and computer-readable storage medium storing the document analysis program.
The document analysis method improves text extraction by dividing documents into blocks based on display attributes, enhancing accuracy and speed for generative AI processing.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2026-03-13
AI Technical Summary
Conventional text extraction methods from electronic documents are inefficient, leading to large data sizes and processing speed issues, especially when using generative AI like Large Language Models (LLM), and struggle with accurate block-based classification.
A document analysis method that divides electronic documents into text blocks based on display position and form attributes, using identification information to improve classification accuracy and reduce data size by processing in block units.
Enhances the usability and processing speed of text extraction by accurately classifying text into blocks, making it suitable for large documents and various AI processing methods.
Smart Images

Figure 2026046635000001_ABST
Abstract
Description
Technical Field
[0004] , ,
[0006] , , , ,
[0005] , , , ,
[0001] The present disclosure relates to a document analysis apparatus, a document analysis program, and a computer-readable storage medium storing the document analysis program.
Background Art
Prior Art Documents
Patent Documents
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0007] Traditionally, it was widely known that text extraction from electronic documents was done on a page-by-page basis.
[0008] In response to this, the inventors of this application attempted to output text in blocks, each consisting of multiple texts such as the introduction, body, and conclusion of an electronic document, instead of outputting on a page-by-page basis, by inputting text extracted from the electronic document into a generating AI. Block-based output offers superior usability compared to conventional technologies.
[0009] However, simply inputting text is insufficient for ensuring the accuracy of the classification into blocks by the generating AI. Furthermore, even if output in block units were possible, the data size output by the generating AI would be enormous, which would also be insufficient for ensuring processing speed.
[0010] To solve the aforementioned problems, it is not enough to simply output text in blocks; it is necessary to achieve both high accuracy in classifying the text for each block and high classification speed.
[0011] In contrast, the first aspect of this disclosure relates to a document analysis method for analyzing an electronic document composed of document data containing multiple texts, using a computer having a processing unit.
[0012] According to the first embodiment, the document analysis method is as follows: The calculation unit generates and outputs first data based on the electronic document, associating text attributes that characterize at least one of the display position and display form of each of the plurality of texts on the electronic document, text corresponding to the text attribute, and identification information for identifying the text on the electronic document; the calculation unit inputs a prompt to the generation AI that includes accepting the first data as input, the input format of the first data, and outputting second data representing the breakdown of the texts belonging to each of the plurality of text blocks, which are divided into a plurality of text blocks by referring to the first data, using the identification information associated with the text; the calculation unit inputs the first data to the generation AI, thereby acquiring the second data via the generation AI; the calculation unit selects the text by referring to the first data and combines the selected texts in an order based on the identification information, thereby forming and outputting at least one of the plurality of text blocks as a document.
[0013] According to the first embodiment described above, the generating AI performs division into multiple text blocks by referring to text attributes that characterize at least one of the display position and display form. The display position of each text reflects the text structure of the electronic document, such as line breaks between sections and chapters. On the other hand, the display form of each text also reflects the text structure of the electronic document, such as the font size in section titles and chapter titles.
[0014] Therefore, by dividing document data into multiple text blocks based on such text structure, a more accurate classification can be performed that reflects the actual section and chapter structure in electronic documents. This contributes to improving the accuracy of text classification into each text block.
[0015] Furthermore, by dividing an electronic document into multiple text blocks, it becomes possible to process the electronic document with other document analysis AIs in text block units rather than inputting it page by page. This makes even electronic documents with large data sizes suitable for various processing methods using generative AI (e.g., LLM).
[0016] Furthermore, according to the first embodiment, instead of outputting the text body of each text block, the generating AI outputs second data consisting of identification information associated with each text block.
[0017] This allows for a more compact data size output from the generating AI, improving the speed of text classification into text blocks. This is particularly effective when processing a large number of electronic documents with the generating AI.
[0018] Furthermore, according to a second aspect of this disclosure, the calculation unit may input to the generating AI the following in the prompt as the input format of the first data: that the first data has, as text attributes, position information and font information for each of the plurality of texts in the electronic document; that the first data has text corresponding to the text attributes; and that the first data has, as identification information, the line number of the text in the electronic document.
[0019] According to the second embodiment, the prompt input to the generating AI includes a description of the input format of the first data. This further improves the accuracy of the generating AI's classification into text blocks.
[0020] Furthermore, as in the second embodiment described above, by using both the positional information and font information of each text, the accuracy of the classification of text blocks by the generating AI can be further improved compared to the case where only one of them is used.
[0021] Furthermore, according to the second aspect, by using line numbers as identification information, the order in which the selected texts are combined can be easily and appropriately determined.
[0022] Also, according to the third aspect of the present disclosure, the position information may include the vertical and horizontal coordinate positions of each of the plurality of texts on each page of the electronic document.
[0023] Here, the "coordinate position" may be the coordinate position of the beginning of each text, the coordinate position of the end of the text, or the coordinate position of other parts.
[0024] According to the third aspect, by using the coordinate positions of each text, processing reflecting the presence or absence of blank lines between texts can be performed. Thereby, the classification accuracy of text blocks by the generation AI can be further improved.
[0025] Also, according to the fourth aspect of the present disclosure, the font information may include at least one of the font size, font color, presence or absence of bold display, and presence or absence of italic display of each of the plurality of texts on each page of the electronic document.
[0026] According to the fourth aspect, by using the font information of each text, processing reflecting the display mode of the title in each section or chapter can be performed. Thereby, the classification accuracy of text blocks by the generation AI can be further improved.
[0027] Also, according to the fifth aspect of the present disclosure, the plurality of text blocks are constructed to reflect the section or chapter structure of the electronic document, and the calculation unit includes dividing the document data by section or by chapter in the prompt and inputting it to the generation AI.
[0028] According to the fifth embodiment described above, by explicitly indicating in the prompt that the section or chapter structure of the electronic document should be reflected, the generating AI can be made to actively estimate the section or chapter structure. This further improves the accuracy of the generating AI's classification into text blocks.
[0029] Furthermore, according to a sixth aspect of this disclosure, the calculation unit may input to the generating AI the instruction to estimate the section title or chapter title of each of the plurality of text blocks, including this instruction in the prompt.
[0030] According to the sixth embodiment described above, it becomes possible to assign a title to each text block, further improving the usability when performing various processes based on each text block.
[0031] Furthermore, according to a seventh aspect of this disclosure, the calculation unit may determine whether the document structure of the electronic document is known or not, and if the document structure is known, the calculation unit may input the first data into a rule-based estimation model to obtain the second data through the estimation model, and if the document structure is unknown, the calculation unit may input the first data into the generation AI to obtain the second data through the generation AI.
[0032] According to the seventh embodiment, the calculation unit acquires second data using two methods depending on the document structure of the electronic document. By using a rule-based estimation model, it is possible to achieve more accurate classification for documents with clearly defined electronic document formats, such as patent documents. On the other hand, for documents with unclear formats, it is possible to achieve more versatile classification by using the method described in the first embodiment.
[0033] Furthermore, according to an eighth aspect of this disclosure, the calculation unit may determine whether the electronic document is a patent document, and if it is determined that the electronic document is a patent document, the calculation unit may determine that the document structure is known.
[0034] According to the eighth aspect described above, it is possible to achieve more accurate classification for documents such as patent documents, where the format of the electronic document is clearly defined.
[0035] Furthermore, according to a ninth aspect of this disclosure, the file format of the electronic document may include PDF and HTML format, and the calculation unit may generate and output the first data based on the source code of the electronic document if the file format is HTML format.
[0036] According to the ninth embodiment described above, if the file format is HTML, first data is generated based on the source code of the electronic document. This makes it possible to generate more appropriate first data without using OCR processing or the like.
[0037] Furthermore, according to a tenth aspect of the present disclosure, the plurality of texts may include table text indicating a string of characters described in a table in the electronic document, the plurality of text blocks may include text blocks corresponding to the table text, and the calculation unit may input to the generating AI, including in the prompt, that the text blocks corresponding to the table text be excluded from the output using the identification information in the second data.
[0038] According to the tenth embodiment described above, by using different output formats for table text and other text, it becomes possible to process table text and text corresponding to the body of an electronic document separately. This improves the usability of each text block.
[0039] Furthermore, according to an eleventh aspect of this disclosure, the calculation unit may input to the generating AI a prompt to include, instead of using the identification information, text representing the table text in Markdown format in the second data for the text block corresponding to the table text.
[0040] According to the 11th embodiment described above, by outputting table text in Markdown format, it becomes possible to more appropriately distinguish between table text and text corresponding to the body of an electronic document. This improves the usability of each text block.
[0041] Furthermore, a twelfth aspect of this disclosure relates to a document analysis device that analyzes an electronic document composed of document data containing multiple texts by using a computer having a calculation unit.
[0042] According to the 12th embodiment, the document analysis device includes means for generating and outputting first data based on the electronic document, relating text attributes that characterize at least one of the display position and display form of each of the plurality of texts on the electronic document, text corresponding to the text attribute, and identification information for identifying the text on the electronic document; means for inputting a prompt to a generation AI that includes accepting the first data as input, the input format of the first data, and outputting second data representing the breakdown of the texts belonging to each of the plurality of text blocks, with respect to the document data which is divided into a plurality of text blocks by referring to the first data, using the identification information associated with the text; means for acquiring the second data via the generation AI by inputting the first data to the generation AI; and means for selecting the text by referring to the first data and combining the selected text in an order based on the identification information to output at least one of the plurality of text blocks as a document.
[0043] According to the 12th embodiment described above, when extracting text from an electronic document, it is possible to achieve both ease of use of the extracted results and processing speed.
[0044] Furthermore, a thirteenth aspect of this disclosure relates to a document analysis program that analyzes an electronic document composed of document data containing multiple texts, by having it run on a computer having a processing unit.
[0045] According to the 13th embodiment, the document analysis program causes the computer to perform the following processes: a process in which the arithmetic unit generates and outputs first data relating text attributes that characterize at least one of the display position and display form of each of the plurality of texts on the electronic document, text corresponding to the text attribute, and identification information for identifying the text on the electronic document; a process in which the arithmetic unit inputs a prompt to the generation AI including the acceptance of the first data as input, the input format of the first data, and, for the document data which is divided into a plurality of text blocks by referring to the first data, outputting as second data the breakdown of the texts belonging to each of the plurality of text blocks represented by the identification information associated with the text; a process in which the arithmetic unit inputs the first data to the generation AI and obtains the second data via the generation AI; and a process in which the arithmetic unit selects the text by referring to the first data and combines the selected texts in an order based on the identification information to output at least one of the plurality of text blocks as a document.
[0046] According to the 13th embodiment described above, when extracting text from an electronic document, it is possible to achieve both ease of use of the extracted results and processing speed.
[0047] Furthermore, a fourteenth aspect of this disclosure relates to a computer-readable storage medium that stores the document analysis program.
[0048] According to the 14th embodiment described above, when extracting text from an electronic document, it is possible to achieve both ease of use of the extracted results and processing speed. [Effects of the Invention]
[0049] As explained above, this disclosure makes it possible to achieve both usability of the extracted text and processing speed when extracting text from electronic documents. [Brief explanation of the drawing]
[0050] [Figure 1] Figure 1 is a diagram illustrating the hardware configuration of a document analysis device. [Figure 2] Figure 2 illustrates the software configuration of a document analysis device. [Figure 3] Figure 3 is a flowchart illustrating the steps of a document analysis method. [Figure 4A] Figure 4A is a block diagram illustrating the input and output of a document analysis method. [Figure 4B] Figure 4B is a block diagram illustrating the input and output of a document analysis method. [Figure 4C] Figure 4C is a block diagram illustrating the input and output of a document analysis method. [Figure 5] Figure 5 is a diagram illustrating document data. [Figure 6] Figure 6 is a flowchart illustrating the steps of the document retrieval process. [Figure 7] Figure 7 is a flowchart illustrating the steps of the electronic document structuring process. [Figure 8] Figure 8 is a diagram illustrating structured data. [Figure 9] Figure 9 is a flowchart illustrating the steps of the index acquisition process. [Figure 10A] Figure 10A is an example of a system prompt that is input to the generating AI. [Figure 10B] Figure 10B is a table illustrating each input field in the system prompt. [Figure 11] Figure 11 illustrates a user prompt that is input to the generating AI. [Figure 12] Figure 12 is an example of a display screen showing the output results from the generating AI. [Figure 13] Figure 13 is a flowchart illustrating the steps of the index matching process. [Figure 14A] Figure 14A is an example illustrating the output of a text block. [Figure 14B] Figure 14B is an example illustrating the output of a text block for the document data shown in Figure 5. [Figure 15] Figure 15 is a flowchart illustrating the steps of the electronic document visualization process. [Modes for carrying out the invention]
[0051] The embodiments of this disclosure will be described below with reference to the drawings. Note that the following description is illustrative.
[0052] <1.Device configuration> Figure 1 is a diagram illustrating the hardware configuration of the document analysis device (specifically, computer 1 which constitutes the document analysis device) related to this disclosure, and Figure 2 is a diagram illustrating its software configuration.
[0053] As illustrated in Figure 1, computer 1 comprises a Central Processing Unit (CPU) 3 that controls the entire computer 1, a Read Only Memory (ROM) 5 that stores boot programs and the like, a Random Access Memory (RAM) 7a that functions as main memory, and a Solid State Drive (SSD) 7b as secondary storage. Note that a Hard Disk Drive (HDD) or the like can be used instead of the SSD 7b as secondary storage.
[0054] Of these elements, the CPU 3 executes various programs. The CPU 3 constitutes the arithmetic unit in this embodiment. The RAM 7a and SSD 7b temporarily or continuously store the programs executed by the CPU 3. The RAM 7a and SSD 7b constitute the storage unit 7 in this embodiment.
[0055] Computer 1 also includes a display 9, a graphics memory (Video RAM: VRAM) 11 for storing image data displayed on the display 9, and a keyboard 13a and a mouse 13b as a human-machine interface. The keyboard 13a and mouse 13b each accept at least one of input and / or operation (hereinafter collectively referred to as "operation input") from the analyst. The keyboard 13a and mouse 13b constitute the input unit (reception unit) 13 in this embodiment. The display 9 can display a display screen based on the calculation results of the CPU 3, which will be described later, and constitutes the display unit in this embodiment.
[0056] Furthermore, the computer 1 according to this embodiment can send and receive data with external devices via a communication unit 15 configured as a communication interface. Specifically, the computer 1 is connected to a server machine 101 via the communication unit 15. The computer 1 and the server machine 101 form a closed network within the analyst's affiliated organization to prevent them from being used for machine learning by other companies or organizations.
[0057] In this context, the term "affiliated institution" refers to a concept that includes both public or private institutions to which the analyst belongs, such as universities and administrative corporations, and companies to which the analyst belongs, such as manufacturers.
[0058] The server machine 101 is composed of a computer equipped with a storage device 7c, which is, for example, an SSD or HDD, a CPU (not shown), and a GPU (Graphics Processing Unit) 19. The server machine 101 may also be read as "external computer" or "second computer." The storage device 7c, together with the RAM 7a and SSD 7b, constitutes the storage unit 7 in this embodiment.
[0059] Furthermore, server machine 101 implements a generative AI 201 utilizing GPU 19 and a natural language processing (NLP) model 202 utilizing either the CPU or GPU 19. For details on the generative AI 201 and the natural language processing model 202, please refer to Figures 4A and 4C below (the natural language processing model 202 is simply referred to as "NLP model" in the figures).
[0060] The generative AI 201 is an interactive generative AI for analyzing electronic documents Dc, which has been pre-trained on a large number of electronic documents Dc. The generative AI 201 is an example of the "generative AI" in this embodiment. The natural language processing model 202 is, for example, an interactive generative AI that has been pre-trained on a large number of electronic documents Dc and is configured to analyze other electronic documents Dc based on the learning results.
[0061] Specifically, the generative AI201 is composed of a Large Language Model (LLM) pre-trained on a large number of electronic documents (Dc). This LLM is constructed, for example, by a transferer composed of a neural network.
[0062] Note that server machine 101 is not mandatory. At least some of the functions performed by server machine 101 may be implemented by another server machine, or by computer 1 and its CPU 3. Furthermore, as described later, multiple computers 1, and by extension multiple CPUs 3, may be made to execute the following processes separately or simultaneously.
[0063] As illustrated in Figure 2, the program memory of SSD7b stores a document analysis program 21, an operating system (OS) (not shown), and application programs (also not shown).
[0064] Here, the document analysis program 21 is a program configured to cause the computer 1 to execute each process that constitutes the document analysis method according to this embodiment. The document analysis program 21 is pre-stored in a computer-readable storage medium 17. This storage medium 17 is a tangible storage medium made up of a disk medium or the like.
[0065] For example, the document analysis program 21 according to this embodiment consists of an electronic document acquisition program 231, an electronic document structuring program 232, an index acquisition program 233, an index matching program 234, and an electronic document visualization program 25.
[0066] Of the five programs that make up the document analysis program 21, the electronic document acquisition program 231, the electronic document structuring program 232, the index acquisition program 233, and the index matching program 234 constitute the text block generation program 23 according to this embodiment. By executing this text block generation program 23 on the computer 1, the text block generation method (text block generation process) according to this embodiment is implemented.
[0067] In the program memory of SSD7b, each program constituting the document analysis program 21 is started in response to commands input from the reception unit 13, etc. At that time, each program is loaded from SSD7b into RAM7a and executed by CPU3.
[0068] On the other hand, the data memory of SSD7b contains document data 31, structured data 33, index data 35, prompt data 37, text block data 39, and parsing data 41, which are either pre-stored or sequentially, temporarily, or continuously stored as each process progresses. Structured data 33 is an example of "first data" in this embodiment. Index data 35 is an example of "second data" in this embodiment. Details of this data will be described later.
[0069] Furthermore, the data illustrated in Figure 2 may be stored in the storage device 7c instead of the data memory of the SSD 7b, or it may be read from the storage device 7c.
[0070] In addition, the various data generated by executing the aforementioned programs are stored in the data memory of SSD7b or in RAM7a, which serves as main memory, as needed.
[0071] The following describes the document analysis method.
[0072] <2. Outline of Document Analysis Methods> Figure 3 is a flowchart illustrating the procedure of the document analysis method. Figures 4A to 4C are block diagrams illustrating the input and output in the document analysis method. Figure 5 is a diagram illustrating document data 31.
[0073] The document analysis method according to this embodiment analyzes an electronic document Dc using a computer 1. The electronic document Dc includes document data 31 and supplementary data (metadata) 32.
[0074] In this embodiment, document data 31 is digital data containing multiple texts Ta. Each of the multiple texts Ta is digital data corresponding to a string of characters written in the electronic document Dc.
[0075] The document data 31 may further include digital data corresponding to figures in the electronic document Dc, in addition to multiple texts Ta corresponding to the body of the electronic document Dc.
[0076] Furthermore, as in this embodiment, the text Ta referred to herein may include digital data (hereinafter also referred to as table text Dt) that represents a string of characters described in a table within the electronic document Dc.
[0077] For example, in this embodiment, the table text Dt includes not only the item names in the table and the text Ta that shows the numerical values and words corresponding to each item, but also the text Ta that shows the table number and title, as shown in "Table 1" in Figure 5.
[0078] The supplementary data 32 is digital data indicating the name of the editing software used for text editing, the date and time of creation, etc. It is not mandatory for the electronic document Dc to include supplementary data 32. If an electronic document Dc without supplementary data is analyzed, in the following description, the electronic document Dc may be treated as identical to document data 31. Furthermore, if an electronic document Dc containing supplementary data 32 is analyzed, the CPU 3 may refer to this supplementary data 32 when determining the document structure of the electronic document Dc.
[0079] Furthermore, the file formats for electronic documents (DC) include PDF (Portable Document Format) and HTML (HyperText Markup Language). In the case of HTML format, at least a portion of the supplementary data 32 will be written in its source code.
[0080] As shown in Figure 3, the document analysis method is performed by computer 1 sequentially executing a text block generation process (steps S1 to S4) and an electronic document visualization process (step S5). The text block generation process is performed by computer 1 sequentially executing an electronic document acquisition process (step S1), an electronic document structuring process (step S2), an index acquisition process (step S3), and an index matching process (step S4).
[0081] Of these processes, the electronic document acquisition process (step S1) and the electronic document visualization process (step S5) are not mandatory. Furthermore, as shown in the modified examples described later, the type of processing performed in the electronic document visualization process (step S5) is not particularly limited and can include summary creation, IPONC diagram creation, etc.
[0082] The text block generation program 23 is configured to cause computer 1 to execute these processes. Specifically, of the processes described above, the electronic document acquisition process is performed by CPU 3 executing the electronic document acquisition program 231. Similarly, the electronic document structuring process is performed by CPU 3 executing the electronic document structuring program 232. The index acquisition process is performed by CPU 3 executing the index acquisition program 233. The index matching process is performed by CPU 3 executing the index matching program 234. The electronic document visualization process is performed by CPU 3 executing the electronic document visualization program 25.
[0083] The CPU 3 executes the electronic document acquisition program 231, etc., thereby configuring the document analysis device by the computer 1. That is, as shown in Figures 4A and 4C, the computer 1 functions as a document analysis device comprising: an electronic document acquisition means 301 that executes the electronic document acquisition process; an electronic document structuring means 302 that executes the electronic document structuring process; an index acquisition means 303 that executes the index acquisition process; an index matching means 304 that executes the index matching process; and an electronic document visualization means 305 that executes the electronic document visualization process.
[0084] The following describes each process that constitutes the document analysis method in order. For details on data input and output in each process, and the relationships between the input / output data and each means, please refer to Figures 4A to 4C as appropriate.
[0085] <3. Details of Document Analysis Methods> (3-1. Electronic Document Acquisition Process) Figure 6 is a flowchart illustrating the steps of the electronic document acquisition process. When the control process proceeds to step S1 in Figure 3, the CPU 3 executes each step sequentially from step S11 in Figure 6. Each step in Figure 6 is executed by the electronic document acquisition means 301, which is one of the functional elements configured by the CPU 3 (see Figure 4A).
[0086] First, in step S11, the CPU 3 obtains the electronic document Dc to be analyzed from the storage unit 7, such as the SSD 7b or storage device 7c, or from a database (not shown in the figure).
[0087] In the following step S12, the CPU3 determines the file format of the acquired electronic document Dc. The file format of the electronic document Dc may be determined automatically by the CPU3 based on the extension of the electronic document Dc, or the file format specified by the analyst via the reception unit 13 may be used for the determination by the CPU3.
[0088] In the subsequent step S13, the CPU3 stores the acquired electronic document Dc and its file format in the storage unit 7, and terminates the electronic document acquisition process. The CPU3 then proceeds through the control process from step S1 to step S2 in Figure 3, and starts the electronic document structuring process.
[0089] (3-2. Electronic Document Structuring Process) Figure 7 is a flowchart illustrating the steps of the electronic document structuring process. Figure 8 is a diagram illustrating the structured data 33. When the control process proceeds to step S2, the CPU 3 executes each step from step S21 in Figure 7. Each step in Figure 7 is executed by the electronic document structuring means 302, which is a functional element of the computer 1 (see Figure 4A).
[0090] In this embodiment, the electronic document structuring process is configured such that the CPU 3 generates and outputs structured data 33 based on the electronic document Dc acquired in the electronic document acquisition process.
[0091] Here, as shown in Figure 8, structured data 33 is a dataset that associates text attributes Tb that characterize at least one of the display position and display form of each of multiple texts Ta, the text Ta corresponding to that text attribute Tb, and the line number Tc of that text Ta on the electronic document Dc. Structured data 33 is, for example, text data in CSV or TSV format. Structured data 33 is not limited to CSV or TSV format; it can be any text data that uses separators that can distinguish between text attributes Tb, text Ta, and line number Tc. For example, in the specific example in Figure 11, separators such as [] and <> are used.
[0092] Furthermore, as mentioned above, the document data 31 of the electronic document Dc contains multiple texts Ta. For example, a break between texts Ta may be determined when each text Ta is separated by a line break.
[0093] Specifically, the text attribute Tb according to this embodiment is configured to characterize both the display position and display form of each of the multiple texts Ta.
[0094] In detail, as illustrated in Figure 8, the text attribute Tb according to this embodiment consists of both position information Tb1 that characterizes the display position of each text Ta and font information Tb2 that characterizes the display form of each text Ta.
[0095] More specifically, location information Tb1 includes the X and Y coordinates (X,Y) of each text Ta on each page of the electronic document Dc. Here, the X and Y coordinates may also be the X and Y coordinates of the first character of each text Ta, respectively. Location information Tb1 also includes the page number on which each text Ta is displayed. <page>It may include the following. The X and Y coordinates are examples of "vertical and horizontal coordinate positions" in this embodiment.
[0096] For more details, font information Tb2 refers to the font size of each text Ta on each page of the electronic document Dc. <size>And, font color<Cоlоr> And, whether or not it is displayed in bold (whether or not it is displayed in bold).<Bоld> And, whether or not italicized text is used (whether or not it is displayed in italics). <italics>It includes at least one of the following.
[0097] Furthermore, as illustrated in Figure 8, the text Ta corresponding to the text attribute Tb, as mentioned above, represents the content of the string "Text" indicated by each text Ta, separated by line breaks.
[0098] Furthermore, the line number Tc corresponding to each text Ta indicates the line number [Index] of that text Ta on each page of the electronic document Dc. This line number Tc may be reset for each page, or it may be counted so that it is a continuous number across all pages. The line number Tc is identification information for identifying text Ta on the electronic document Dc. The line number Tc, as identification information, is assigned to each text Ta on the electronic document Dc.
[0099] It is not mandatory to use the line number Tc as identification information. The identification information may be the Y coordinate of each text Ta. In other words, at least a portion of the text attribute Tb in this disclosure may also serve as identification information.
[0100] Returning to Figure 7, in step S21 of the same figure, CPU3 first determines whether the file format of the electronic document Dc is HTML format, based on the processing performed in step S12 of Figure 6.
[0101] If the file format is PDF (step S21: NO), CPU3 proceeds to step S23 of the control process. If the process proceeds to step S23, CPU3 generates structured data 33 based on at least one of the character codes embedded in the electronic document Dc and the OCR processing performed on the electronic document Dc.
[0102] In this case, if a character code is associated with each text Ta in the electronic document Dc, CPU3 determines each text Ta by extracting that character code. On the other hand, if no character code is embedded in the electronic document Dc and only glyph information exists, CPU3 estimates and obtains each text Ta based on OCR (Optical Character Recognition) processing of the electronic document Dc. CPU3 also obtains text attributes Tb and line numbers based on the OCR processing. CPU3 generates and outputs structured data 33 by associating each of the obtained pieces of information.
[0103] On the other hand, if the file format is HTML (step S12: YES), CPU3 proceeds the control process to step S22. If the process proceeds to step S22, CPU3 generates structured data 33 based on the source code of the electronic document Dc.
[0104] The source code of the electronic document Dc contains the character encoding settings of the electronic document Dc (information indicating which character encoding is set), each text Ta, and supplementary information such as tags and font settings set for each text Ta. Based on this information, CPU3 acquires various information that constitutes structured data 33. Of the information that constitutes structured data 33, information that is not thought to be included in the source code, such as location information Tb1, is acquired based on OCR processing, similar to PDF electronic documents Dc. CPU3 generates and outputs structured data 33 by associating each of the acquired pieces of information.
[0105] In step S24, which follows steps S22 and S23 respectively, the CPU 3 stores the output structured data 33 in the storage unit 7.
[0106] Once step S24 is complete, CPU3 terminates the electronic document structuring process. CPU3 then proceeds through the control process from step S2 to step S3 in Figure 3 and starts the index acquisition process.
[0107] (3-3. Index Acquisition Process) Figure 9 is a flowchart illustrating the steps of the index acquisition process. Figure 10A is an example of a system prompt 203 input to the generating AI 201. Figure 10B is a diagram illustrating each input field in the system prompt 203. Figure 11 is an example of a user prompt 204 input to the generating AI 201. Figure 12 is an example of a display screen 205 showing the output results from the generating AI 201.
[0108] Figure 10A can also be considered a concrete example of prompt data 37 input to the generated AI 201 as a system prompt 203. Figure 11 can also be considered a concrete example of structured data 33 input to the generated AI 201 as a user prompt 204. Figure 12 can also be considered a concrete example of index data 35 displayed on the display 9.
[0109] Figure 11 is an excerpt from the paper "Toshiki Kondo, Takeo Kodaira, Hiromasa Kenmochi, "Development of Design Support Technology for Efficient Discovery of Structural Knowledge in Automobile Bodies (1) Proposal of Nonlinear Sparse Modeling Using Evolutionary Factor Extraction and Factor Selection Probability", Proceedings of the 31st Conference of the Design Engineering and Systems Division (2021), 2202", published by the inventors of the present invention.
[0110] When the control process proceeds to step S3, the CPU 3 executes each step from step S31 in Figure 9. Each step in Figure 9 is executed by the index acquisition means 303, which is one of the functional elements configured by the CPU 3 (see Figure 4A).
[0111] -Basic Concepts of the Index Acquisition Process- The index acquisition process according to this embodiment includes the CPU 3 inputting a prompt (system prompt 203) to the generating AI 201 (prompt input processing in step S33).
[0112] Here, the system prompt 203 in this embodiment is an instruction given to the generating AI 201 in the background. This system prompt 203 includes at least three instructions.
[0113] The input of the system prompt 203 to the generated AI 201 may be performed by the CPU 3 when the reception unit 13 receives a predetermined operation from the analyst (for example, a specific key input or a specific mouse operation), triggered by that reception.
[0114] Furthermore, the content of the system prompt 203 may be pre-configured, for example, as text data in Markdown format (prompt data 37). In that case, the content of the system prompt 203 will be appropriately set by the CPU 3 to reflect the content of prompt data 37.
[0115] The first of the three instructions (the first instruction) is, as shown in Figure 10A, that "the generating AI 201 accepts structured data 33 as input." The structured data 33 is entered, for example, as a so-called user prompt 204 into the command prompt of the generating AI 201.
[0116] Note that the parenthetical phrase "Generating AI201, ..." indicating the first instruction is merely a conceptual representation of the instruction, and it is not mandatory to configure the system prompt 203 exactly as it is written. Similarly, for the second and third instructions, which will be discussed later, it is not mandatory to configure the system prompt 203 exactly as it is written in each instruction.
[0117] For details, in the example in Figure 10A, as shown by the leader line C1 in the figure, the first instruction is "Information from the document will be provided on N It says "pages.". As you can see, in the example in Figure 10A, the phrase "Information from the document" is used instead of the phrase "structured data".
[0118] For more details, in the example shown in Figure 10A, you can specify the number of pages to be analyzed from the electronic document (document) Dc by entering any natural number in the input field labeled "N" (see also Figure 10B).
[0119] Furthermore, the first instruction may include information indicating the type of electronic document Dc to be entered, such as "information from a research paper will be entered" or "information from a newsletter will be entered."
[0120] The second of the three instructions (the second instruction) is the "input format of the structured data 33," as shown by the leader line C2 in Figure 10A. The "input format of the structured data 33" consists of "descriptions for each data item" that make up the structured data 33.
[0121] In this embodiment, the description of each data item is configured to reflect the CSV or TSV format of the structured data 33 and to describe the data content written in that format.
[0122] In the example in Figure 10A, the input format for structured data 33 in electronic document Dc can be specified by entering any input format in the input field labeled "F" (which is italicized and underlined) (see also Figure 10B).
[0123] As an example, in the input field "F" mentioned above, the input format for structured data 33 is entered in the following order, similar to the example in Figure 8: [Index] indicating the input format for line number Tc, (x coordinate, y coordinate) indicating the input format for position information Tb1, <Maximum font size in the document> indicating the input format for font information Tb2, and "Text" indicating the input format for text Ta.
[0124] In this case, as shown in the specific example in Figure 11, the structured data 33 will be entered according to the input format. For example, the first row in Figure 11 is: row number =
[12] , (x coordinate, y coordinate) = (400, 109), font size = <14> The data will be entered in the following order: text = "We have developed the interactive design support technology in order to efficiently obtain finding of lightweight-car-"
[0125] Thus, in this embodiment, the input format of the structured data 33 includes an input format for the text attribute Tb, an input format for the line number Tc as identification information, and an input format for the text Ta (see also Figure 10B).
[0126] In other words, as illustrated in the "[Index]" section of Figure 10A mentioned above, the "input format of structured data 33" includes the fact that "structured data 33 has the line number Tc of the text Ta in the electronic document Dc as identification information."
[0127] Furthermore, as illustrated by "(x coordinate, y coordinate)" and "<Maximum font size in the document>" in Figure 10A mentioned above, the "input format of structured data 33" includes the fact that "structured data 33 has, as text attribute Tb, position information Tb1 and font information Tb2 for each of the multiple texts Ta in the electronic document Dc."
[0128] Furthermore, as illustrated in the "text" section of Figure 10A mentioned above, the "input format of structured data 33" includes the requirement that "structured data 33 has text Ta corresponding to text attribute Tb." In the example of Figure 10A, "text Ta corresponding to text attribute Tb" refers to text Ta to which the same line number Tc as text attribute Tb is assigned.
[0129] The third of the three instructions (the third instruction) is, as shown by the leader lines C3 and C4 in Figure 10A, that "the generating AI 201 outputs, for document data 31 which is divided into multiple text blocks Bl by referring to structured data 33, as index data 35 which represents the breakdown of text Ta that will belong to each of the multiple text blocks Bl, using identification information (e.g., line number Tc) associated with the text Ta."
[0130] For details, in the example in Figure 10A, as shown by the leader line C3 in the figure, the first part of the third instruction is "Extract blocks of text by B It says ".". This instruction tells the generating AI201 to split the document data 31, which was input as structured data 33, into multiple text blocks Bl.
[0131] In this context, a text block Bl is a "block of documents" composed of one or more texts Ta. A "block of documents" here may be, for example, a "group of documents" composed of one or more texts Ta according to a predetermined rule. Furthermore, a "group" here may be a "group" of sections or chapters that constitute an electronic document Dc.
[0132] To approximate "grouping" at the section or chapter level, in the example in Figure 10A, you can specify the division criteria for document data 31 by entering an arbitrary division criterion in the input field labeled "B" (italicized and underlined). The division criterion consists of one or more of the following: "chapter," "section," "part," and "paragraph" (see also Figure 10B).
[0133] Specifically, in the example shown in Figure 10A, by entering "Section" or "Chapter" in the input field "B", the system prompt 203 can be configured to "divide the document data 31 into sections or chapters". By using such a system prompt 203, multiple text blocks Bl will be constructed to reflect the section or chapter structure of the electronic document Dc.
[0134] Furthermore, in the example shown in Figure 10A, as indicated by the leader line C4 in the figure, the latter part of the third instruction is "Output extracted text blocks by their Identifiable information I. The instructions state: "This instruction instructs the generating AI201 to output index data 35, which represents the breakdown of text Ta belonging to each of the multiple text blocks Bl, using identification information (e.g., line number Tc) associated with the text Ta."
[0135] In this case, the type of identification information to be output as index data 35 is specified by entering the "row number," "column number," "Y coordinate," etc., in the input field labeled "I" which is italicized and underlined (see also Figure 10B). The specific examples shown in Figure 12 and Figure 14A described later show the case where the row number Tc is entered in the input field labeled "I."
[0136] Furthermore, as illustrated by the leader lines C11 and C12 in Figure 12, which will be described later, the index data 35 is not the body text of the text Ta that constitutes each text block Bl, but rather a dataset that represents the breakdown of each text block Bl by index (line number Tc).
[0137] Furthermore, index data 35 indicates the range of text Ta that constitutes each text block Bl. The range of text Ta is represented by the line number Tc of the text Ta that constitutes each text block Bl.
[0138] In this embodiment, the index data 35 does not include the text body Ta, but only the line number Tc. Excluding the text body Ta from the index data 35 is advantageous in reducing the data size of the index data 35.
[0139] In addition, in the example shown in Figure 10A, as illustrated by the leader line C5 in the figure, another instruction (the fourth instruction) related to the output of the index data 35 is stated as "Simplify and output the attributes that enable continuous expressions using C." This instruction specifies to the generated AI2021 the notation for consecutive row numbers Tc when outputting the index data 35.
[0140] In this case, the notation for consecutive line numbers Tc is specified by entering "-", "~", "_", etc. in the italicized and underlined "C" input field (see also Figure 10B). The specific examples shown in Figures 12 and 14A show the case where "-" is entered in the "C" input field. The notation for adjacent Y coordinates can also be specified when using identification information other than line number Tc. The notation for consecutive or adjacent identification information in general can be entered in the "C" input field.
[0141] In addition, in the example shown in Figure 10A, as indicated by the leader line C6 in the figure, the instruction (fifth instruction) states, "If it's possible to identify M, output those as well." This instruction causes the generating AI 201 to output attribute information that can be read from the electronic document Dc, along with the index data 35 showing the classification results of multiple text blocks Bl.
[0142] In this case, the type of attribute information to be read from the electronic document Dc is specified by entering the type of attribute information in the input field marked "M" in italics and underlined (see also Figure 10B). The attribute information to be read from the electronic document Dc consists of one or more of the following from the electronic document Dc: "Chapter Title," "Section Title," "References," "Reference Information," and "Author Information (one or more of the author's name, affiliation, and email address)."
[0143] Specifically, in the example shown in Figure 10A, by entering "Section Title" or "Chapter Title" in the "M" input field, the system prompt 203 can include the instruction to "estimate the section title or chapter title for each of the multiple text blocks Bl".
[0144] In this case, CPU3 will have the generating AI201 estimate the section title or chapter title, and output the estimation result together with the index data 35, or as data independent of the index data 35.
[0145] In addition, in the example in Figure 10A, as shown by the leader line C7 in the figure, the instruction "Exclude E." is written as an additional instruction (sixth instruction). This instruction specifies to the generated AI201 information to be excluded from the text block Bl and index data 35.
[0146] In this case, by entering the type of information in the input field labeled "E" (which is italicized and underlined), the information entered in the input field is excluded from the output of the index data 35 (see also Figure 10B). The types of information to be excluded consist, for example, of the "page number," "cited references," "references," "author information (one or more of the author's name, affiliation, and email address)," "title of the paper (electronic document Dc)," "title of the figure," and one or more of the specific supplementary data 32 of the electronic document Dc.
[0147] For example, consider the case where "the paper title" is entered in input field "E". In this case, CPU3 instructs generation AI201 to remove "the paper title" from the text block Bl. Generation AI201 will then remove the line number Tc corresponding to the paper title from the index data 35.
[0148] In addition, in the example shown in Figure 10A, as indicated by the leader line C8 in the figure, the following instruction (the seventh instruction) is given: "When the information contains S, please output it without breaking the structure, using strings such as separators." This instruction instructs the generating AI201 to output information such as the table text Dt, either as information embedded within the index data 35 or as information independent of the index data 35.
[0149] In this case, by entering the type of information to be output independently in the italicized and underlined "S" input field, the generating AI201 can be made to output information belonging to the type entered in the input field (see also Figure 10B). The type of information to be input consists of one or more of the following in the electronic document Dc: "table data (table text Dt)", "reference information", and "author information". The information that can be entered in the "S" input field is information that includes multiple texts Ta and can generate a text block Bl, such as table text Dt.
[0150] The CPU 3 then instructs the generating AI 201 to exclude the information entered in the "S" input field from the output using the identification information (row number Tc) in the index data 35. The CPU 3 also instructs the generating AI 201 to output the information entered in the "S" input field in an output format different from the row number Tc.
[0151] For example, consider the case where "table text Dt" is entered in the input field "E". In this case, the line number Tc of the text Ta that makes up table text Dt will be excluded from the index data 35. In other words, the system prompt 203 in this case includes the instruction to "exclude the text Ta or text block Bl corresponding to table text Dt from the output using line number Tc in the index data 35".
[0152] Furthermore, as illustrated by the leader line C13 in Figure 12, which will be described later, the system prompt 203 in this case includes the instruction to "include in the index data 35 text Ta, which represents the table text Dt in Markdown format, instead of using the line number Tc, for the text block Bl corresponding to the table text Dt."
[0153] Furthermore, the index acquisition process according to this embodiment includes the CPU 3 inputting structured data 33 to the generating AI 201, thereby acquiring index data 35 via the generating AI 201 (the index acquisition process in steps S34 and S35).
[0154] By inputting the aforementioned system prompt 203 into the generating AI 201, the generating AI 201 is ready to take the structured data 33 as input and output the index data 35.
[0155] Therefore, by inputting structured data 33 in accordance with the input format of the system prompt 203 exemplified in Figure 11, the generating AI 201 will output index data 35 in accordance with the output format of the system prompt 203, as exemplified in Figure 12.
[0156] As illustrated by leader lines C11 and C12 in Figure 12, the index data 35 includes information indicating each text block Bl. Furthermore, as illustrated by leader line C13 in the same figure, the index data 35 also includes information indicating table text Dt, written in Markdown format.
[0157] For example, the leader line C11 in Figure 12 is attached to index data 35, which indicates that the first text block Bl is composed of text Ta from line 12 to line 21 of the electronic document Dc.
[0158] On the other hand, the leader line C12 in Figure 12 is attached to index data 35, which indicates that the second text block Bl is composed of text Ta from lines 25 to 39 of the electronic document Dc and text Ta from lines 47 to 55.
[0159] -Specific example of the index acquisition process- First, in step S31 of Figure 9, the CPU 3 reads the structured data 33 generated by the electronic document structuring process.
[0160] In the following step S32, the CPU3 determines whether the document structure of electronic document Dc is known. If the determination is NO, the CPU3 proceeds to step S33. On the other hand, if the determination in step S32 is YES, the CPU3 proceeds to step S36.
[0161] For example, the CPU 3 according to this embodiment determines whether the electronic document Dc is a patent document, and if it is determined that the electronic document Dc is a patent document, it determines that the document structure is known. This determination may be made automatically by the CPU 3, or it may be made based on the input content of the analyst via the reception unit 13.
[0162] More generally, this can be applied not only to patent documents but also to any publications, academic journals, commercial magazines, papers (including academic journals and collected papers), etc. In that case, the terms "patent document" and "publication name" in the following explanation should be replaced with terms such as "academic journal" and "journal name," respectively.
[0163] To illustrate further, in the former configuration example (when the determination is made automatically), the determination in step S32 may be made based on whether or not the structured data 33 contains information indicating that the electronic document Dc is a patent document. "Information indicating that it is a patent document" means that the structured data 33 contains a string of characters indicating the publication name of the patent document.
[0164] In this case, the memory unit 7 has a string of characters indicating the publication name of the patent document stored in advance, and the CPU 3 compares the stored content with the text Ta included in the structured data 33 to determine whether or not the electronic document Dc is a patent document.
[0165] For example, if the text Ta constituting the structured data 33 contains text Ta indicating the publication name of a patent document, the CPU 3 will determine that "the electronic document Dc is a patent document." To prevent confusion with cited documents etc. described in the patent document, the determination may be made by combining the text Ta indicating the publication name and the text attribute Tb of that text Ta, or by combining the line number Tc of that text Ta with, or by using the text attribute Tb instead of, or in addition to, the text attribute Tb.
[0166] First, if the document structure of the electronic document Dc is unknown (step S32: NO), CPU3 inputs structured data 33 to generation AI201, thereby obtaining index data 35 via generation AI201. Specifically, CPU3 sequentially executes the prompt input process (step S33) and the index acquisition process (steps S34 and S35) described above.
[0167] In other words, in step S33, the CPU 3 inputs the system prompt 203, as exemplified in Figure 10A, etc., to the generation AI 201 of the server machine 101. This prepares the generation AI 201. Note that the processing in step S33 may be performed in advance by the computer 1 prior to the electronic document structuring process S2, the electronic document acquisition process S1, etc.
[0168] In the following step S34, the CPU3 inputs the structured data 33, as illustrated in Figures 8 and 11, to the generating AI 201. The generating AI 201 generates the index data 35, as illustrated in Figure 12, according to the instructions provided in the system prompt 203.
[0169] Subsequently, in the following step S35, the CPU 3 obtains the index data 35 generated by the generation AI 201 via the communication unit 15.
[0170] On the other hand, if the document structure of the electronic document Dc is known (step S32: YES), the CPU 3 inputs structured data 33 into a rule-based estimation model 206, as illustrated in steps S36 and S37 described later, and obtains index data 35 through the estimation model 206. The estimation model 206 is a pre-built rule-based model (illustrated only in Figure 4B). The estimation model 206 is implemented, for example, on the server machine 101. This estimation model 206 takes structured data 33 as input and outputs index data 35.
[0171] Furthermore, the estimated model 206 is not limited to rule-based models. The estimated model 206 may, for example, be a deep learning model pre-trained on a large number of electronic documents Dc.
[0172] When using a rule-based model, the estimation model 206 may determine the boundaries of text blocks Bl based, for example, on changes in the font size of text Ta appearing in the electronic document Dc (for example, the relationship between the font size of each text Ta and a predetermined threshold), or it may determine the boundaries of text blocks Bl based on whether or not the text Ta appearing in the electronic document Dc corresponds to a pre-set phrase.
[0173] Let's specifically explain the case where the latter structure (judgment based on pre-defined wording) is adopted. For example, in the case of patent documents in the United States, the titles of each section are clearly defined, such as "ABSTRACT," "BACKGROUND OF THE INBENTION," "SUMMORY OF THE DESCRIPTION," and "DETAILED DESCRIPTION OF THE DESCRIPTION."
[0174] In this case, for example, the rules that the estimation model 206 refers to can be pre-configured so that the text Ta representing "BACKGROUND OF THE INBENTION" to the text Ta immediately preceding "SUMMORY OF THE DESCRIPTION" is treated as a single text block Bl. By pre-configuring it in this way, the estimation model 206 can generate index data 35 for generating text blocks Bl divided into sections, based on the input structured data 33 and the pre-configured rules.
[0175] On the other hand, in the case of patent publication and patent registration in Japan, similar processing can be applied to each section, such as "Title of Invention," "Technical Field," "Background Art," "Summary of Invention," "Modes for Carrying Out the Invention," and "Claims."
[0176] In other words, in step S36, the CPU 3 inputs structured data 33, as exemplified in Figure 11, etc., into the estimation model 206. The estimation model 206 generates index data 35, as exemplified in Figure 12, etc., according to pre-set rules.
[0177] Therefore, in the following step S37, the CPU 3 obtains the index data 35 generated by the estimation model 206 via the communication unit 15.
[0178] Subsequently, in step S38, which follows steps S35 and S37 respectively, the CPU 3 stores the acquired index data 35 in the storage unit 7.
[0179] Once step S38 is complete, CPU3 terminates the index acquisition process. CPU3 then proceeds through the control process from step S3 to step S4 in Figure 3 and starts the index matching process.
[0180] (3-4. Index matching process) Figure 13 is a flowchart illustrating the steps of the index matching process. Figure 14A is a diagram illustrating the output of the text block Bl. When the control process proceeds to step S4, the CPU 3 executes each step from step S41 in Figure 13. Each step in Figure 13 is executed by the index matching means 304, which is one of the functional elements configured by the CPU 3 (see Figure 4A).
[0181] The index matching process according to this embodiment is configured such that the CPU 3 refers to the index data 35 to select text Ta from document data 31 or structured data 33, and combines the selected text Ta in an order based on the line number Tc as identification information, thereby creating and outputting at least one of a plurality of text blocks Bl as a document.
[0182] As an example, in this embodiment, the CPU 3 performs the document creation and outputs the text by referring to the index data 35 and combining the selected text Ta in the order of the line numbers Tc used as identification information. If Y coordinates are used instead of line numbers Tc as identification information, the CPU 3 will combine the text Ta associated with each Y coordinate in the order of the Y coordinates.
[0183] Specifically, in step S41 of Figure 13, the CPU 3 reads structured data 33 and index data 35 from the storage unit 7.
[0184] In the following step S42, the CPU 3 obtains the line number Tc contained in the index data 35 for each text block Bl, and selects the text Ta corresponding to the obtained line number Tc from the structured data 33.
[0185] In the subsequent step S43, the CPU3 combines the text Ta selected in step S42 in line number Tc order, thereby outputting a text block Bl using the text Ta instead of line numbers Tc.
[0186] This makes it possible to generate and output a text block Bl, which is composed of one or more texts Ta, as illustrated in Figure 14A. The CPU 3 generates text block data 39 that represents the output text block Bl and stores it in the storage unit 7. This text block data 39 is associated with an ID for identifying the corresponding electronic document Dc.
[0187] Furthermore, as illustrated by the leader line C8 in Figure 10A, by configuring the system to exclude "information from academic societies," the line number
[0364] corresponding to the information from academic societies (specifically, the text "Japan Society of Mechanical Engineers" Ta) is excluded from the index data 35 in Figure 14A. As a result, "information from academic societies" can be excluded from each text block Bl, as shown in the lower part of Figure 14A.
[0188] Subsequently, in the following step S44, the CPU 3 stores the output text block Bl in the storage unit 7. Once this process is complete, the CPU 3 terminates the index matching process. The computer 1 terminates the text block generation method configured in steps S1 to S4 and, depending on the prior settings, starts a new electronic document visualization method configured in step S5.
[0189] Figure 14B illustrates the output result of text block Bl for the document data 31 in Figure 5. By entering "Chapter" in the input field "B" in Figure 10A, the generating AI 201 classifies the document data 31 by chapter and generates text block Bl for each chapter.
[0190] In the example shown in Figure 14B, the generating AI 201 will classify the document data 31 into a first text block Bl1 indicating the title of the document data 31, a second text block Bl2 indicating the "Abstract" of the document data 31, a third text block Bl3 indicating the "1. Introduction" of the document data 31, and a fourth text block Bl4 indicating the "2. Main Body" of the document data 31.
[0191] (3-5. Electronic Document Visualization Process) Figure 15 is a flowchart illustrating the steps of the electronic document visualization process. When the control process proceeds to step S5, the CPU 3 executes each step sequentially from step S51 in Figure 15. Each step in Figure 15 is executed by the electronic document visualization means 305, which is one of the functional elements configured by the CPU 3 (see Figure 4C).
[0192] In the electronic document visualization process according to this embodiment, first, the CPU 3 reads the text block data 39 corresponding to each electronic document Dc (step S51). In the following step S52, the CPU3 inputs the text Ta into the natural language processing model (NLP model) 202 in units of text blocks Bl, or in units of electronic documents Dc, which are composed of multiple text blocks Bl.
[0193] In the case of the latter electronic document Dc unit, CPU3 performs a process to restore the corresponding electronic document Dc by combining multiple text blocks Bl before executing step S52. The electronic document Dc generated from text blocks Bl differs from the electronic document Dc before restoration, and as shown in line number
[0364] in Figure 14A, it is an electronic document Dc with some information excluded.
[0194] In the following step S53, the CPU 3 receives the analysis results of the text Ta from the natural language processing model (NLP model) 202 (see analysis data 41 in Figure 4C). Then, in the following step S54, the CPU 3 visualizes (displays) the received analysis results, for example, on the display unit 9.
[0195] Specifically, the natural language processing model 202 consists of a model based on natural language processing techniques, which has been pre-trained on a large number of text blocks Bl or a large number of electronic documents Dc.
[0196] Specifically, the method used to construct the natural language processing model 202 is, for example, a transferer composed of a neural network. However, using an LLM in the natural language processing model 202 is not mandatory. The natural language processing model 202 could, for example, be a machine learning model that analyzes keyword frequency, or a machine learning model that analyzes distributed representations such as text blocks.
[0197] The natural language processing model 202 can output tables representing experimental or numerical simulation results based on input text blocks Bl or electronic documents Dc, create two-dimensional displays showing the relationships between electronic documents Dc, output summaries generated on a text block Bl or electronic document Dc basis, and create IPONC diagrams that visualize the IPO (Input-Process-Output) of predetermined functions.
[0198] For example, when creating an IPONC diagram, in the case of an electronic document Dc in the format of a research paper as shown in Figure 5, CPU3 can perform training of the natural language processing model 202 and analysis using the trained natural language processing model 202 based on the text block Bl corresponding to the main body of the electronic document Dc. This makes it possible to eliminate the influence of the title, abstract, etc., and output a more appropriate IPONC diagram.
[0199] Furthermore, in creating a summary, it is possible to train the natural language processing model 202 based on the text block Bl corresponding to the summary (Abstract), and then perform analysis using the trained natural language processing model 202. This eliminates the influence of text Ta, which is assumed to have little relation to the summary, and makes it possible to output a more appropriate summary.
[0200] Furthermore, analysis using text block Bl or the reconstructed electronic document Dc as input results in more favorable digital data, as it allows for a reduction in the data size input to the natural language processing model 202.
[0201] <4. Significance of using structured data and indexed data> The inventors of this application attempted to output text in units of text blocks Bl, each consisting of multiple texts such as the introduction, body, and conclusion of an electronic document, instead of outputting on a page-by-page basis, by inputting text Ta extracted from an electronic document Dc into a generating AI (Generating AI 201). Outputting in blocks offers superior usability compared to conventional technologies.
[0202] However, simply inputting the text "Ta" is insufficient for ensuring the classification accuracy of each text block "Bl" by the generating AI 201. Furthermore, even if output in block units were possible, the data size output by the generating AI would be enormous, which would also be insufficient for ensuring processing speed.
[0203] Therefore, it is not enough to simply output text Ta for each text block Bl; it is necessary to achieve both high classification accuracy for text Ta in each text block Bl and high classification speed.
[0204] In contrast, according to the above embodiment, the generating AI 201 performs division into multiple text blocks Bl by referring to the text attribute Tb that characterizes at least one of the display position and display form of each text Ta, as illustrated in the structured data 33 in Figure 8, the leader line C2 in Figure 10A, and the text attribute Tb in Figure 11. The display position of each text Ta reflects the text structure of the electronic document Dc, such as line breaks between sections and chapters. On the other hand, the display form of each text Ta also reflects the text structure of the electronic document Dc, such as the font size in section titles and chapter titles.
[0205] Therefore, by dividing the document data 31 into multiple text blocks Bl based on such text structure, a more accurate classification can be performed that reflects the actual section and chapter structure in the electronic document Dc. This contributes to improving the accuracy of classifying text Ta into each text block Bl.
[0206] Furthermore, as illustrated in step S52 of Figure 15, by dividing the electronic document Dc into multiple text blocks Bl, when processing the electronic document Dc with other document analysis AI (natural language processing model 202), it becomes possible to input the data in units of text blocks Bl rather than inputting it page by page into the natural language processing model 202. This makes it possible to make even electronic documents Dc with large data sizes suitable for various processing (e.g., LLM) using the natural language processing model 202.
[0207] Furthermore, as illustrated by the leader lines C11 and C12 in Figure 12, and the index data 35 in Figure 14A, the generating AI 201 outputs index data 35 representing the line number Tc of each text Ta that constitutes each text block Bl, instead of outputting the text body of each text block Bl.
[0208] This makes it possible to reduce the data size output from the generating AI201 and improve the classification speed of text Ta into text blocks Bl. This is particularly effective when processing a large number of electronic documents Dc with the generating AI201.
[0209] Furthermore, as illustrated in the structured data 33 in Figure 8, the leader line C2 in Figure 10A, and the text attribute Tb in Figure 11, the system prompt 203 input to the generating AI 201 includes a description of the input format of the structured data 33. This further improves the accuracy of the generating AI 201's classification into text blocks.
[0210] Furthermore, as shown in Figure 11, by using both the position information Tb1 and font information Tb2 for each text Ta, the classification accuracy of the generated AI 201 into text blocks Bl can be improved compared to using only one of them.
[0211] Furthermore, as illustrated in the structured data 33 in Figure 8, the leader line C2 in Figure 10A, and the text attribute Tb in Figure 11, by using the coordinate position of each text Ta, it is possible to perform processing that reflects the presence or absence of blank lines between texts Ta. This further improves the classification accuracy of the generated AI 201 into text blocks Bl.
[0212] Furthermore, as illustrated in the structured data 33 in Figure 8, the leader line C2 in Figure 10A, and the text attribute Tb in Figure 11, by using the font size of each text Ta, it is possible to perform processing that reflects the display manner of the title in each section or chapter. This further improves the classification accuracy of the generated AI 201 into text blocks.
[0213] Furthermore, as explained with reference to the leader line C3 in Figure 10A, by explicitly indicating in the system prompt 203 that the section or chapter structure of the electronic document Dc should be reflected, the generating AI 201 can be made to actively estimate the section or chapter structure. This further improves the accuracy of the generating AI 201's classification into text blocks Bl.
[0214] Furthermore, as explained with reference to the leader line C6 in Figure 10A, it becomes possible to assign a title to each text block Bl, further improving the usability when performing various operations based on each text block Bl.
[0215] Furthermore, as explained with reference to step S32 in Figure 9, the CPU 3 acquires index data 35 using two methods depending on the document structure of the electronic document Dc. By using the rule-based estimation model 206, it is possible to achieve more accurate classification for documents such as patent documents, where the format of the electronic document Dc is clearly defined. On the other hand, for documents where the format is not clearly defined, it is possible to achieve more versatile classification by using the generation AI 201.
[0216] Furthermore, as explained with reference to step S21 in Figure 7, if the file format is HTML, structured data 33 is generated based on the source code of the electronic document Dc. This makes it possible to generate more appropriate structured data 33 without using OCR processing or the like.
[0217] Furthermore, as illustrated by the leader lines C11 and C12 in Figure 12, and leader line C13 in the same figure, by using different output formats for table text Dt and other text Ta, it becomes possible to process table text Dt and text Ta, which corresponds to the main body of electronic document Dc, separately. This improves the usability of each text block Bl.
[0218] Furthermore, as illustrated by the leader line C13 in Figure 12, outputting the table text Dt in Markdown format allows for more appropriate differentiation between the table text Dt and the text Ta, which corresponds to the main body of the electronic document Dc. This improves the usability of each text block Bl.
[0219] <5. Other Embodiments> Furthermore, although the above embodiment shows an example in which a document analysis device is configured with one computer 1, this disclosure is not limited to that example. The document analysis method, document analysis device, and document analysis program 21 according to this disclosure may be executed using multiple computers 1, for example, by having a first computer execute some of the processing while a second computer executes the remaining processing. In addition, the computer 1 in this disclosure also includes parallel computers such as supercomputers and PC clusters. Each computer 1 may be equipped with multiple CPUs 3, and it is not necessary to have all processing executed by the same CPU 3.
[0220] Furthermore, the screen on which the visualized information can be displayed is not limited to the display screen on computer 1's display 9. Scatter plots and the like may be displayed on a screen prepared separately from computer 1. In other words, the "display unit" in this disclosure only needs to be connected to the CPU 3, and it is not necessary for it to be part of computer 1.
[0221] Furthermore, it is not mandatory to implement the generative AI 201 and the natural language processing model 202 outside of computer 1. The functions performed by these generative AIs may be executed by computer 1. Moreover, it is not mandatory to classify the generative AIs into two categories. A single generative AI may perform multiple types of processing. [Explanation of symbols]
[0222] 1. Computer (document analysis device) 3 CPU (arithmetic unit) 7a RAM (storage unit) 7b SSD (storage unit) 7c Storage device (storage unit) 9. Display (Display Unit) 13 Reception Department 13a Keyboard 13b Mouse 17 Storage medium 19 GPU 21 Document Analysis Program 23 Text block generation program 25 Electronic Document Visualization Program 31 Document Data 33. Structured Data (Data 1) 35 Index data (second data) 37 Prompt data 201 Generation AI 202 Natural Language Processing Models 203 System prompt (prompt) DC Electronic Documents Bl Text Block Ta Text Tb Text Attributes Tc Line number (identification information)< / italics> < / size> < / page>
Claims
1. A document analysis method that analyzes an electronic document composed of document data containing multiple texts by using a computer having a processing unit, The calculation unit generates and outputs first data based on the electronic document, associating text attributes that characterize at least one of the display position and display form of each of the plurality of texts on the electronic document, text corresponding to the text attributes, and identification information for identifying the text on the electronic document. The calculation unit then generates the AI, Accepting the aforementioned first data as input, The input format of the aforementioned first data, With respect to the document data which is divided into multiple text blocks by referring to the first data, the breakdown of the text belonging to each of the multiple text blocks is output as second data represented by the identification information associated with the text, Enter a prompt that includes: The calculation unit inputs the first data to the generating AI, thereby acquiring the second data via the generating AI. The calculation unit selects the text by referring to the first data, and combines the selected text in an order based on the identification information, thereby forming and outputting at least one of the plurality of text blocks as a sentence. A document analysis method characterized by the following features.
2. In the document analysis method described in claim 1, The calculation unit uses the following as the input format for the first data: The first data has, as text attributes, position information and font information for each of the multiple texts in the electronic document, The first data has text corresponding to the text attribute, The prompt includes the information that the first data has the line number of the text in the electronic document as the identification information, and this is input to the generating AI. A document analysis method characterized by the following features.
3. In the document analysis method described in claim 2, The aforementioned location information includes the vertical and horizontal coordinate positions of each of the multiple texts on each page of the electronic document. A document analysis method characterized by the following features.
4. In the document analysis method described in claim 2, The font information includes at least one of the following for each of the multiple texts on each page of the electronic document: font size, font color, whether or not it is bolded, and whether or not it is italicized. A document analysis method characterized by the following features.
5. In the document analysis method described in claim 1, The aforementioned multiple text blocks are constructed to reflect the section or chapter structure of the electronic document. The calculation unit inputs to the generating AI the instruction to divide the document data into sections or chapters, including this instruction in the prompt. A document analysis method characterized by the following features.
6. In the document analysis method described in claim 5, The calculation unit inputs to the generating AI the instruction to estimate the section title or chapter title of each of the plurality of text blocks, including this instruction in the prompt. A document analysis method characterized by the following features.
7. In the document analysis method described in claim 5, The calculation unit determines whether the document structure of the electronic document is known or not. The aforementioned arithmetic unit, If the aforementioned sentence structure is known, the first data is input into a rule-based estimation model, and the second data is obtained through the estimation model. If the aforementioned document structure is unknown, the first data is input to the generating AI, and the second data is obtained via the generating AI. A document analysis method characterized by the following features.
8. In the document analysis method described in claim 7, The calculation unit determines whether the electronic document is a patent document or not, If the calculation unit determines that the electronic document is a patent document, it determines that the document structure is known. A document analysis method characterized by the following features.
9. In the document analysis method described in claim 1, The aforementioned electronic document file formats include PDF and HTML. The calculation unit generates and outputs the first data based on the source code of the electronic document if the file format is HTML format. A document analysis method characterized by the following features.
10. In the document analysis method described in claim 1, The aforementioned plurality of texts include table text that shows strings written in a table in the electronic document, The plurality of text blocks include text blocks corresponding to the table text, The calculation unit inputs to the generating AI, including in the prompt, that the text block corresponding to the table text should be excluded from the output using the row number in the second data. A document analysis method characterized by the following features.
11. In the document analysis method described in claim 10, The calculation unit inputs the prompt to the generating AI to include, for the text block corresponding to the table text, text representing the table text in Markdown format in the second data, instead of using the identification information. A document analysis method characterized by the following features.
12. A document analysis device that analyzes electronic documents composed of document data containing multiple texts by using a computer having a calculation unit, A means for generating and outputting first data based on the aforementioned electronic document, which associates text attributes that characterize at least one of the display position and display form of each of the plurality of texts on the electronic document, text corresponding to the text attribute, and identification information for identifying the text on the electronic document. To the generation AI, Accepting the aforementioned first data as input, The input format of the aforementioned first data, With respect to the document data which is divided into multiple text blocks by referring to the first data, the breakdown of the text belonging to each of the multiple text blocks is output as second data represented by the identification information associated with the text, A means of entering a prompt that includes, By inputting the first data into the generating AI, a means of acquiring the second data via the generating AI is provided. The system includes means for selecting the text by referring to the first data and combining the selected text in an order based on the identification information to output at least one of the plurality of text blocks as a sentence. A document analysis device characterized by the following features.
13. A document analysis program that analyzes an electronic document composed of document data containing multiple texts, by having it run on a computer having a processing unit, To the aforementioned computer, The calculation unit generates and outputs first data based on the electronic document, which associates text attributes that characterize at least one of the display position and display form of each of the plurality of texts on the electronic document, text corresponding to the text attributes, and identification information for identifying the text on the electronic document. The calculation unit then generates the AI, Accepting the aforementioned first data as input, The input format of the aforementioned first data, With respect to the document data which is divided into multiple text blocks by referring to the first data, the breakdown of the text belonging to each of the multiple text blocks is output as second data represented by the identification information associated with the text, The process of entering a prompt that includes, The calculation unit inputs the first data to the generating AI, and the process of acquiring the second data via the generating AI is as follows: The calculation unit performs a process of selecting the text by referring to the first data and combining the selected text in an order based on the identification information to output at least one of the plurality of text blocks as a sentence. A document analysis program characterized by the following features.
14. It stores the document analysis program described in claim 13. A computer-readable storage medium characterized by the following features.
Citation Information
Patent Citations
Method and system for identifying field label on form
JP2024009774A