Text conversion system, program, and text conversion method

JP2026165580APending Publication Date: 2026-10-14HITACHI LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025058037
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2026-10-14

AI Technical Summary

Benefits of technology

【0014】 本発明の少なくとも一態様によれば、オブジェクトを含む文書であって、テキストへの適切な変換形式が明白でないドキュメントにおけるオブジェクト部分を、適切に文章に変換できるようになる。 上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026165580000001_ABST
    Figure 2026165580000001_ABST
Patent Text Reader

Abstract

To enable the proper conversion of object portions in documents containing objects, where the appropriate conversion format to text is not readily apparent, into text. [Solution] A document conversion device 20 according to one aspect of the present invention comprises: a table extraction unit 103 that extracts tables from a domain document containing tables and calculates the feature quantities of the tables; a cluster analysis unit 104 that classifies tables into clusters by performing cluster analysis based on the feature quantities; a document template assignment unit 106 that assigns document templates, which are information that assists in generating text that explains the contents of the tables, to the classified clusters; and a document conversion unit 107 that generates text that explains the contents of the tables classified into clusters using the document templates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a text conversion system, a program, and a text conversion method.

Background Art

[0002] In recent years, generative AI (Artificial Intelligence) that has extensive knowledge and can appropriately respond by understanding user instructions, questions, and the like has begun to be utilized. Among them, LLM (Large Language Model) is a generative AI that uses text as its main input and output modality, and is expected to support many tasks in business settings such as text-based document summarization, translation, chatbots, and draft text generation.

[0003] However, in business settings, LLMs are required to perform outputs corresponding to the business domain, for example, domains of industries such as finance and distribution, and outputs that reflect knowledge specific to a particular company or product. In addition, LLMs are sometimes expected to output in the format assumed by the task.

[0004] As described above, as a method for enabling outputs corresponding to domain-specific tasks, there is known a method of improving the response accuracy of an LLM by using, in addition to a general-purpose LLM, a document specialized for a specific domain (hereinafter also referred to as a "domain document") prepared in advance. As such methods, for example, methods such as RAG (Retrieval-Augmented Generation), CPT (Continual Pre-training), and SFT (Supervised Fine-Tuning) are known.

[0005] RAG is a method that selects documents (domain documents) related to a user's input from a search database based on the information input to the general-purpose LLM, and adds the selected information as context information to the input to the general-purpose LLM.

[0006] CPT is a method that constructs a domain-specific LLM by performing additional training on a general-purpose LLM using domain documents, and then uses the constructed domain-specific LLM as an inference model. SFT is a technique that prepares expected outputs for each input and learns based on the information of pairs of inputs and expected outputs.

[0007] To accurately address domain-specific tasks using the methods described above, it is necessary to prepare domain documents. Domain documents include a large number of open documents deeply related to the domain, as well as internally managed blueprints, reports, emails, meeting minutes, etc. However, if a general-purpose LLM is one that handles only text as input / output modals, then domain documents must also be generated in text format.

[0008] However, domain documents tend to contain many non-text elements (objects), such as figures and tables. Therefore, in order to make use of domain documents that contain objects, it is necessary to convert the objects within the document into text format.

[0009] For example, Patent Document 1 discloses a data structure conversion system that converts tabular data into a structured document containing a structure in which multiple rows of the tabular data are grouped together, by grouping repeating items contained in the tabular data. [Prior art documents] [Patent Documents]

[0010] [Patent Document 1] Japanese Patent Publication No. 2008-90500 [Overview of the project] [Problems that the invention aims to solve]

[0011] However, while Patent Document 1 discloses a method for converting tabular data into an XML document, it does not describe what to do if the document to be converted is a domain document. Furthermore, when a domain document containing objects such as tables is used as input, Patent Document 1 does not describe what format of text is desirable in order to enable efficient learning of a generative AI such as a general-purpose LLM.

[0012] This invention has been made in consideration of the above circumstances, and its object is to enable the appropriate conversion of object portions in a document containing objects, where the appropriate conversion format to text is not obvious, into text. [Means for solving the problem]

[0013] A document conversion system according to one aspect of the present invention causes a processor to perform the following: an object extraction process that extracts objects from a document containing objects and calculates the feature quantities of the objects; a cluster analysis process that classifies the objects into clusters by performing cluster analysis based on the feature quantities; a document template assignment process that assigns document templates, which are information that assists in generating text that describes the content of the objects, to the classified clusters; and a document generation process that generates text that describes the content of the objects classified into clusters using the document templates. [Effects of the Invention]

[0014] According to at least one aspect of the present invention, the object portion of a document containing objects, where a suitable conversion format to text is not obvious, can be appropriately converted into text. Other issues, configurations, and effects not mentioned above will be clarified by the following description of the embodiments. [Brief explanation of the drawing]

