Table texturizing method, device, equipment, medium and product
Patent Information
- Application Number
- CN202610993035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-30
AI Technical Summary
然而,文档中可能包括多模态的信息源,如文本、表格、图片等,当文档中包括表格时,难以准确的提取表格部分的知识
[0065]本公开实施例,结合章节中关联表格的文本信息对表格进行语义关联的文本化处理,一方面,因章节中关联表格的文本信息能提供更多的语义背景,因此通过该种方式,能提升表格文本化结果的准确性,即提升对表格部分知识提取的准确度,且能将离散的表格信息整合为与章节上下文关联的自然语言;另一方面,因本公开实施例还通过对表格的描述性文本进行质量评估,筛选满足预设质量条件的描述性文本作为表格的文本化结果,通过该种筛选方式,也能进一步提升表格文本化的精度。
Smart Images

Figure CN123013853A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, device, medium, and product for texturing tables. Background Technology
[0002] With the rapid development of Artificial Intelligence (AI) technology, using language models to automatically parse and extract knowledge from documents has become a core method for building applications such as intelligent question answering and knowledge retrieval. For example, for documents such as product manuals and project reports, language models can effectively integrate paragraphs to build a knowledge base that is easy to search, significantly improving information retrieval efficiency. However, documents may contain multimodal information sources, such as text, tables, and images. When a document contains tables, it is difficult to accurately extract knowledge from the table portion. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, medium, and product for texturing tables, which can improve the accuracy of the texturing results and the accuracy of extracting partial knowledge from tables.
[0004] The technical solution of this disclosure embodiment is implemented as follows:
[0005] This disclosure provides a method for texturing tables, including:
[0006] Determine the text information associated with the table in the chapter where the table is located; wherein, the text information includes at least one of the following: text in the chapter other than the table, and the table of contents corresponding to the chapter;
[0007] Based on the text information and the table information, the table is semantically associated with textual processing to obtain the descriptive text of the table;
[0008] The quality of the descriptive text in the table is evaluated to obtain the quality evaluation value of the descriptive text;
[0009] Based on the quality assessment value, the descriptive text that meets the preset quality conditions is used as the textual result of the table.
[0010] In some embodiments, the quality assessment of the descriptive text of the table to obtain a quality assessment value for the descriptive text includes:
[0011] The descriptive text is evaluated for fluency to obtain a fluency evaluation value.
[0012] The accuracy of the descriptive text is evaluated by performing a question-and-answer test, and the accuracy evaluation value of the descriptive text is obtained.
[0013] The quality assessment value of the descriptive text is obtained by weighted fusion of the fluency assessment value and the accuracy assessment value.
[0014] In some embodiments, the accuracy evaluation of the question-answering test on the descriptive text to obtain an accuracy evaluation value for the descriptive text includes:
[0015] A question-and-answer database is generated based on the text information associated with the table and the table information of the table; wherein the question-and-answer database includes questions and standard answers corresponding to the questions;
[0016] Based on the text information associated with the table and the descriptive text of the table, test the test answers corresponding to the questions in the question-and-answer database;
[0017] The accuracy assessment value of the descriptive text is determined based at least on the degree of matching between the test answer and the standard answer.
[0018] In some embodiments, the question-and-answer database includes multiple questions, and testing the test answers corresponding to the questions in the question-and-answer database based on the text information associated with the table and the descriptive text of the table includes:
[0019] Based on the text information associated with the table and the descriptive text of the table, test the test answer corresponding to each question in the question-and-answer database;
[0020] The determination of the accuracy assessment value of the descriptive text, based at least on the degree of matching between the test answer and the standard answer, includes:
[0021] Based on the matching degree between the test answer and the standard answer for each question, determine the first matching degree statistical value;
[0022] The accuracy assessment value of the descriptive text is determined based at least on the first matching statistic.
[0023] In some embodiments, the chapter includes multiple tables, at least one table corresponds to multiple descriptive texts, and the question-and-answer database is generated based on the text information associated with the tables and the table information of the multiple tables;
[0024] The step of testing test answers corresponding to questions in the question-and-answer database based on the text information associated with the table and the descriptive text of the table includes:
[0025] For each combination of descriptive text in the plurality of tables, based on the text information associated with the plurality of tables and the combination of descriptive text, test the test answer in the question-and-answer database corresponding to the combination of descriptive text;
[0026] The determination of the accuracy assessment value of the descriptive text, based at least on the degree of matching between the test answer and the standard answer, includes:
[0027] For each descriptive text in each table, determine a second matching statistic corresponding to the matching degree between the test answer and the standard answer for the question in different combinations of descriptive texts, and determine the accuracy evaluation value of the descriptive text based at least on the second matching statistic.
[0028] In some embodiments, the step of evaluating the fluency of the descriptive text to obtain a fluency evaluation value for the descriptive text includes:
[0029] Replace the tables in the chapter with the descriptive text to obtain the replaced chapter text;
[0030] The text content in the chapter text is evaluated for text fluency, and the fluency evaluation value is obtained.
[0031] In some embodiments, the textualization process of semantically associating the table based on the text information and the table information to obtain the descriptive text of the table includes:
[0032] Based on the text information and the table information, the table is subjected to multiple semantic association textualization processes to obtain multiple candidate descriptive texts for the table;
[0033] The candidate descriptive text that completely covers the text in the table among the plurality of candidate descriptive texts shall be used as the descriptive text of the table.
[0034] In some embodiments, the chapter is part of a document, and the descriptive text of the tables in the chapter is generated offline using a first language model; the method further includes:
[0035] After assessing the quality of the descriptive text to determine the textualized result of the tables, the tables in the chapters are replaced based on the textualized result of the tables, and a document in text form including the chapter text is generated offline.
[0036] The document in the text form is processed online using a second language model; wherein the size of the first language model is larger than the size of the second language model.
[0037] In some embodiments, the document is a vehicle manual, and the online processing of the text-based document using a second language model includes:
[0038] The second language model is used to process the text-based vehicle manual based on questions obtained online, in order to obtain the answers to the questions from the text-based vehicle manual.
[0039] In some embodiments, determining the text information associated with the table in the chapter containing the table includes:
[0040] Based on the data structure corresponding to the document format of the document to which the chapter belongs, determine the text information associated with the table in the chapter.
[0041] This disclosure provides a table textification device, including:
[0042] The first determining module is configured to determine the text information associated with the table in the chapter where the table is located; wherein, the text information includes at least one of the following: text in the chapter other than the table, and the table of contents corresponding to the chapter;
[0043] The text processing module is configured to perform semantic association text processing on the table based on the text information and the table information of the table to obtain the descriptive text of the table;
[0044] The quality assessment module is configured to perform a quality assessment on the descriptive text of the table and obtain a quality assessment value for the descriptive text.
[0045] The second determining module is configured to, based on the quality assessment value, use descriptive text that meets preset quality conditions as the textual result of the table.
[0046] In some embodiments, the quality assessment module is further configured to perform a text fluency assessment on the descriptive text to obtain a fluency assessment value for the descriptive text; perform an accuracy assessment on the descriptive text using a question-and-answer test to obtain an accuracy assessment value for the descriptive text; and perform a weighted fusion based on the fluency assessment value and the accuracy assessment value to obtain a quality assessment value for the descriptive text.
[0047] In some embodiments, the quality assessment module is further configured to generate a question-and-answer database based on text information associated with the table and table information of the table; wherein the question-and-answer database includes questions and standard answers corresponding to the questions; test the test answers corresponding to the questions in the question-and-answer database based on text information associated with the table and descriptive text of the table; and determine the accuracy assessment value of the descriptive text based at least on the matching degree between the test answers and the standard answers.
[0048] In some embodiments, the question-and-answer database includes multiple questions, and the quality assessment module is further configured to test the test answer corresponding to each question in the question-and-answer database based on the text information associated with the table and the descriptive text of the table; determine a first matching degree statistical value based on the matching degree between the test answer corresponding to each question and the standard answer; and determine an accuracy assessment value of the descriptive text based at least on the first matching degree statistical value.
[0049] In some embodiments, the chapter includes multiple tables, at least one table corresponds to multiple descriptive texts, and the question-and-answer database is generated based on the text information associated with the tables and the table information of the multiple tables;
[0050] The quality assessment module is further configured to, for each combination of descriptive text in the plurality of tables, test the test answer corresponding to the question in the question-and-answer database for the descriptive text combination based on the text information associated with the plurality of tables and the descriptive text combination; for each descriptive text in each table, determine a second matching degree statistical value corresponding to the matching degree between the test answer and the standard answer corresponding to the question in different descriptive text combinations, and determine the accuracy assessment value of the descriptive text based at least on the second matching degree statistical value.
[0051] In some embodiments, the quality assessment module is further configured to replace the tables in the chapter with the descriptive text to obtain the replaced chapter text; and to perform a text fluency assessment on the text content in the chapter text to obtain the fluency assessment value.
[0052] In some embodiments, the text processing module is further configured to perform multiple semantic association text processing on the table based on the text information and the table information of the table to obtain multiple candidate descriptive texts of the table; and to take the candidate descriptive text that completely covers the text in the table from the multiple candidate descriptive texts as the descriptive text of the table.
[0053] In some embodiments, the chapter is part of a document, and the descriptive text of the tables in the chapter is generated offline using a first language model; the apparatus further includes:
[0054] The offline generation module is configured to replace the tables in the chapters based on the textualized results of the tables after a quality assessment of the descriptive text, and generate a document in text form that includes the chapter text after the replacement.
[0055] The online processing module is configured to process the document in text form online using a second language model; wherein the size of the first language model is larger than the size of the second language model.
[0056] In some embodiments, the document is a vehicle manual, and the online processing module is further configured to process the text-based vehicle manual using the second language model based on questions obtained online, in order to obtain answers to the questions from the text-based vehicle manual.
[0057] In some embodiments, the first determining module is further configured to determine the text information associated with the table in the chapter based on the data structure corresponding to the document format of the document to which the chapter belongs.
[0058] This disclosure provides an electronic device, including:
[0059] processor;
[0060] Memory used to store computer programs or instructions;
[0061] The processor executes the computer program or instructions to implement the steps in any of the methods provided in the embodiments of this disclosure.
[0062] This disclosure provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of any method provided in this disclosure.
[0063] This disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps of any method provided in this disclosure.
[0064] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0065] In this embodiment of the disclosure, the textual information of the associated tables in the chapter is combined to perform semantic association textualization processing on the tables. On the one hand, since the textual information of the associated tables in the chapter can provide more semantic background, this method can improve the accuracy of the table textualization result, that is, improve the accuracy of extracting knowledge from the table and integrate discrete table information into natural language related to the chapter context. On the other hand, since this embodiment of the disclosure also performs quality evaluation on the descriptive text of the table and selects the descriptive text that meets the preset quality conditions as the textualization result of the table, this selection method can further improve the accuracy of table textualization.
[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0067] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0068] Figure 1 This is a flowchart illustrating a method for texturing a table according to an exemplary embodiment.
[0069] Figure 2 These are example diagrams for sections of embodiments of this disclosure.
[0070] Figure 3 This is an example diagram of the data structure corresponding to the document format in the embodiments of this disclosure.
[0071] Figure 4 Examples of design suggestions for embodiments of this disclosure Figure 1 .
[0072] Figure 5 This is an example diagram of descriptive text in an embodiment of this disclosure.
[0073] Figure 6 Examples of design suggestions for embodiments of this disclosure Figure 2 .
[0074] Figure 7 This is an example diagram of questions and answers in the question-and-answer database in an embodiment of this disclosure.
[0075] Figure 8 Examples of design suggestions for embodiments of this disclosure Figure 3 .
[0076] Figure 9 This is an example diagram of the test answers generated in an embodiment of this disclosure.
[0077] Figure 10 Examples of design suggestions for embodiments of this disclosure Figure 4 .
[0078] Figure 11 This is a schematic diagram of the table textification method in the embodiments of this disclosure.
[0079] Figure 12 This is a block diagram illustrating a table texturing device according to an exemplary embodiment.
[0080] Figure 13 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0081] To make the objectives, technical solutions, and advantages of this disclosure clearer, the disclosure will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this disclosure. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0082] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0083] In the following description, the terms “first, second, third” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second, third” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0084] In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0085] Unless otherwise defined, all technical and scientific terms used in the embodiments of this disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used in the embodiments of this disclosure is for descriptive purposes only and is not intended to limit the scope of this disclosure.
[0086] In related technologies, when extracting knowledge from documents containing tables using language models, the document, including the tables, is typically input directly into the language model. The language model treats the tables directly as text. However, the information in tables is often discrete, making it difficult for the language model to accurately establish semantic relationships between cells, rows, columns, and across table headers, easily leading to a decrease in the accuracy of knowledge extraction from the tables. While large-scale language models can improve the accuracy of knowledge extraction to some extent, large-scale language models require significant computational resources for inference, making them time-consuming and costly, and difficult to implement in practical applications.
[0087] Furthermore, knowledge extraction can be performed using Retrieval-Augmented Generation (RAG) technology. This involves locating the relevant fragment for the retrieval question using a retrieval model and inputting it into a language model to improve accuracy and efficiency. However, current retrieval models are text semantic models, unable to understand two-dimensional tables in documents. Therefore, when retrieving content related to tables, the retrieval model struggles to accurately locate the fragment containing the table, making it difficult for the language model to generate accurate answers. Another approach is to use heuristic rules to arrange the table content into a very long string, then use the retrieval model to locate the fragment before inputting it into a smaller language model. However, this heuristic rule disrupts the structured semantics of the table, resulting in inaccurate fragment location during the retrieval phase, and the smaller language model also struggles to generate accurate answers.
[0088] Based on this, embodiments of this disclosure provide a method for textualizing tables in a document, thereby facilitating knowledge extraction from the textualized document. This facilitates the construction of knowledge bases for subsequent question-and-answer sessions, or the automatic generation of document summaries and reports. It should be noted that if a document contains multiple texts, the method of embodiments of this disclosure can be used to textualize each table in the document.
[0089] Figure 1 This is a flowchart illustrating a method for texturing a table according to an exemplary embodiment, such as... Figure 1 As shown, the method includes:
[0090] S11. Determine the text information associated with the table in the chapter where the table is located; wherein, the text information includes at least one of the following: text in the chapter other than the table, and the table of contents corresponding to the chapter;
[0091] S12. Based on the text information and the table information, perform semantic association textification processing on the table to obtain the descriptive text of the table;
[0092] S13. Perform a quality assessment on the descriptive text of the table to obtain a quality assessment value for the descriptive text;
[0093] S14. Based on the quality assessment value, the descriptive text that meets the preset quality conditions is used as the textual result of the table.
[0094] The table textification method provided in this disclosure can be executed by terminal devices such as user equipment (UE), mobile devices, user terminals, mobile phones, tablets, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, and wearable devices; it can also be cloud devices such as cloud servers. This disclosure does not limit the execution subject; for ease of description, this disclosure uses electronic devices as the execution subject for illustration.
[0095] In step S11, the electronic device determines the text information associated with the table in the chapter containing the table. The chapter includes at least one document page containing the table, and may also include multiple document pages. In this embodiment, the chapter includes not only the table, but also text information other than the table. The text information refers to information expressed in plain text form, excluding information expressed in table form.
[0096] In some embodiments, when a document containing tables does not distinguish its content by a table of contents, the section containing the table may refer to the entire document, which may include one or more document pages.
[0097] In some embodiments, when a document including a table does not distinguish its content by a table of contents, the chapter containing the table may be a portion of the document content determined based on predetermined rules. For example, the chapter containing the table may be obtained by expanding the table by a preset size above and / or below its position on the document page; alternatively, the text within the document page containing the table may be recognized, and the portion containing the table, as well as the recognized portions related to and adjacent to the text in the table, may be taken as the chapter containing the table.
[0098] In other embodiments, when a document including a table distinguishes its content through a table of contents, the section containing the table may refer to the document content in the subdirectory to which the table belongs.
[0099] It should be noted that in this embodiment of the disclosure, the electronic device can detect tables in the document beforehand, and then locate the chapter where the table is located to determine the text information of the associated table. For example, for documents saved in image format, the electronic device can detect lines in the document based on image recognition methods to locate tables. Furthermore, for documents stored in document format, the electronic device can determine the tables in the chapters based on the data structure corresponding to the document format. For documents stored in HyperText Markup Language (HTML), Markdown, or Extensible Markup Language (XML) formats, the electronic device can detect tables in the document based on predefined table tags in the document format. Taking HTML documents as an example, tables can be detected and their row, column, and cell structures obtained through the "table" tag in the data structure. For Portable Document Format (PDF) documents, the electronic device can render them as images and then use image recognition methods to detect tables, or convert the PDF format to a format such as HTML and then detect the tables.
[0100] In this embodiment of the disclosure, the text information associated with the table in the chapter includes all text in the chapter excluding the table, and may also include the chapter's corresponding directory, i.e., the chapter directory. The text in the chapter excluding the table can be all text in the chapter excluding the table, or it can be a portion of the text in the chapter excluding the table, such as the text preceding and / or following the table. The chapter's corresponding directory may include multiple levels of directory information.
[0101] Taking a vehicle manual as an example, a vehicle manual may include a general table of contents, a table of contents, and individual chapters. Each chapter may contain tables. The general table of contents provides an overview of the entire vehicle manual's structure. The table of contents is a part of the general table of contents, and each chapter may be further subdivided into sub-directories to help users quickly locate specific chapters. For example, the general table of contents may include multiple chapter directories such as vehicle preparation, infotainment, safe travel, maintenance, and specifications. If a table corresponds to a table in the chapter on charging time under the "Safe Travel" sub-directory, then the directory (chapter directory) corresponding to the chapter containing the table may include a three-level directory of "Safe Travel - Charging - Charging Time". Specifically, if the first-level directory in the chapter directory is "Safe Travel", then the second-level directory is "Charging", and the third-level directory is "Charging Time". In this embodiment, the first-level directory in the chapter directory may also include multiple sub-directories, such as "Seat" and "Seatbelt" in addition to "Charging".
[0102] Figure 2 These are example diagrams from chapters of this disclosure, which are part of the vehicle manual, such as... Figure 2 As shown, 21 represents a chapter, and 22 represents the chapter directory, which includes multiple levels of subdirectories. The currently displayed chapter 21 belongs to the first-level directory "Safe Travel" (marked by 22A), the second-level directory "Charging" (marked by 22B), and the third-level directory "Charging Time" (marked by 22C) within the chapter directory 22. Chapter 21 includes two tables, 21-1 and 21-2. Taking 21-1 as an example, the text in the chapter other than the tables is the text portion of chapter 21 excluding 21-1 and 21-2. Similarly, for table 21-2, the text information of its associated tables can be the same as the text information associated with table 21-1.
[0103] In some embodiments, determining the text information associated with the table in the chapter containing the table includes:
[0104] Based on the data structure corresponding to the document format of the document to which the chapter belongs, determine the text information associated with the table in the chapter.
[0105] In this embodiment of the disclosure, the electronic device can use regular expressions to clean the data structure corresponding to the document format of the chapter, deleting information such as background color, alignment, width, and height style tags, and retaining only the table labels and all text information in the chapter. For example, the document to which the chapter belongs can be the aforementioned vehicle manual.
[0106] Figure 3 This is an example diagram of the data structure corresponding to the document format in the embodiments of this disclosure, such as... Figure 3 In the data structure corresponding to the HTML document shown, the content corresponding to the "passage_id" tag marked 31 is the table of contents for the chapter; the content corresponding to the "passage" tag marked 32 is the text outside the tables in the chapter; the content corresponding to the "table1" tag marked 33 is... Figure 2 The "table2" label in Table 21-1, 34 corresponds to... Figure 2 In Table 21-2, the content corresponding to the "html" tag under each table tag is the syntax of the table, which provides the text content in the table, as well as table information such as the row, column and cell structure.
[0107] In this embodiment of the disclosure, such as based on Figure 3 The data structure shown allows for easy identification of any table, as well as the text information of related tables within a chapter.
[0108] It is understood that, in this embodiment of the disclosure, the method of determining the text information of the associated tables in a chapter based on the data structure corresponding to the document format of the document to which the chapter belongs helps to improve the accuracy and efficiency of text information determination.
[0109] In step S12, the electronic device performs semantic association textualization processing on the table based on textual information and table information to obtain descriptive text of the table. That is, it integrates the textual information of the associated table and the table's own information to perform semantic association textualization processing, resulting in a textual representation of the table content. Since the table is located within a chapter, the text within the chapter provides contextual information, and the corresponding table of contents provides a summary of the content, thus aiding in the semantic understanding of the table. In this embodiment, the semantic association textualization processing of the table is not simply arranging the table content side-by-side into a string as described in the aforementioned heuristic rules.
[0110] In this embodiment, the electronic device can utilize a model with table comprehension capabilities to understand the row and column structure, cell relationships, and header hierarchy of a table, thereby obtaining textual knowledge of the table portion. This textual knowledge is then combined with related textual information from other sections to perform further semantic optimization, resulting in descriptive text for the table. Alternatively, a language model with strong reasoning capabilities can perform reasoning based on both textual and table information in a single step to obtain descriptive text for the table.
[0111] It should be noted that in this embodiment of the disclosure, there may be one or more descriptive texts for the table. Different descriptive texts may be generated due to different parameters of the model with table understanding capabilities, or they may be generated by using different semantic optimization methods or parameters when combining the text information of the table associated in the chapter for further semantic optimization.
[0112] In some embodiments, the textualization process of semantically associating the table based on the text information and the table information to obtain the descriptive text of the table includes:
[0113] Based on the text information and the table information, the table is subjected to multiple semantic association textualization processes to obtain multiple candidate descriptive texts for the table;
[0114] The candidate descriptive text that completely covers the text in the table among the plurality of candidate descriptive texts shall be used as the descriptive text of the table.
[0115] In this embodiment, the textualization process involving multiple semantic associations can be the aforementioned process using different semantic understanding methods or different model parameters. Using the candidate descriptive text that completely covers the text in the table from among multiple candidate descriptive texts as the table's descriptive text is essentially an evaluation of the completeness of the candidate descriptive texts. Since the cell text in the table may involve different semantic dimensions (such as row headers, list headers, comments, etc.), a single textualization process may have the risk of bias or information loss. Therefore, by generating and filtering candidate results multiple times that completely cover the original table's text, the filtered descriptive text can completely and without omission retain all the information in the original table. The filtered descriptive text can be one or multiple.
[0116] Understandably, this method of completeness assessment can improve the accuracy of descriptive text.
[0117] It should be noted that if a certain number of descriptive texts must be generated, and the number of descriptive texts retained after the completeness assessment is insufficient, the semantic understanding method or model parameters can be further changed to generate candidate descriptive texts for filtering, so that the number of descriptive texts obtained in the end meets the requirements.
[0118] In step S13, the electronic device performs a quality assessment on the descriptive text of the table to obtain a quality assessment value. This quality assessment can be based on one or more assessment indicators, such as text fluency or semantic accuracy. Furthermore, in this embodiment, the quality assessment value can be a specific score or a quality level.
[0119] In step S14, the electronic device uses the descriptive text that meets the preset quality conditions as the textual result of the table based on the quality assessment value.
[0120] In some embodiments, if there is only one descriptive text in a table, the descriptive text can be used as the textualized result of the table if its quality assessment value is greater than a preset quality threshold. In other embodiments, if there are multiple descriptive texts in a table, the top K descriptive texts with the highest quality assessment values can be selected as the textualized result of the table.
[0121] It is understood that in this embodiment of the disclosure, the textual processing of tables by combining the textual information of related tables in the chapters has the following advantages: First, because the textual information of related tables in the chapters can provide more semantic background, this method can improve the accuracy of the table textualization results, that is, improve the accuracy of extracting knowledge from the table parts, and integrate discrete table information into natural language related to the chapter context. Second, because this embodiment of the disclosure also performs quality evaluation on the descriptive text of the tables and selects descriptive text that meets preset quality conditions as the textualization results of the tables, this selection method can further improve the accuracy of table textualization.
[0122] It should be noted that, in this embodiment of the disclosure, after obtaining the textualized result of the tables in the chapter, this embodiment of the disclosure can replace the tables in the chapter with the textualized result. If a chapter is part of a document and there are multiple tables in the chapter, or if there are multiple chapters in the document that include tables, then each table in the document can be replaced in this way, and the document in text form can be obtained after the replacement.
[0123] In addition, in some embodiments of this disclosure, the descriptive text of the table can be generated online using a language model based on text information and table information, and further processed by knowledge question answering or summary generation after obtaining the text document online.
[0124] In other embodiments, the descriptive text of the tables in the section is generated offline using a first language model; the method further includes:
[0125] After assessing the quality of the descriptive text to determine the textualized result of the tables, the tables in the chapters are replaced based on the textualized result of the tables, and a document in text form including the chapter text is generated offline.
[0126] The document in the text form is processed online using a second language model; wherein the size of the first language model is larger than the size of the second language model.
[0127] In this embodiment of the disclosure, the scale of the language model refers to the number of parameters, network depth, etc. A large-scale language model can provide more accurate inference results because it has a larger number of parameters and a deeper network, but it also requires more computing resources. In contrast, a small-scale language model has a more relaxed requirement for computing resources.
[0128] It should be noted that in this embodiment, the offline stage uses a large-scale first language model to obtain the descriptive text of the table and the document in the form of the replaced text. This process is time-consuming but only performed once. In the online stage, a small-scale second language model is used based on the document in text form to respond to user needs in real time, such as answering user questions in real time, which is fast and low-cost. The first language model can be, for example, the deepseek-r1 model, the qwen3-max model, etc., or, for example, qwen3-4b, qwen3-7b, etc.
[0129] In this embodiment of the disclosure, information about the input first language model can be obtained based on a prompt design, and the first language model can be guided to obtain the desired output from the input through instructions. The information about the input first language model includes text information of associated tables within chapters and table information of the tables themselves. The prompt design can be generated based on an automated script.
[0130] Figure 4 Examples of design suggestions for embodiments of this disclosure Figure 1 This prompt is designed to guide the generation of descriptive text. For example... Figure 4 As shown, the content within the dashed boxes in Figures 41 and 42 represents the instructions given to the first language model, guiding it to process information under certain constraints. The content within the dashed box in Figure 43 represents the input to the first language model, such as... Figure 4 As shown, this includes a table of contents, where the first-level, second-level, and third-level directories can be found by referring to... Figure 2 Examples are provided; correspondingly, the content corresponding to the "Content" tag includes... Figure 3 The content corresponding to the "passage" tag, as well as the content corresponding to the table tags and the "html" tags under each table tag.
[0131] Figure 5 This is an example diagram of descriptive text in an embodiment of this disclosure, such as... Figure 5 As shown, 51 represents... Figure 2 The descriptive text corresponding to Table 21-1 in the table, shown in 52, is... Figure 2 The descriptive text corresponding to Table 21-2. The descriptive text of each table includes not only natural language expressions of the content in the table, but also natural language expressions summarizing the content of the table by combining textual information outside the table.
[0132] It should be noted that, in this embodiment of the disclosure, the first language model can determine the number of tables based on the number of table tags in the content corresponding to the "content" tag in the prompt design, and generate corresponding descriptive text for the tables. In addition, the randomness of some parameters in the first language model can be utilized to run the first language model multiple times to generate multiple descriptive texts, and these multiple descriptive texts can also serve as the aforementioned multiple candidate descriptive texts.
[0133] It is understood that the embodiments of this disclosure generate descriptive text of tables offline using a large-scale first language model, and then, after obtaining the text document, process the text document online using a small-scale second language model. In this way, on the one hand, the computational resource requirements and response latency of online inference using a large-scale language model are significantly reduced; on the other hand, the shortcomings of small-scale language models and retrieval models in understanding table structures are also alleviated. In this way, a dual optimization of high performance and low cost is achieved.
[0134] In some embodiments, when processing text-based documents online using a second language model, for example, a RAG system can be used for knowledge-based question answering based on the text-based documents. This involves first using a retrieval model to quickly retrieve the most relevant text fragments from the text-based documents based on the user's query, and then using a second language model to generate a natural language answer based on the retrieved fragments and the original query. It is understood that since the generated text-based documents have been completely transformed into a text form easily understood by the retrieval model, the subsequent use of a second language model can achieve high recall and high accuracy in the question-answering stage, significantly reducing the overall inference resource overhead and response time of the RAG system, and eliminating the need to adjust the access to the RAG system.
[0135] In some embodiments, the document is a vehicle manual, and the online processing of the text-based document using a second language model includes:
[0136] The second language model is used to process the text-based vehicle manual based on questions obtained online, in order to obtain the answers to the questions from the text-based vehicle manual.
[0137] In this embodiment of the disclosure, knowledge-based question answering based on the vehicle manual in text form can be either the aforementioned knowledge-based question answering that directly utilizes a second language model, or the knowledge-based question answering that combines a retrieval model and a second language model in the RAG system.
[0138] For the smart cockpit scenario, besides general vehicle knowledge such as maintenance frequency and tire replacement intervals, there is a lot of personalized vehicle knowledge specific to this domain, all of which is found in the vehicle manuals of various brands. However, related technologies have not yet organized this domain-specific knowledge. Furthermore, vehicles are updated very frequently, and knowledge updates are also very rapid. Therefore, the method of this disclosure, which constructs an intelligent knowledge question-and-answer system for vehicle manuals, reduces reliance on users manually consulting manuals. Moreover, when the vehicle manual is updated, only the new manual needs to be re-textualized to instantly obtain the new knowledge, without needing to retrain or deploy models, thus facilitating the long-term provision of intelligent services. This method of transforming static vehicle manual documents into dynamic knowledge sources drives the upgrade of dedicated services for intelligent vehicles.
[0139] Furthermore, in this embodiment of the disclosure, the vehicle manual in text form also facilitates the use of models to structurally extract and uniformly manage the scattered and personalized vertical domain knowledge from the manuals of various brands and models, thereby constructing a unified vehicle knowledge base.
[0140] In some embodiments, the quality assessment of the descriptive text of the table to obtain a quality assessment value for the descriptive text includes:
[0141] The descriptive text is evaluated for fluency to obtain a fluency evaluation value.
[0142] The accuracy of the descriptive text is evaluated by performing a question-and-answer test, and the accuracy evaluation value of the descriptive text is obtained.
[0143] The quality assessment value of the descriptive text is obtained by weighted fusion of the fluency assessment value and the accuracy assessment value.
[0144] In this embodiment, text fluency evaluation can be based on the fluency of semantic expression directly determined by grammatical rules, or it can be determined by calculating perplexity (PPL). A lower perplexity value means that the text conforms more to the statistical laws of natural language in terms of word order, collocation, and local structure; that is, the results for descriptive text are more reliable. In this embodiment, text fluency can be negatively correlated with perplexity, with perplexity indirectly reflecting text fluency.
[0145] In some embodiments of this disclosure, the accuracy of descriptive text can be evaluated offline. In other embodiments, the accuracy evaluation of descriptive text for question-and-answer testing can also be a self-correction process of the language model during the generation of descriptive text. This self-correction process can be an intermediate process in the online generation of descriptive text by the language model. For example, while the language model generates descriptive text online based on table information in chapters and text information outside the tables, it can simultaneously generate test questions related to the tables. Then, it searches for answers in the descriptive text based on the test questions. If no answer can be output or the output answer is not information from the table, the accuracy of question-and-answer testing based on the descriptive text can be considered low.
[0146] In this embodiment of the disclosure, the text fluency assessment of the descriptive text and the accuracy assessment of the question-and-answer test can be an assessment of the descriptive text only, or it can be an assessment that further combines the text outside the tables in the chapter. This embodiment of the disclosure does not limit this.
[0147] In this implementation, each descriptive text corresponds to a fluency evaluation value and an accuracy evaluation value. The electronic device performs a weighted fusion of the fluency evaluation value and the accuracy evaluation value to obtain the quality evaluation value (score) of the descriptive text, as shown in the following formula (1):
[0148] score=a1*lcd_score+a2*acc_score (1)
[0149] Where lcd_score is the smoothness evaluation value, acc_score is the accuracy evaluation value, a1 and a2 are preset weights, and the sum of a1 and a2 is 1.
[0150] It is understood that, in this embodiment of the disclosure, weighted fusion using multi-dimensional indicators can reduce reliance on a single indicator for biased evaluation and improve the accuracy of quality assessment. Furthermore, the weighted fusion method allows for convenient and flexible adjustment of weights to filter the descriptive text required for downstream tasks. For example, a question-answering system focused on user experience might emphasize fluency, thus allowing for a higher weighting of the fluency evaluation value, while a knowledge base focused on precise retrieval might emphasize accuracy, thus allowing for a higher weighting of the accuracy evaluation value.
[0151] In some embodiments, the accuracy evaluation of the question-answering test on the descriptive text to obtain an accuracy evaluation value for the descriptive text includes:
[0152] A question-and-answer database is generated based on the text information associated with the table and the table information of the table; wherein the question-and-answer database includes questions and standard answers corresponding to the questions;
[0153] Based on the text information associated with the table and the descriptive text of the table, test the test answers corresponding to the questions in the question-and-answer database;
[0154] The accuracy assessment value of the descriptive text is determined based at least on the degree of matching between the test answer and the standard answer.
[0155] As previously described, embodiments of this disclosure can perform accuracy evaluation on descriptive text in an offline phase. In this embodiment, the question-answer database is generated offline and can be used multiple times after being generated only once. For example, the question-answer database can be generated offline using a large-scale third-language model based on the text information of the associated table and the initial table information. This third-language model can be the same as the aforementioned first-language model or a different model.
[0156] For example, information about the input third-language model can be obtained based on a prompt design, and instructions can be used to guide the third-language model to generate question-and-answer example pairs and a question-and-answer database based on the input. The information input to the third-language model includes text information about associated tables within chapters and table information within those tables. This prompt design can also be generated using automated scripts.
[0157] Figure 6 Examples of design suggestions for embodiments of this disclosure Figure 2 This prompt is designed to guide the generation of a question-and-answer database. For example... Figure 6 As shown, the content within the dashed box 61 and the content indicated by 63 are instructions given to the third language model to guide and instruct it to generate questions and corresponding standard answers (QA pairs) under certain constraints. The content within the dashed box shown in 62 is the input to the third language model, such as... Figure 6 As shown, this includes a table of contents, where the first-level, second-level, and third-level directories can be found by referring to... Figure 2 Examples are provided; correspondingly, the content corresponding to the "Content" tag includes... Figure 3 The content corresponding to the "passage" tag, as well as the content corresponding to the table tags and the "html" tags under each table tag.
[0158] Figure 7 This is an example diagram of questions and answers in the question-and-answer database in this embodiment of the disclosure, such as... Figure 7 As shown, the question-and-answer database includes multiple question-and-answer pairs, each pair being presented with a question identified by 71 and a standard answer identified by 72.
[0159] In this embodiment of the disclosure, the electronic device tests the test answers corresponding to questions in a question-and-answer database based on the text information and descriptive text of the associated table. Specifically, it uses questions from the question database to test the text information and descriptive text of the associated table to generate test answers. The text information and descriptive text of the associated table can be understood as the chapter text after replacing the table.
[0160] In this embodiment of the disclosure, information about the input fourth language model can also be obtained based on a prompt design, and the fourth language model can be guided by instructions to generate test answers corresponding to the input questions. The information input to the fourth language model includes text information of associated tables in chapters, descriptive text of the tables, and the questions. The fourth language model can be a small-scale language model for an online application, and the prompt design can also be generated based on automated scripts.
[0161] Figure 8 Examples of design suggestions for embodiments of this disclosure Figure 3 This prompt is designed to guide the generation of test answers to the questions. For example... Figure 8 As shown, the content of the "document_text" label in the dotted box shown in 81 is the chapter text after replacing the table. The content corresponding to "Answer Requirements" in the dotted box shown in 82 is an instruction given to the fourth language model to guide and instruct the fourth language model to generate test answers corresponding to the questions under certain constraints. The content of the "question" label in the dotted box shown in 83 is the question in the question bank.
[0162] Figure 9 Here is an example image of the test answer generated in this embodiment of the disclosure, such as... Figure 9 As shown, the content of the "question" marked with 91 corresponds to Figure 8 The part marked with 83, and the content of "document_text" marked with 92, correspond to... Figure 8 The part marked 81 and the part marked 93, which are the "answers", are the test answers.
[0163] In this embodiment of the disclosure, the electronic device determines the accuracy assessment value of the descriptive text based at least on the matching degree between the test answer and the standard answer. The matching degree may include text similarity and / or semantic similarity. Text similarity may be calculated based on edit distance, for example, while semantic similarity may be calculated based on the cosine similarity between vectors after feature extraction. In one embodiment, the matching degree can be used as the accuracy assessment value; in other embodiments, the accuracy assessment value of the descriptive text can be determined by combining the matching degree with factors such as the clarity and fluency of the test answer.
[0164] In this embodiment of the disclosure, information about a large-scale fifth language model can also be obtained based on a prompt design, and the fifth language model can be guided by instructions to evaluate based on the text information of the questions, the tables associated with the chapters, the descriptive text of the tables, the test answers, and the standard answers. The fifth language model can be the same as the aforementioned first language model, or it can be a different model. The prompt design can also be generated based on automated scripts.
[0165] Figure 10 Examples of design suggestions for embodiments of this disclosure Figure 4 This prompt is designed to guide the generation of accuracy assessment values for descriptive text. For example... Figure 10 As shown, the content in the dashed box shown in 101 is the input to the fifth language model, including the text information of the related tables in the chapter, as well as the descriptive text of the tables, test answers, and standard answers. This is the basic information for determining the accuracy assessment value of the descriptive text. The content in the dashed boxes shown in 102 and 103 is the instruction given to the fifth language model to guide and instruct it to score under certain scoring criteria and output the scoring results in a formatted manner. The scoring results include the accuracy assessment value, as well as the scoring reasons and improvement suggestions.
[0166] It is understood that in this embodiment of the disclosure, using the text information of the table and the original table information to generate a question-and-answer database offline as a benchmark can reduce the subjective bias of manual evaluation of descriptive text and improve the accuracy of the accuracy evaluation value.
[0167] It should be noted that in this embodiment, the offline-generated question-and-answer database is fixed and finite, while real user questions are diverse and inexhaustible. Therefore, this embodiment uses the offline-generated question-and-answer database to evaluate the quality of descriptive text to further obtain the textualized result of the table, and then uses the textualized result of the table to replace the table to obtain a textual document. The purpose is that in practical applications, any online question can be dynamically inferred from the textual document, rather than only matching a preset fixed question-and-answer pair.
[0168] In some embodiments, the question-and-answer database includes multiple questions, and testing the test answers corresponding to the questions in the question-and-answer database based on the text information associated with the table and the descriptive text of the table includes:
[0169] Based on the text information associated with the table and the descriptive text of the table, test the test answer corresponding to each question in the question-and-answer database;
[0170] The determination of the accuracy assessment value of the descriptive text, based at least on the degree of matching between the test answer and the standard answer, includes:
[0171] Based on the matching degree between the test answer and the standard answer for each question, determine the first matching degree statistical value;
[0172] The accuracy assessment value of the descriptive text is determined based at least on the first matching statistic.
[0173] In this embodiment of the disclosure, the question-and-answer database may include multiple questions. By testing each question, it is possible to know the test effect of the chapter text on different questions after the descriptive text replaces the table in the chapter. The test effect of the chapter text on different questions is also the test effect of the descriptive text on different questions.
[0174] In this embodiment of the disclosure, after the electronic device determines the test answer corresponding to each question, it determines a first matching degree statistical value based on the matching degree between the test answer and the standard answer for each question. This first matching degree statistical value can be the mean, median, or maximum value of the matching degree. Furthermore, in this embodiment of the disclosure, the electronic device determines an accuracy evaluation value for the descriptive text based at least on the first matching degree statistical value. For example, the accuracy evaluation value can be the first matching degree statistical value itself; or, based on the first matching degree statistical value, it can combine statistical values such as the clarity and fluency of the test answer for each question to determine the accuracy evaluation value. It is understood that in this embodiment of the disclosure, determining the first matching degree statistical value through testing multiple questions to determine the accuracy evaluation value can reduce the problem of bias in the evaluation of descriptive text caused by insufficient test sample size (single question). This method can improve the accuracy of the descriptive text's accuracy evaluation value.
[0175] In some embodiments, the chapter includes multiple tables, at least one table corresponds to multiple descriptive texts, and the question-and-answer database is generated based on the text information associated with the tables and the table information of the multiple tables;
[0176] The step of testing test answers corresponding to questions in the question-and-answer database based on the text information associated with the table and the descriptive text of the table includes:
[0177] For each combination of descriptive text in the plurality of tables, based on the text information associated with the plurality of tables and the combination of descriptive text, test the test answer in the question-and-answer database corresponding to the combination of descriptive text;
[0178] The determination of the accuracy assessment value of the descriptive text, based at least on the degree of matching between the test answer and the standard answer, includes:
[0179] For each descriptive text in each table, determine a second matching statistic corresponding to the matching degree between the test answer and the standard answer for the question in different combinations of descriptive texts, and determine the accuracy evaluation value of the descriptive text based at least on the second matching statistic.
[0180] In this disclosure, the chapters may include multiple tables, as described above. Figure 2 This includes two tables. As shown earlier, each table can also correspond to multiple descriptive texts. Replacing the tables with different descriptive texts associated with them will result in different chapter texts. For example, assuming there are M tables in a chapter, and each table has 10 descriptive texts, then after replacing each table with different descriptive texts, there will be a total of 10 to the power of M chapter texts.
[0181] In this embodiment of the disclosure, for each combination of descriptive text in multiple tables, the electronic device tests the test answer corresponding to the descriptive text combination in the question-and-answer database based on the text information associated with the multiple tables and the descriptive text combination. Because different combinations of descriptive text provide different information, the test answers will also differ.
[0182] In this embodiment of the disclosure, since the same descriptive text may be used in different descriptive text combinations, for a single descriptive text, it is necessary to determine the degree of matching between the test answer and the standard answer corresponding to the question in different descriptive text combinations. Then, based on the matching degree corresponding to different descriptive text combinations, a second matching degree statistical value is determined to determine the accuracy evaluation value of the descriptive text. The second matching degree statistical value can also be the mean, median, or maximum value, etc. Furthermore, the accuracy evaluation value can be the second matching degree statistical value; or it can be determined based on the second matching degree statistical value combined with statistical values such as the clarity and fluency of each test answer.
[0183] It should be noted that in the embodiments of this disclosure, when there are multiple questions in the question library and multiple tables and descriptive texts, secondary statistics are required. For example, in some embodiments, a second matching degree statistical value can be determined for each question first, and then the second matching degree statistical value can be statistically analyzed based on each question. For example, based on each second matching degree statistical value and the number of questions, the average of the second matching degree statistical values can be calculated, and the average value can be used as the accuracy evaluation value of the descriptive text.
[0184] It is understood that, in this embodiment of the disclosure, by testing the same descriptive text multiple times in various combinations of descriptive text to obtain a second matching degree statistical value to determine the accuracy evaluation value, the evaluation bias caused by a single combination method can be reduced, and the accuracy of the descriptive text accuracy evaluation value can be improved.
[0185] In some embodiments, the step of evaluating the fluency of the descriptive text to obtain a fluency evaluation value for the descriptive text includes:
[0186] Replace the tables in the chapter with the descriptive text to obtain the replaced chapter text;
[0187] The text content in the chapter text is evaluated for text fluency, and the fluency evaluation value is obtained.
[0188] In this embodiment of the disclosure, when evaluating the fluency of descriptive text, the evaluation is not performed solely on the descriptive text itself. Instead, the descriptive text replaces the tables in the chapters, meaning the fluency evaluation value of the descriptive text is defined based on the fluency of the chapter text. For example, the fluency evaluation of the text content in a chapter can also involve calculating the perplexity of the chapter text, thereby determining the fluency evaluation value based on the perplexity.
[0189] It is understood that, in this embodiment of the disclosure, the descriptive text itself is not evaluated in isolation, but rather its fluency is evaluated within its actual chapters. This enables a context-aware evaluation of the quality of the chapter text, which is closer to the actual application scenario of the descriptive text. Therefore, the fluency evaluation value obtained in this way is more effective.
[0190] Figure 11 This is a schematic diagram illustrating the principle of the table textification method in this embodiment of the disclosure, such as... Figure 11 As shown, for vehicle manual 1101, the preprocessing step 1102 is first performed to obtain the chapter where the table is located, that is, to obtain the text information of the associated table, for example, based on... Figure 3 The data structure retrieves the text information of the associated tables. After obtaining the chapter where the table is located, the model is further called based on the table textual hinting project 1103 to execute the textual large model inference marked 1104. After the textual large model inference, the N table texts marked 1105 can be obtained. Among them, the textual hinting project 1103 can refer to the aforementioned Figure 4The design of the prompts involves textual large-scale model inference, which utilizes a first language model to generate descriptive text offline. Multiple candidate descriptive texts belonging to this embodiment can be generated, namely, the N table texts identified by 1105. Then, the electronic device performs a completeness evaluation filtering on the N table texts, identified by 1106, which selects the candidate descriptive texts that completely cover the text in the table as the table's descriptive text, thus obtaining the K table texts identified by 1107 after filtering. For these K table texts (descriptive texts), further text fluency and accuracy evaluations are performed. Specifically, the perplexity can be calculated based on the replaced chapter text to obtain the fluency evaluation score (fluency evaluation value) identified by 1108; the accuracy evaluation score (accuracy evaluation value) can be obtained based on the processes identified by 1109~1112. Figure 11 In the process, based on the table-based question-and-answer production prompting project 1109, the model is invoked to perform large-scale inference for QA generation identified by 1110. After inference, a table-based question-and-answer library 1111 is generated. Based on the table-based question-and-answer library 1111, the accuracy of the table text can be evaluated to obtain an accuracy evaluation score identified by 1112. The table-based question-and-answer production prompting project 1109 can be referred to the aforementioned... Figure 6 The design of the prompts in the QA generates large-scale reasoning by using a third language model to generate a question-and-answer database (table question-and-answer database). Furthermore, when evaluating the accuracy of table text based on the table question-and-answer database 1111, for example, the aforementioned method can be used to test the test answers corresponding to the questions in the question-and-answer database, and then, at least based on the matching degree between the test answers and the standard answers in the table question-and-answer database, determine the accuracy evaluation score.
[0191] Figure 12 This is a block diagram illustrating a table texturing device 1200 according to an exemplary embodiment. The device mainly includes:
[0192] The first determining module 1201 is configured to determine the text information associated with the table in the chapter where the table is located; wherein, the text information includes at least one of the following: text in the chapter other than the table, and the table of contents corresponding to the chapter;
[0193] The text processing module 1202 is configured to perform semantic association text processing on the table based on the text information and the table information of the table to obtain the descriptive text of the table;
[0194] The quality assessment module 1203 is configured to perform a quality assessment on the descriptive text of the table to obtain a quality assessment value for the descriptive text.
[0195] The second determining module 1204 is configured to use descriptive text that meets preset quality conditions as the textual result of the table based on the quality assessment value.
[0196] In some embodiments, the quality assessment module 1203 is further configured to perform a text fluency assessment on the descriptive text to obtain a fluency assessment value for the descriptive text; perform an accuracy assessment on the descriptive text using a question-and-answer test to obtain an accuracy assessment value for the descriptive text; and perform a weighted fusion based on the fluency assessment value and the accuracy assessment value to obtain a quality assessment value for the descriptive text.
[0197] In some embodiments, the quality assessment module 1203 is further configured to generate a question-and-answer database based on text information associated with the table and table information of the table; wherein the question-and-answer database includes questions and standard answers corresponding to the questions; test the test answers corresponding to the questions in the question-and-answer database based on text information associated with the table and descriptive text of the table; and determine the accuracy assessment value of the descriptive text based at least on the matching degree between the test answers and the standard answers.
[0198] In some embodiments, the question-and-answer database includes multiple questions, and the quality assessment module 1203 is further configured to test the test answer corresponding to each question in the question-and-answer database based on the text information associated with the table and the descriptive text of the table; determine a first matching degree statistical value based on the matching degree between the test answer corresponding to each question and the standard answer; and determine the accuracy assessment value of the descriptive text based at least on the first matching degree statistical value.
[0199] In some embodiments, the chapter includes multiple tables, at least one table corresponds to multiple descriptive texts, and the question-and-answer database is generated based on the text information associated with the tables and the table information of the multiple tables;
[0200] The quality assessment module 1203 is further configured to, for each combination of descriptive text in the plurality of tables, test the test answer corresponding to the question in the question-and-answer database for the descriptive text combination based on the text information associated with the plurality of tables and the descriptive text combination; for each descriptive text in each table, determine a second matching degree statistical value corresponding to the matching degree between the test answer and the standard answer corresponding to the question in different descriptive text combinations, and determine the accuracy assessment value of the descriptive text based at least on the second matching degree statistical value.
[0201] In some embodiments, the quality assessment module 1203 is further configured to replace the tables in the chapter with the descriptive text to obtain the replaced chapter text; and to perform a text fluency assessment on the text content in the chapter text to obtain the fluency assessment value.
[0202] In some embodiments, the text processing module 1202 is further configured to perform multiple semantic association text processing on the table based on the text information and the table information of the table to obtain multiple candidate descriptive texts of the table; and to take the candidate descriptive text that completely covers the text in the table from the multiple candidate descriptive texts as the descriptive text of the table.
[0203] In some embodiments, the chapter is part of a document, and the descriptive text of the tables in the chapter is generated offline using a first language model; the apparatus further includes:
[0204] The offline generation module is configured to replace the tables in the chapters based on the textualized results of the tables after a quality assessment of the descriptive text, and generate a document in text form that includes the chapter text after the replacement.
[0205] The online processing module is configured to process the document in text form online using a second language model; wherein the size of the first language model is larger than the size of the second language model.
[0206] In some embodiments, the document is a vehicle manual, and the online processing module is further configured to process the text-based vehicle manual using the second language model based on questions obtained online, in order to obtain answers to the questions from the text-based vehicle manual.
[0207] In some embodiments, the first determining module 1201 is further configured to determine the text information associated with the table in the chapter based on the data structure corresponding to the document format of the document to which the chapter belongs.
[0208] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0209] Figure 13 This is a structural block diagram of an electronic device 1300 according to an exemplary embodiment. For example, the electronic device 1300 may be provided as a server.
[0210] Reference Figure 13 The electronic device 1300 includes a processing component 1322, which further includes one or more processors, and memory resources represented by memory 1324 for storing instructions, such as application programs, that can be executed by the processing component 1322. The application programs stored in memory 1324 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1322 is configured to execute instructions to perform any of the aforementioned table textification methods.
[0211] Electronic device 1300 may also include a power supply component 1326 configured to perform power management of electronic device 1300, a wired or wireless network interface 1320 configured to connect electronic device 1300 to a network, and an input / output (I / O) interface 1328. Electronic device 1300 can operate an operating system stored in memory 1324, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0212] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the table textification methods described in the embodiments of this disclosure.
[0213] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the table textification methods described above in this disclosure.
[0214] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0215] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for texturing tables, characterized in that, The method includes: Determine the text information associated with the table in the chapter where the table is located; wherein, the text information includes at least one of the following: text in the chapter other than the table, and the table of contents corresponding to the chapter; Based on the text information and the table information, the table is semantically associated with textual processing to obtain the descriptive text of the table; The quality of the descriptive text in the table is evaluated to obtain the quality evaluation value of the descriptive text; Based on the quality assessment value, the descriptive text that meets the preset quality conditions is used as the textual result of the table.
2. The method according to claim 1, characterized in that, The process of performing a quality assessment on the descriptive text of the table to obtain a quality assessment value for the descriptive text includes: The descriptive text is evaluated for fluency to obtain a fluency evaluation value. The accuracy of the descriptive text is evaluated by performing a question-and-answer test, and the accuracy evaluation value of the descriptive text is obtained. The quality assessment value of the descriptive text is obtained by weighted fusion of the fluency assessment value and the accuracy assessment value.
3. The method according to claim 2, characterized in that, The accuracy evaluation of the question-and-answer test on the descriptive text, to obtain the accuracy evaluation value of the descriptive text, includes: A question-and-answer database is generated based on the text information associated with the table and the table information of the table; wherein the question-and-answer database includes questions and standard answers corresponding to the questions; Based on the text information associated with the table and the descriptive text of the table, test the test answers corresponding to the questions in the question-and-answer database; The accuracy assessment value of the descriptive text is determined based at least on the degree of matching between the test answer and the standard answer.
4. The method according to claim 3, characterized in that, The question-and-answer database includes multiple questions. The step of testing the test answers corresponding to the questions in the question-and-answer database based on the text information associated with the table and the descriptive text of the table includes: Based on the text information associated with the table and the descriptive text of the table, test the test answer corresponding to each question in the question-and-answer database; The determination of the accuracy assessment value of the descriptive text, based at least on the degree of matching between the test answer and the standard answer, includes: Based on the matching degree between the test answer and the standard answer for each question, determine the first matching degree statistical value; The accuracy assessment value of the descriptive text is determined based at least on the first matching statistic.
5. The method according to claim 3 or 4, characterized in that, The chapter includes multiple tables, at least one table corresponds to multiple descriptive texts, and the question-and-answer database is generated based on the text information associated with the tables and the table information of the multiple tables; The step of testing test answers corresponding to questions in the question-and-answer database based on the text information associated with the table and the descriptive text of the table includes: For each combination of descriptive text in the plurality of tables, based on the text information associated with the plurality of tables and the combination of descriptive text, test the test answer in the question-and-answer database corresponding to the combination of descriptive text; The determination of the accuracy assessment value of the descriptive text, based at least on the degree of matching between the test answer and the standard answer, includes: For each descriptive text in each table, determine a second matching statistic corresponding to the matching degree between the test answer and the standard answer for the question in different combinations of descriptive texts, and determine the accuracy evaluation value of the descriptive text based at least on the second matching statistic.
6. The method according to claim 2, characterized in that, The step of evaluating the fluency of the descriptive text to obtain a fluency evaluation value for the descriptive text includes: Replace the tables in the chapter with the descriptive text to obtain the replaced chapter text; The text content in the chapter text is evaluated for text fluency, and the fluency evaluation value is obtained.
7. The method according to claim 1, characterized in that, The step of semantically associating the table with the text information and the table information to obtain the descriptive text of the table includes: Based on the text information and the table information, the table is subjected to multiple semantic association textualization processes to obtain multiple candidate descriptive texts for the table; The candidate descriptive text that completely covers the text in the table among the plurality of candidate descriptive texts shall be used as the descriptive text of the table.
8. The method according to any one of claims 1 to 4, characterized in that, The section is part of the document, and the descriptive text of the tables in the section is generated offline using a first language model; the method further includes: After assessing the quality of the descriptive text to determine the textualized result of the tables, the tables in the chapters are replaced based on the textualized result of the tables, and a document in text form including the chapter text is generated offline. The document in the text form is processed online using a second language model; wherein the size of the first language model is larger than the size of the second language model.
9. The method according to claim 8, characterized in that, The document is a vehicle manual. The online processing of the text document using a second language model includes: The second language model is used to process the text-based vehicle manual based on questions obtained online, in order to obtain the answers to the questions from the text-based vehicle manual.
10. The method according to any one of claims 1 to 4, characterized in that, The text information associated with the table in the chapter where the table is located includes: Based on the data structure corresponding to the document format of the document to which the chapter belongs, determine the text information associated with the table in the chapter.
11. A table text conversion device, characterized in that, The device includes: The first determining module is configured to determine the text information associated with the table in the chapter where the table is located; wherein the text information includes at least one of the following: text in the chapter other than the table, and the table of contents corresponding to the chapter; The text processing module is configured to perform semantic association text processing on the table based on the text information and the table information of the table to obtain the descriptive text of the table; The quality assessment module is configured to perform a quality assessment on the descriptive text of the table and obtain a quality assessment value for the descriptive text. The second determining module is configured to use descriptive text that meets preset quality conditions as the textual result of the table based on the quality assessment value.
12. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
14. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 10.