[0015] [Figure 1]FIG. 2 is a block diagram illustrating a schematic configuration example of a document analysis system according to an embodiment of the present invention. [Figure 2] FIG. 3 is a block diagram illustrating a functional configuration example of a text conversion apparatus according to an embodiment of the present invention. [Figure 3] FIG. 4 is a diagram illustrating a configuration example of a domain document DB according to an embodiment of the present invention. [Figure 4] FIG. 5 is a diagram illustrating a configuration example of a table extraction DB according to an embodiment of the present invention. [Figure 5] FIG. 6 is a diagram illustrating a configuration example of a cluster DB according to an embodiment of the present invention. [Figure 6] FIG. 7 is a diagram illustrating a configuration example of a text generation template according to an embodiment of the present invention. [Figure 7] FIG. 8 is a diagram illustrating a configuration example of a description DB according to an embodiment of the present invention. [Figure 8] FIG. 9 is a diagram illustrating a configuration example of a text generation template setting screen displayed on an output unit according to an embodiment of the present invention. [Figure 9] FIG. 10 is a flowchart illustrating an example of a procedure of domain document management processing according to an embodiment of the present invention. [Figure 10] FIG. 11 is a flowchart illustrating an example of procedures of table extraction processing and cluster analysis processing according to an embodiment of the present invention. [Figure 11] FIG. 12 is a flowchart illustrating an example of a procedure of text generation template assignment processing according to an embodiment of the present invention. [Figure 12] FIG. 13 is a flowchart illustrating an example of a procedure of text generation conversion processing according to an embodiment of the present invention. Description of Embodiments

[0016] Hereinafter, examples of modes for carrying out the present invention (hereinafter referred to as "embodiments") will be described with reference to the accompanying drawings. The present invention is not limited to the embodiments, and various numerical values and the like in the embodiments are illustrative. In addition, in the present specification and the drawings, the same reference numerals are assigned to the same components or components having substantially the same functions, and duplicate descriptions are omitted.

[0017] <Configuration of Document Analysis System> First, the configuration of a document analysis system 1 according to an embodiment of the present invention will be described with reference to Figure 1. Figure 1 is a block diagram showing an example of a schematic configuration of the document analysis system 1.

[0018] As shown in Figure 1, the document analysis system 1 (an example of a text conversion system) includes an input / output device 10, a text conversion device 20, a model learning device 40, and an inference device 50. The text conversion device 20, the model learning device 40, and the inference device 50 are communicably connected to each other via a network 20. The network 20 can be configured by, for example, an in-house LAN (Local Area Network), but may also be configured by a WAN (Wide Area Network) or other networks.

[0019] The input / output device 10 includes an input unit 11 and an output unit 12. The input unit 11 is configured with, for example, a mouse, a keyboard, or the like, and outputs the content of the operation input by the user to the text conversion device 20. The output unit 12 is configured with, for example, an LCD (Liquid Crystal Display) or the like, and displays a textification template setting screen Sc1 (see Figure 8) and the like, which will be described later.

[0020] The text conversion device 20 is a device that converts a domain document including objects such as tables into a document composed only of text (hereinafter referred to as a "textualized domain document"), and transmits the converted textualized domain document to the model learning device 40. In the following, an example is given in which the object included in the domain document is a table. In the present embodiment, it is assumed that the text conversion device 20 is configured by a personal computer loaded with functions described later implemented as software, but the present invention is not limited thereto. For example, the text conversion device 20 may be provided in the form of a cloud service in which software exists on a network and is utilized remotely.

[0021] The document conversion device 20 first extracts tables from the domain document and classifies each extracted table into clusters. Then, the document conversion device 20 displays the cluster classification results on the screen of the output unit 12 of the input / output device 10 and assigns the document template selected by user U based on the cluster classification results to the corresponding cluster.

[0022] A description template is supplementary information that helps generate text that represents the contents of a table (hereinafter also referred to as "description"). For example, a description template might say, "The string length for <item> is <string length>. The OS <os>In this case, the installation folder for <item> will be <installation folder>. This value can be changed. The text consists of phrases such as "The text in the document template is generated by user U and is entered via the document template settings screen Sc1 shown in Figure 8 below.

[0023] The text conversion device 20 then uses the text template selected by user U to generate a description for each table, which is an element of the cluster, describing the contents of the table. The text conversion device 20 then generates a text in which the contents of the tables have been replaced with descriptions, that is, a textualized domain document that describes the entire domain document in text, and outputs it to the model learning device 40 via the network 30.

[0024] The model learning device 40 is a device that takes general-purpose LLMs and documented domain documents as input and outputs domain-specific LLMs, and is composed of, for example, a general-purpose server PC (Personal Computer). The model learning device 40 includes, for example, a program (not shown) that performs additional pre-training on the general-purpose LLM. Additional pre-training is implemented by, for example, CPT or SFT. If the model learning device 40 is composed of, for example, CPT, the model learning device 40 performs additional pre-training using documented domain documents input from the document conversion device 20 as CPT data.

[0025] If the model learning device 40 is configured as an SFT, the model learning device 40 performs additional pre-training using information on pairs of document domain documents and expected output data. Examples of combinations of relevant documents and output data include, for example, a combination of a customer question in a call center and the actual answer given by an operator to that question.

[0026] The inference device 50 is a device that performs inference using a domain-specific LLM generated by additional pre-training and outputs the inference result.

[0027] <Configuration of the text conversion device> Next, the configuration of the text conversion device 20 will be described with reference to Figure 2. Figure 2 is a block diagram showing an example of the functional configuration of the text conversion device 20. As shown in Figure 2, the text conversion device 20 comprises an arithmetic unit 100, a communication interface 110, an input / output interface 120, and a storage device 130.

[0028] The computing unit 100 comprises a control unit 101, a domain document management unit 102, a table extraction unit 103, a cluster analysis unit 104, a display control unit 105, a document template assignment unit 106, and a document conversion unit 107.

[0029] The control unit 101 includes a CPU (Central Processing Unit) 111, a ROM (Read Only Memory) 112, and a RAM (Random Access Memory) 113.

[0030] The CPU 111 (an example of a processor) reads the program code of various programs that implement each function according to this embodiment from the storage device 130, loads it into the RAM 113, and executes it. Variables and parameters that occur during the calculation process are temporarily written to the RAM 113.

[0031] The control unit 101 may also be equipped with a processing unit such as an MPU (Micro-Processing Unit), GPU (Graphics Processing Unit), or NPU (Neural Processing Unit) instead of the CPU 111. Alternatively, these processing units may be used in combination within the control unit 101.

[0032] When a user U uploads a new domain document via the input unit 11 (see Figure 1), the domain document management unit 102 executes the domain document management program 131 in the storage device 130, thereby adding the uploaded domain document to the domain document database 136 in the storage device 130.

[0033] The table extraction unit 103 (an example of an object extraction unit) extracts table portions from the input domain document by executing the table extraction program 132 in the storage device 130. The table extraction unit 103 then calculates the feature quantities of the extracted table and stores the information of the calculated feature quantities in the table extraction DB 138 in the storage device 130. The table extraction unit 103 represents the table feature quantities as feature vectors of arbitrary size.

[0034] Each element of the feature vector may include, for example, the size of the table, the length of the table, the number of rows, the number of columns, the width of a specific row, the height of a specific column, the number of header characters in a specific row, the number of header characters in a specific column, or the first dimension of an embedding vector obtained by transforming the header string of a specific row or column using an arbitrary embedding model. Alternatively, each element of the feature vector may be the variation of the cell values ​​in each column of the table, the character type, or the statistical values ​​of the feature vector for each row or column. The statistical values ​​of the feature vector may include the mean, variance, maximum, and minimum. The table extraction process by the table extraction unit 103 will be described later with reference to Figure 10.

[0035] In this embodiment, an example was given in which the object extracted from the domain document is a table, but the present invention is not limited to this. The object may also be a figure or an image. If the object includes a figure or an image, the document conversion unit 107 can be configured with a multimodal LLM or the like that can handle information other than text.

[0036] The cluster analysis unit 104 executes the cluster analysis program 133 on the storage device 130, performing cluster analysis based on the table features extracted by the table extraction unit 103, and classifying the tables into clusters. The cluster analysis unit 104 then stores the cluster information in the cluster DB 139 on the storage device 130.

[0037] The cluster analysis unit 104 classifies features into clusters using methods such as hierarchical cluster analysis using the nearest neighbor method. For features, the cluster analysis unit 104 defines distances by combining Euclidean distance for numerical variables, Dice coefficients for categorical variables, and Levenshtein distance for strings, and performs distance-based hierarchical clustering.

[0038] The threshold values ​​used in cluster analysis can be those set by user U using the clustering threshold adjustment bar 305 in Figure 8. The cluster analysis process performed by the cluster analysis unit 104 will be described later with reference to Figure 10.

[0039] The display control unit 105 executes the display control program 134 of the storage device 130 to display the document template setting screen Sc1 (see Figure 8) on the output unit 12. The display control unit 105 also outputs the content of the operations entered on the document template setting screen Sc1 to the control unit 101.

[0040] The document template assignment unit 106 executes the document template assignment program 135 on the storage device 130, associates the document template selected on the document template setting screen Sc1 with a cluster, and stores the correspondence information between the two in the document template DB 140 on the storage device 130.

[0041] The text conversion unit 107 (an example of a text generation unit) generates a description, that is, a text describing the contents of a table, by executing the generation subprogram 136 of the storage device 130. More specifically, it takes a text template, the contents of a table stored in table DB 138, and common instructions as input and generates a description for each cluster in which the table is classified. Common instructions include, for example, instructions such as "Generate a text that completely describes the contents of the table shown below in text, following the instructions in the text template shown below."

[0042] Furthermore, the text conversion unit 107 generates a text-based domain document in which the table portion is replaced with a description, that is, a text-based domain document in which the entire domain document is represented by text, and transmits the generated text-based domain document to the model learning device 40 via the network 30.

[0043] The communication interface 110 uses a NIC (Network Interface Card) or the like, and transmits and receives various types of data between it and the model learning device 40 and the inference device 50 via the network 30 (see Figure 1).

[0044] The input / output interface 120 is connected to cables (not shown) that are connected to the input section 11 and output section 12 interfaces of the input / output device 10, and transmits and receives various types of data between it and the input section 11 or output section 12.

[0045] For example, the storage device 130 can be an HDD (Hard Disk Drive), SSD (Solid State Drive), flexible disk, optical disk, magneto-optical disk, CD-ROM, CD-R, or non-volatile memory card. This storage device 130 stores the OS (Operation 1 System), various parameters, various programs for operating the document conversion device 20, and various databases. The programs may also be stored in the ROM 112.

[0046] The program is stored in the form of computer-readable program code, and the CPU 111 sequentially executes operations according to that program code. In other words, the ROM 112 or storage device 130 is used as an example of a computer-readable, non-transient recording medium that stores a program executed by the computer.

[0047] Furthermore, the storage device 130 stores the following programs: a domain document management program 131, a table extraction program 132, a cluster analysis program 133, a display control program 134, a document template assignment program 135, and a generation subprogram 136.

[0048] The domain document management program 131 is a program that adds domain documents uploaded by user U to the domain document DB 136. The table extraction program 132 is a program that extracts a table (an example of an object) from a domain document, calculates the feature quantities of the extracted table, and stores the information of the calculated table feature quantities in the table extraction DB 138.

[0049] The cluster analysis program 133 is a program that classifies tables into clusters (cluster analysis) based on the feature information of the tables stored in the table extraction DB 138, and stores the classification results in the cluster DB 139. The display control program 134 is a program that displays the document template setting screen Sc1 (see Figure 8) on the output unit 12 and outputs the content of the operations entered on the document template setting screen Sc1 to the control unit 101.

[0050] The document template assignment program 135 is a program that stores the correspondence information between the document template selected on the document template setting screen Sc1 and the cluster in the document template DB 140 of the storage device 130. The generation subprogram 136 is a program that creates a documentary domain document by describing the contents of a table in text and replacing the table portion with the created description.

[0051] Furthermore, the storage device 130 stores the domain document DB 137, the table extraction DB 138, the cluster DB 139, the document template DB 140, and the description DB 141.

[0052] Domain Document DB137 is a database that manages the content of domain documents and the update date and time of domain documents, associating them with the domain document identifier. An example of the configuration of Domain Document DB137 will be described later with reference to Figure 3.

[0053] Table Extraction DB138 is a database that manages the location of tables in domain documents, the content of tables, and the feature quantities of tables, associating them with table identifiers. An example of the configuration of Table Extraction DB138 will be described later, referring to Figure 4.

[0054] Cluster DB139 is a database that manages information from cluster analysis results, associating it with cluster identifiers. An example configuration of Cluster DB139 will be described later, referring to Figure 5.

[0055] The Document Template DB140 is a database that manages document templates and their update date and time information, associating them with the identifiers of the document templates. An example of the configuration of the Document Template DB140 will be described later with reference to Figure 6.

[0056] Description DB141 is a database that manages descriptions and their update date and time information, associating them with table identifiers. An example configuration of Description DB141 will be described later, referring to Figure 7.

[0057] <Domain Document Database Configuration> Next, we will describe the configuration of the domain document DB137 with reference to Figure 3. Figure 3 is a diagram showing an example of the configuration of the domain document DB137. As shown in Figure 3, the domain document DB137 has the following items: "Domain Document ID", "Domain Document Content", and "Update Date and Time".

[0058] The "Domain Document ID" field stores information about the Domain Document ID, which is a unique identifier that can identify each domain document. The "Domain Document Content" field stores the content of the domain document. The "Update Date and Time" field stores information about the date and time when the domain document was created, added, or updated. Adding a domain document to the domain document DB137 occurs when the upload button 302 on the document template settings screen Sc1 (see Figure 8) is pressed.

[0059] <Configuration of the table extraction database> Next, we will explain the configuration of the table extraction DB138 with reference to Figure 4. Figure 4 is a diagram showing an example of the configuration of the table extraction DB138. As shown in Figure 4, the table extraction DB138 has the following items: "Table ID", "Location within the document", "Table content (HTML, etc.)", and "Features".

[0060] The "Table ID" field stores information about the Table ID, which is a unique identifier that can identify each table. The "Location within Document" field stores information indicating the table's location within the domain document. Specifically, the "Location within Document" field stores the domain ID managed by domain document DB137, and the start and end positions of the table within the domain document. The start and end positions of the table within the domain document are indicated by the number of characters from the beginning of the domain document, etc.

[0061] The "Table Contents" field stores the information of the table itself, extracted by the table extraction unit 103. The table information is presented in a format such as HTML.

[0062] The "Features" field stores information about the table features represented by the feature vectors calculated by the table extraction unit 103.

[0063] <Cluster DB Configuration> Next, we will explain the configuration of cluster DB139 with reference to Figure 5. Figure 5 is a diagram showing an example configuration of cluster DB139. As shown in Figure 5, cluster DB139 has the following items: "Cluster ID", "Score", and "Table ID and Subcluster ID".

[0064] The "Cluster ID" field stores information about the cluster ID, which is a unique identifier that can identify each cluster to which the table is classified. The "Score" field stores information about the score at which the cluster is formed. If the cluster analysis method is hierarchical cluster analysis using the nearest neighbor method, the "Score" field stores information about the distance between clusters.

[0065] The "Table ID and Subcluster ID" field stores information such as the table ID of the table classified in that cluster and the subcluster ID assigned to the subclusters of that cluster. Figure 5 shows that the subclusters of cluster ID "C001" are the table with table ID "T001" and the table with table ID "T004", and that the subclusters of cluster ID "C004" are the cluster with cluster ID "C001" and the cluster with cluster ID "C003".

[0066] In this way, by managing the hierarchical relationships between clusters and tables, clusters and tables can be represented by a tree diagram, as shown in the clustering result display area 304 of the document template setting screen Sc1 in Figure 8. Furthermore, by representing clusters and tables by a tree diagram, the size of the threshold used for clustering classification can be adjusted by changing the height of the threshold adjustment bar 305, which is positioned across the tree diagram.

[0067] <Configuration of the document template database> Next, with reference to Figure 6, the configuration of the document template DB140 will be described. Figure 6 is a diagram showing an example of the configuration of the document template DB140. As shown in Figure 6, the document template DB140 has the following items: "Cluster ID", "Document Template", and "Last Updated Date and Time".

[0068] The "Cluster ID" field stores the cluster ID information of the cluster associated with the document template in the document template settings screen Sc1 (see Figure 8). The "Document Template" field stores the content of the document template. The "Last Updated" field stores the last date and time when the document template was generated or updated.

[0069] <Description DB Configuration> Next, the configuration of Description DB141 will be explained with reference to Figure 7. Figure 7 shows an example of the configuration of Description DB141. As shown in Figure 7, the description DB141 has the following items: "Table ID", "Description", and "Last Updated Date and Time". The "Table ID" field stores the table ID information of the table described by the description generated by the text conversion unit 107. The "Description" field stores the textual description of the table's contents. The "Last Updated" field stores information about the last time the description was created or updated.

[0070] <Configuration of the document template settings screen> Next, the configuration of the document template settings screen Sc1 will be explained with reference to Figure 8. Figure 8 is a diagram showing an example of the configuration of the document template settings screen Sc1 displayed in the output unit 12. As shown in Figure 8, the document creation template setting screen Sc1 includes an upload target domain document selection section 301, an upload button 302, and a domain document display area 303. The document creation template setting screen Sc1 also includes a clustering result display area 304, a threshold adjustment bar 305, a document creation template display area 306, and a document creation execution button 308.

[0071] The domain document selection section 301 for uploading is the area where user U selects the domain documents that they want to upload from their local PC to the domain document DB 137. Figure 8 shows the state where the domain document file "Abc.pdf" has been selected.

[0072] The upload button 302 is a button that instructs the upload of the domain document selected in the domain document selection unit 301 to the domain document DB 137. When this button is pressed, the selected domain document is uploaded (saved) to the domain document DB 137.

[0073] The domain document display area 303 (an example of a document display area) is the area where the image of the domain document selected in the domain document selection unit 301 for uploading is displayed. Since the image of the domain document also includes tables contained in the domain document, user U can devise the content of the document template while checking this image.

[0074] The clustering result display area 304 (an example of a cluster analysis result display area) is an area where the results of the cluster analysis performed by the cluster analysis unit 104 are shown in a tree diagram. Figure 8 shows that "Table 1" and "Table 4" are classified into cluster "C001", "Table 3", "Table 2", and "Table 5" are classified into cluster "C002", and "Table 6" is classified into cluster "C003".

[0075] The threshold adjustment bar 305 (an example of a threshold adjustment user interface) is a bar in the clustering result display area 304 that allows you to change the height of the threshold, indicated by a dashed horizontal bar. For example, the left direction of the bar corresponds to decreasing the threshold, and the right direction corresponds to increasing the threshold. The height direction of the tree diagram shown in Figure 8 corresponds to the cluster score, so increasing or decreasing the threshold changes the score values ​​that form the clusters.

[0076] For example, by sliding the threshold adjustment bar 305 to the left to lower the threshold (score), the cluster to which the table is classified also changes. For instance, if the threshold is lowered to the point where the branches of the tree diagram diverge between "Table 3" and "Table 2," the cluster to which "Table 3" is classified will be different from the cluster to which "Table 2" is classified. User U can change (adjust) the granularity of the clusters associated with the document template by operating the threshold adjustment bar 305 while checking the display content in the clustering result display area 304.

[0077] Although Figure 8 shows an example where there is only one threshold adjustment bar 305, the present invention is not limited to this. For example, a threshold adjustment bar may be provided individually for each of the broadly classified clusters. By providing multiple threshold adjustment bars, the cluster analysis unit 104 can classify the tables into clusters more appropriately. In other words, it is possible to prevent situations where the classification into clusters is too fine, resulting in the generation of multiple similar clusters, or where the classification is too coarse, resulting in tables with vastly different feature quantities being classified into the same cluster.

[0078] The document template display area 306 associates each cluster displayed in the clustering result display area 304 with an input field for the document template and a document template generation button 307.

[0079] The input field for the document template will contain the text of the document template devised by user U. The document template generation button 307 (an example of a user interface for generating instructions) is a button for instructing the generation of a document template. When the document template generation button 307 is pressed, the document template assignment unit 106 extracts tables belonging to the cluster from the cluster DB 139 and extracts the contents of the extracted tables from the table extraction DB 138. Then, the document template assignment unit 106 inputs the extracted contents along with instructions to a generation AI (not shown), causing the generation AI to generate a document template.

[0080] Instructions can be composed of sentences like the following (Example Instruction 1, Example Instruction 2), for example. (Example of instruction 1) "Based on the headers of the N tables shown below, output a command statement that specifies the method and output format for converting the contents of those tables into text."

[0081] (Example of instruction sentence 2) "Generate a prompt instructing the user to refer to one or more of the following CSV tables and write down the contents of each table using the provided document template." (First table in CSV format) (Second table in CSV format) : (Table N in CSV format)

[0082] The generating AI may be implemented by equipping the text conversion unit 107 of the text conversion device 20 with a generating AI model and an inference program, or it may be located in the inference device 50 or in a server (not shown) accessible via the network 30. If the generating AI is located in a server (not shown), the text template assignment unit 106 can request the server to generate a text template using methods such as API (Application Program Interface) calls.

[0083] The document generation execution button 308 is a button that causes the generation subprogram 136 to execute the process of generating a description using a document generation template, and the process of generating a document domain document in which the table portion has been replaced with the description.

[0084] <Domain Document Management Processing> Next, with reference to Figure 9, the domain document management process performed by the domain document management unit 102 will be described. Figure 9 is a flowchart showing an example of the procedure for domain document management.

[0085] First, the domain document management unit 102 determines whether or not the upload button 302 on the document template setting screen Sc1 (see Figure 8) has been pressed (step S1). If it is determined in step S1 that the upload button 302 has not been pressed (step S1 is NO), the determination in step S1 is repeated.

[0086] On the other hand, if it is determined in step S1 that the upload button 302 was pressed (step S1 is YES), the domain document management unit 102 reads the domain document selected by the domain document selection unit 301 for upload (step S2). Next, the domain document management unit 102 writes the read domain document to the domain document DB 137 (step S3). After the processing in step S3, the domain document management process ends.

[0087] Next, we will explain the table extraction process by the table extraction unit 103 (an example of object extraction processing) and the cluster analysis process by the cluster analysis unit 104. Figure 10 is a flowchart showing an example of the procedure for the table extraction process and the cluster analysis process.

[0088] First, the table extraction unit 103 determines whether or not a domain document has been added or updated in the domain document DB 137 (step S11). The table extraction program 132, which performs the table extraction process, is started, for example, immediately after the document conversion device 20 is started. If it is determined in step S11 that the domain document has not been updated (step S11 is NO), the table extraction unit 103 repeats the determination in step S11.

[0089] On the other hand, if it is determined in step S11 that a domain document has been added or updated (step S11 is YES), the table extraction unit 103 reads the added or updated domain document from the domain document DB 137 (step S12). Next, the table extraction unit 103 extracts the table portion from the added or updated domain document (step S13). Next, the table extraction unit 103 calculates the feature quantities of the extracted table and updates the table extraction DB 138 with the information of the calculated feature quantities (step S14).

[0090] Next, the table extraction unit 103 determines whether or not there are any tables remaining to be extracted in the domain document (step S15). If it is determined in step S15 that there are tables remaining (step S15 is YES), the table extraction unit 103 returns to step S13 and continues processing. On the other hand, if it is determined in step S15 that there are no tables remaining (step S15 is NO), it determines whether or not there are any domain documents among the added or updated domain documents for which the table extraction process has not yet been performed (step S16). If it is determined in step S16 that there are domain documents for which the table extraction process has not yet been performed (step S16 is YES), the table extraction unit 103 returns to step S12 and continues processing.

[0091] On the other hand, if it is determined in step S16 that there are no domain documents for which table extraction processing has not been performed (step S16 is NO), the cluster analysis unit 104 performs cluster analysis of the table based on the feature quantities calculated by the table extraction unit 103 and updates the cluster DB 139 with the information of the table's classification into clusters (step S17). After the processing in step S17, the table extraction unit 103 returns to step S11 and repeats the determination.

[0092] <Process for assigning a document template> Next, with reference to Figure 11, the document template assignment process by the document template assignment unit 106 will be described. Figure 11 is a flowchart showing an example of the procedure for the document template assignment process.

[0093] First, the document template assignment unit 106 determines whether or not the cluster DB 139 has been modified (step S21). The document template assignment program 135, which performs the document template processing, is started, for example, immediately after the document conversion device 20 is started. If it is determined in step S21 that the cluster DB 139 has not been updated (step S21 is NO), the document template assignment unit 106 repeats the determination in step S21.

[0094] On the other hand, if it is determined in step S21 that the cluster DB 139 has been modified (step S21 is YES), the document template assignment unit 106 retrieves the modified content (step S22). Next, the document template assignment unit 106 determines whether or not the document template setting screen Sc1 (see Figure 8) has been launched (step S23). If it is determined in step S23 that the document template setting screen Sc1 has not been launched, the document template assignment unit 106 repeats the determination in step S23.

[0095] On the other hand, if it is determined in step S23 that the document template setting screen Sc1 has been launched (step S23 is YES), the document template assignment unit 106 updates the display content of the clustering result display area 304 of the document template setting screen Sc1 with the content obtained in step S22 (step S24).

[0096] Next, the document template assignment unit 106 determines whether or not a document template has been entered into the document template display area 306 of the document template setting screen Sc1 (step S25). If it is determined in step S25 that a document template has been entered (step S25 is YES), the document template assignment unit 106 updates the document template DB 140 with the information of the entered document template (step S26). After processing in step S26, the document template assignment unit 106 returns to step S21 to make a determination.

[0097] On the other hand, if it is determined in step S25 that no document template has been entered (step S25 is NO), the document template assignment unit 106 determines whether or not the document template generation button 307 in the document template display area 306 has been pressed (step S27). If it is determined in step S27 that the document template generation button 307 has been pressed (step S27 is YES), the document template assignment unit 106 causes the unillustrated generation AI to generate a document template and updates the document template DB 140 with the generated document template (step S28). After processing in step S28, the document template assignment unit 106 returns to step S21 to make a determination.

[0098] On the other hand, if it is determined in step S27 that the document template generation button 307 was not pressed (step S27 is NO), the document template assignment unit 106 determines whether or not the document execution button 308 was pressed (step S29). If it is determined in step S29 that the document execution button 308 was pressed (step S29 is YES), the document template assignment unit 106 executes the generation program (step S30). If step S29 is determined to be NO, or after processing in step S30, the document template assignment unit 106 returns to step S21 to make a determination.

[0099] In actual business operations, domain documents may be added to or changed due to version upgrades, or there may be requests to apply existing document templates to other domain documents. In this case, existing document templates are already associated with existing domain documents.

[0100] In such cases, the table extraction unit 103 of the document conversion device 20 extracts tables from the added domain document and calculates feature quantities, and the cluster analysis unit 104 performs analysis based on the feature quantities. The document template assignment unit 106 can then assign document templates to the newly added clusters based on the cluster analysis. Through this operation, even when a domain document is added, the document template assignment unit 106 can assign document templates corresponding to the contents of tables contained in the domain document to the clusters associated with those tables.

[0101] <Text conversion process> Next, the text conversion process performed by the text conversion unit 107 will be explained with reference to Figure 12. Figure 12 is a flowchart showing an example of the procedure for the text conversion process. The text conversion process is performed when the text conversion execution button 308 (see Figure 8) on the text template setting screen Sc1 is detected to be pressed, and the text conversion unit 107 executes the generation subprogram 136.

[0102] First, the document conversion unit 107 selects one record from the table extraction DB 138 (step S41). Next, the document conversion unit 107 obtains a document template associated with the cluster to which the table described in the selected record belongs from the document template DB 140 (step S42). More specifically, in step S141, the document conversion unit 107 first identifies the cluster to which the table described in the selected record belongs by referring to the cluster DB 139. Then, the document conversion unit 107 obtains the cluster ID contained in the record that contains information about the identified cluster, and obtains a document template corresponding to the obtained cluster ID from the document template DB 140.

[0103] Next, the text conversion unit 107 determines whether the content of the acquired text template has changed since the previous text conversion process (step S43). If it is determined in step S43 that the content of the text template has not changed (step S43 is NO), the text conversion unit 107 returns to step S41 and continues processing.

[0104] On the other hand, if it is determined in step S43 that the content of the document template has changed (step S43 is YES), the document conversion unit 107 inputs the document template into the generation AI to generate a description, and updates the description DB 141 with the generated description (step S44).

[0105] Next, the document conversion unit 107 determines whether or not there are any unselected tables remaining (step S45). If it is determined in step S45 that there are any unselected tables remaining (step S45 is YES), the document conversion unit 107 returns to step S41 to process. On the other hand, if it is determined in step S45 that there are no unselected tables remaining (step S45 is NO), the document conversion unit 107 creates and outputs a document domain document, which is a domain document in which the table portion has been replaced with a description (step S46).

[0106] In the embodiment described above, a document template, which is information that assists in documenting the contents of a table, is assigned to each cluster in which the table is classified, so that the contents of tables in a domain document are properly documented. Furthermore, since the document template is assigned to each cluster in which the table is classified, rather than to each individual table, even if there are a large number of domain documents, the contents of tables in the domain documents can be properly documented without requiring any effort from the user.

[0107] In this embodiment, a documented domain document, in which the table portion is replaced with a description, is sent to the model generation device 40, where the documented domain document is used for pre-training using CPT or SFT, etc. Therefore, according to this embodiment, a domain-specific LLM tailored to the domain document can be generated with high accuracy, enabling appropriate handling of domain-specific tasks.

[0108] <Variation> In the embodiments described above, an example was given in which the document domain document output from the document conversion device 20 is used to generate a domain-specific LLM by the model learning device 40, but the present invention is not limited to this. For example, the document domain document output from the document conversion device 20 according to the present invention may be input to an inference device 50 that performs inference using RAG. As described above, RAG is a technique that improves the accuracy of the LLM's response by selecting documents related to user input based on information input to the general-purpose LLM, and adding the selected documents as contextual information to the input to the general-purpose LLM.

[0109] If the inference device 50 has RAG functionality, the model learning device 40 becomes unnecessary. The modified inference device 50 stores a general-purpose embedding model, a program that generates an embedding vector store from documented domain documents using the embedding model, and a program that performs inference on the general-purpose LLM and the embedding vector store using RAG (none of which are shown in the diagram). The embedding model is a model that converts input words and text into numerical vector representations (embedding representations). The embedding vector store is a database where embedding vectors are stored and where RAG searches are performed.

[0110] In this modified version, the document domain document generated by the document conversion device 20 is used in the inference device 50 to generate an embedded vector store and as a context to be attached to the general-purpose LLM. Therefore, this modified version can achieve effects such as improved search performance of RAG and improved accuracy of output from the general-purpose LLM.

[0111] The embodiments described above are intended to explain the configuration of the apparatus and system in detail and concretely in order to make the present invention easier to understand, and are not necessarily limited to those comprising all the configurations described.

[0112] Furthermore, the control lines or information lines indicated by solid arrows in Figure 1 are those deemed necessary for explanatory purposes and do not necessarily represent all control lines or information lines in the actual product. In reality, it can be assumed that almost all components are interconnected.

[0113] Furthermore, in this specification, processing steps describing chronological processing include not only processing performed chronologically in the order described, but also processing that is not necessarily performed chronologically but is executed in parallel or individually (for example, parallel processing or processing by objects). [Explanation of Symbols]

[0114] 1...Document analysis system, 10...Input / output device, 20...Text conversion device, 40...Model learning device, 50...Inference device, 102...Domain document management unit, 103...Table extraction unit, 104...Cluster analysis unit, 105...Display control unit, 106...Text template assignment unit, 107...Text conversion unit, 130...Storage device, 131...Domain document management program, 132...Table extraction program, 133...Cluster analysis program, 134...Display control program, 135...Text template assignment program, 136...Generation subprogram, 138...Table extraction DB, 139...Cluster DB, 140...Text template DB, 141...Description DB< / os>

Claims

1. In the processor, An object extraction process that extracts the object from a document containing the object and calculates the feature quantities of the object, A cluster analysis process is performed to classify the objects into clusters based on the aforementioned features, A document template assignment process is performed to assign a document template, which is information that assists in generating text describing the contents of the object, to the classified cluster. The process involves generating a document that uses the document template to generate a document that describes the contents of the objects classified into the cluster. Text conversion system.

2. In the object extraction process, objects included in the added document are extracted and their features are calculated. In the document template assignment process, a document template is assigned to the newly added clusters based on cluster analysis using the features. The text conversion system according to claim 1.

3. Further display control processing is performed to display a threshold adjustment user interface on the display unit's screen, which allows adjustment of the threshold used for cluster classification in the cluster analysis process. In the cluster analysis process, the threshold values ​​adjusted via the threshold adjustment user interface are used to classify the objects into clusters. The text conversion system according to claim 2.

4. The aforementioned screen is the document template settings screen where the document template is configured. The document template setting screen is provided with a cluster analysis results display area that displays the cluster classification results obtained from the cluster analysis process. The text conversion system according to claim 3.

5. The document template settings screen is provided with a document display area where an image of the document is displayed. The text conversion system according to claim 4.

6. The document template setting screen is provided with a document template input section that accepts input for the document template. The text conversion system according to claim 5.

7. The document template setting screen is provided with a user interface for instructing the AI ​​to generate the document template. The text conversion system according to claim 5.

8. The aforementioned generative AI is composed of a large-scale language model. The text conversion system according to claim 7.

9. In the aforementioned document generation process, the portion of the document containing the object is replaced with text that explains the content of the object, and a document is generated and output. The text conversion system according to claim 8.

10. On the computer, An object extraction procedure for extracting objects from a document containing objects and calculating the feature quantities of those objects, A cluster analysis procedure that classifies the objects into clusters by performing cluster analysis based on the aforementioned features, A procedure for assigning a document template to the classified cluster, which is information that assists in generating text describing the contents of the object, A document generation procedure is performed which generates a document describing the contents of the objects classified into the cluster using the document template. program.

11. Extract the object from the document containing the object, calculate the feature quantities of the object, By performing cluster analysis based on the aforementioned features, the objects are classified into clusters. A document template, which is information that assists in generating text describing the contents of the object, is assigned to the classified cluster. Using the aforementioned document template, generate a document that describes the contents of the objects classified into the cluster. Text conversion method.

Citation Information

Patent Citations

  • Data structure conversion system, program, and data structure

    JP2008090500A