Standard term structured extraction method and device
By preprocessing terminology files and building a rule base, and using regular expression matching and rule mapping techniques, the problem of inaccurate Chinese terminology extraction in existing technologies has been solved, enabling fast and accurate structured extraction of standard terms and improving the standardization and consistency of terminology writing.
Patent Information
- Application Number
- CN202411542249.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-21
AI Technical Summary
Existing technologies cannot effectively distinguish and extract preferred and permitted terms from Chinese terminology, have a limited scope of extraction targets, and are not very accurate.
By setting processing strategies to preprocess terminology files, a rule base is built. Regular expression matching and rule mapping techniques are used to parse and construct XML tags segment by segment, and output structured terminology and definition XML files.
It enables rapid and accurate structured extraction of standard terms, improves the standardization and consistency of terminology writing, and promotes the overall coordination and sharing of terminology resources.
Smart Images

Figure CN119494322A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text information processing, and in particular to a method and device for extracting structured standard terms. Background Art
[0002] Terminology is an important part of standards. The structure of standard terminology is complex, including terminology code, terminology name, terminology corresponding words, terminology definition, source, example, note and other parts. Structuring the terminology helps to clarify the exact meaning of the terminology, realize the refined management of terminology, ensure the consistency, standardization and practicality of terminology, support the efficiency and quality improvement of information exchange in professional fields, help improve the accuracy of standard analysis, and further promote the integration of standard text and informatization.
[0003] Related technology CN118114631A discloses a method for structuring standard terminology, which solves the technical problems of terminology information extraction, standardization processing and efficient storage and query in documents by standard preprocessing, indexing standard vector text, extracting standard common structural element information, maintaining standard element storage, extracting terminology information and building a standard terminology structured database. However, this technology can only extract Chinese terms, English and definitions, and cannot distinguish between preferred terms, permitted terms and rejected terms in Chinese terms. The scope of the extracted objects is limited, the extraction granularity is coarse and the accuracy is not high.
[0004] Therefore, how to invent an accurate and efficient standard term structured extraction method has become an urgent problem to be solved. Summary of the invention
[0005] To this end, the present invention provides a method and device for structured extraction of standard terminology, which can more effectively utilize the published national standards, quickly and accurately construct standard terminology resources, assist in the writing of terminology in the standards, help improve the standardization and accuracy of terminology writing, and improve the consistency and coordination of terminology in related fields. It is of great significance to strengthen the overall coordination, integration, sharing and protection of terminology resources, and ensure the healthy, sustainable development and long-term effective utilization of my country's terminology resources.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a method for extracting structured standard terms, comprising:
[0007] Preprocessing the terminology file by setting a processing strategy to obtain an extraction range of the terminology file;
[0008] A number of preset rules are collected to construct a rule base; the text within the extraction range is traversed and judged according to the set process and judgment order, until the rules in the rule base are adapted; the text within the extraction range is processed according to the adapted rules to obtain the processed text;
[0009] According to the adaptation rule mapping, a corresponding processing strategy is obtained; the processed text is parsed according to the corresponding processing strategy, and an XML tag is constructed for embedding, and a structured term and definition XML file is output.
[0010] As a preferred solution of a standard term structured extraction method, in the process of preprocessing the term file by setting the processing strategy, the preprocessing steps are:
[0011] Dividing the term file into rows;
[0012] According to the position information of the characters on the page, irrelevant information is filtered out from the divided terminology file, and missing space characters are completed;
[0013] According to the horizontal and vertical coordinate information of the first character of the line, determine whether there is a first line indent between two adjacent lines, and divide the paragraphs according to the segmentation rules;
[0014] Use regular matching to obtain the first-level title of the standard terminology file, and define the paragraph between the "Terms and Definitions" title and the next first-level title as the extraction range.
[0015] As a preferred solution of a standard term structured extraction method, in the process of dividing paragraphs according to the segmentation rule, the segmentation rule is:
[0016] For two adjacent lines that meet the first line indentation requirement, the two lines and the following lines are combined into one paragraph; for lines that do not meet the first line indentation requirement, each line becomes a separate paragraph.
[0017] As a preferred solution of a standard term structured extraction method, the rules in the rule base include:
[0018] Rule 1: <term and definition>, conforming to the regularity ^(\d)+\.{0,1}\s+(term [and|and] definition)$;
[0019] Rule 2: <Introduction>, this paragraph complies with Rule 1, and the text of this paragraph complies with the regular expression .+(term [and|and] definition);
[0020] Rule 3: Sequence number, this paragraph of text conforms to the regular expression: \s*(\d+([\..]{0,1}\d)*)\s*$;
[0021] Rule 4_0: <preferred term>, the previous paragraph meets Rule 3, and the text of this paragraph meets the regular expression: (.*?)\s(.*);
[0022] Rule 4_1: <Preferred Term> (only in Chinese), it is required that this paragraph is not the last paragraph, the previous paragraph complies with Rule 3, and the text of the next paragraph complies with the regular expression: ([a-zA-Z]{2})\s(.*);
[0023] Rule 5_0: <Preferred Term> / <Permissible Term>, the previous paragraph complies with Rule 5 or Rule 4, and the text of this paragraph complies with the regular expression: (.*?)\s(.*), and the previous paragraph complies with Rule 4 or Rule 5;
[0024] Rule 5_1: <Preferred Term> (multilingual), the previous paragraph complies with Rule 5 or Rule 4, and the text of this paragraph complies with the regular expression: ([a-zA-Z]{2})\s(.*), and the language code is in the preset vocabulary list;
[0025] Rule 5_2: Symbol, the text of this paragraph is regularly matched: \[(.*)\], and the obtained result is in the preset symbol table;
[0026] Rule 6: <Term Source>, the text of this paragraph complies with the regular expression: \[(source[::]){0,1}(.*?)[,,](.*?)\];
[0027] Rule 7: <Term Note>, the text of this paragraph complies with the regular expression: \s*Note\s{0,1}\d{0,1}[::](.*);
[0028] Rule 8: <Term Example>, the text of this paragraph complies with the regular expression: (Example\s{0,1}\d{0,1})[::](.*);
[0029] Rule 9: <n-level Term Classification>, the previous paragraph complies with Rule 3, and the text of this paragraph does not comply with the regular expression: (.*?)\s(.*);
[0030] Rule 10: <Abbreviation Form>, the previous paragraph complies with Rule 4 or Rule 5; and the similarity between the text of this paragraph and the current <Chinese Term> is not less than 0.4;
[0031] Rule 11: <Term Definition>, the previous paragraph complies with Rule 4 or Rule 5 or Rule 10;
[0032] Rule 12: <See Also>, the text of this paragraph complies with the regular expression: See[::](.*).
[0033] As a preferred solution of a standard term structuring extraction method, the corresponding processing strategies mapped by the rules in the rule library include:
[0034] Strategy 1: Start extraction, perform regular matching on the text of this paragraph: ^(\d)+\.{0,1}\s+(Term[ and|与]Definition)$, the first result is the serial number, and the second result is the title;
[0035] Strategy 2: This line is an introductory line. The introductory line has been processed by Strategy 1, so this line is skipped.
[0036] Strategy 3: This line is a redundant serial number line after the introduction, so it is skipped;
[0037] Strategy 4_0: Regular expression matching of this paragraph: \s*(\d+([\..]{0,1}\d)*)\s*$, result 1 is the sequence number; Regular expression matching of this paragraph: (.*?)\s(.*), result 1 is the Chinese term;
[0038] Strategy 4_1: Perform regular expression matching on the previous text: \s*(\d+([\..]{0,1}\d)*)\s*$, the result 1 is the sequence number; this text is the Chinese term;
[0039] Strategy 5_0: Get the conceptEntry tag obtained by mapping term_tag, and perform regular matching on this paragraph of text: (.*?)\s(.*). Result 1 is the Chinese term. According to the font of the Chinese term, determine whether it is a preferred term or an allowed term, determine whether it has been replaced, and process the corresponding word list.
[0040] Strategy 5_1: Get the conceptEntry tag obtained by mapping term_tag, and perform regular matching on this paragraph of text: (.*?)\s(.*), and the result 1 is the language code; determine whether it is replaced. In this paragraph, the part after the language code is a number of corresponding words, extract the corresponding words and determine the preferred term and allowed term;
[0041] Strategy 5_2: Obtain the langSec tag from en_term_tag mapping; extract the symbol, and make judgments on preferred terms and permitted terms; perform regular matching on this paragraph of text: .*\[(.*)\], and the result 1 is the source of the symbol;
[0042] Strategy 6: Get the conceptEntry tag from term_tag mapping, and perform regular matching on this paragraph of text: \[(source[::]){0,1}(.*?)[,,](.*?)\], the result is 1, which is the term source;
[0043] Strategy 7: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: \s*note\s{0,1}\d{0,1}[::](.*), and the result 1 is the term note;
[0044] Strategy 8: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: (example\s{0,1}\d{0,1})[::](.*), and the result 1 is the term example;
[0045] Strategy 9: Get the sec tag from the root_tag mapping, and perform regular matching on this paragraph of text: ^(\d+([\..]{0,1}\d)*)\s*(.*)?, result 1 is the sequence number, and result 3 is the title name;
[0046] Strategy 10: Get the conceptEntry tag from the term_tag mapping. This paragraph of text is the abbreviation term.
[0047] Strategy 11: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: <(.*)>. Result 1 is the domain. In this paragraph of text, the part after the domain is the term definition.
[0048] Strategy 12: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: see [::] (.*), and the result 1 is see.
[0049] The present invention also provides a standard term structured extraction method device, which adopts the above-mentioned standard term structured extraction method, including:
[0050] A terminology file preprocessing module, used to preprocess the terminology file by setting a processing strategy to obtain an extraction range of the terminology file;
[0051] A rule matching module is used to collect a number of preset rules to construct a rule base; the text within the extraction range is traversed and judged according to the set process and judgment order until the rules in the rule base are adapted; the text within the extraction range is processed according to the adapted rules to obtain the processed text;
[0052] The parsing and processing module is used to obtain the corresponding processing strategy according to the adaptation rule mapping; parse and process the processed text according to the corresponding processing strategy, construct XML tags for embedding, and output structured terms and definition XML files.
[0053] As a preferred solution of a standard term structured extraction method device, the preprocessing submodule includes:
[0054] A row division submodule, used for dividing the term file into rows;
[0055] The character filtering and completion submodule is used to filter out irrelevant information from the divided terminology file according to the position information of the characters on the page, and complete the missing space characters;
[0056] The paragraph division submodule is used to determine whether there is a first line indent between two adjacent lines based on the horizontal and vertical coordinate information of the first character of the line, and divide the paragraphs according to the segmentation rules;
[0057] The extraction scope definition submodule is used to obtain the first-level title of the standard terminology file using regular matching, and define the paragraph between the "Terms and Definitions" title and the next first-level title as the extraction scope.
[0058] As a preferred solution of a standard term structured extraction method device, in the term file preprocessing module, in the process of dividing paragraphs according to the segmentation rule, the segmentation rule is:
[0059] For two adjacent lines that meet the first line indentation requirement, the two lines and the following lines are combined into one paragraph; for lines that do not meet the first line indentation requirement, each line becomes a separate paragraph.
[0060] As a preferred solution of a standard term structured extraction method device, in the rule matching module, the rules in the rule base include:
[0061] Rule 1: <term and definition>, conforming to the regularity ^(\d)+\.{0,1}\s+(term [and|and] definition)$;
[0062] Rule 2: <Introduction>, this paragraph complies with Rule 1, and the text of this paragraph complies with the regular expression .+(term [and|and] definition);
[0063] Rule 3: Sequence number, this paragraph of text conforms to the regular expression: \s*(\d+([\..]{0,1}\d)*)\s*$;
[0064] Rule 4_0: <preferred term>, the previous paragraph meets Rule 3, and the text of this paragraph meets the regular expression: (.*?)\s(.*);
[0065] Rule 4_1: <Preferred term> (Chinese only), requires that this paragraph is not the last paragraph, and the previous paragraph complies with Rule 3, and the text of the next paragraph complies with the regular expression: ([a-zA-Z]{2})\s(.*);
[0066] Rule 5_0: <preferred term> / <allowed term>, the previous paragraph complies with Rule 5 or Rule 4, and the text of this paragraph complies with the regular expression: (.*?)\s(.*), and the previous paragraph complies with Rule 4 or Rule 5;
[0067] Rule 5_1: <preferred term> (multilingual), the previous paragraph meets Rule 5 or Rule 4, and the text of this paragraph meets the regular expression: ([a-zA-Z]{2})\s(.*), and the language code is in the preset vocabulary;
[0068] Rule 5_2: Symbol. The regular expression for this paragraph of text is: \[(.*)\], and the result obtained from the match is in the preset symbol table;
[0069] Rule 6: <Term Source>. The regular expression for this paragraph of text is: \[(Source[::]){0,1}(.*?)[,,](.*?)\];
[0070] Rule 7: <Term Note>. The regular expression for this paragraph of text is: \s*Note\s{0,1}\d{0,1}[::](.*);
[0071] Rule 8: <Term Example>. The regular expression for this paragraph of text is: (Example\s{0,1}\d{0,1})[::](.*);
[0072] Rule 9: <n-level Term Classification>. The previous paragraph conforms to Rule 3, and the regular expression for this paragraph of text does not match: (.*?)\s(.*);
[0073] Rule 10: <Abbreviation Form>. The previous paragraph conforms to Rule 4 or Rule 5; and the similarity between this paragraph of text and the current <Chinese Term> is not less than 0.4;
[0074] Rule 11: <Term Definition>. The previous paragraph conforms to Rule 4 or Rule 5 or Rule 10;
[0075] Rule 12: <See Also>. The regular expression for this paragraph of text is: See[::](.*).
[0076] As a preferred solution of a standard term structured extraction method device, in the parsing and processing module, the corresponding processing strategies mapped by the rules in the rule library include:
[0077] Strategy 1: Start extraction. Perform regular expression matching on this paragraph of text: ^(\d)+\.{0,1}\s+(Term[ and|与]Definition)$, Result 1 is the serial number, and Result 2 is the title;
[0078] Strategy 2: This line is a leading line, and the leading line has been processed by Strategy 1, so this line is skipped;
[0079] Strategy 3: This line is a redundant serial number line after the leading line, so this line is skipped;
[0080] Strategy 4_0: Perform regular expression matching on this paragraph of text: \s*(\d+([\..]{0,1}\d)*)\s*$, Result 1 is the serial number; Perform regular expression matching on this paragraph: (.*?)\s(.*), Result 1 is the Chinese term;
[0081] Strategy 4_1: Perform regular expression matching on the previous paragraph of text: \s*(\d+([\..]{0,1}\d)*)\s*$, Result 1 is the serial number; This paragraph of text is the Chinese term;
[0082] Strategy 5_0: Get the conceptEntry tag obtained by mapping term_tag, and perform regular matching on this paragraph of text: (.*?)\s(.*). Result 1 is the Chinese term. According to the font of the Chinese term, determine whether it is a preferred term or an allowed term, determine whether it has been replaced, and process the corresponding word list.
[0083] Strategy 5_1: Get the conceptEntry tag obtained by mapping term_tag, and perform regular matching on this paragraph of text: (.*?)\s(.*), and the result 1 is the language code; determine whether it is replaced. In this paragraph, the part after the language code is a number of corresponding words, extract the corresponding words and determine the preferred term and allowed term;
[0084] Strategy 5_2: Obtain the langSec tag from en_term_tag mapping; extract the symbol, and make judgments on preferred terms and permitted terms; perform regular matching on this paragraph of text: .*\[(.*)\], and the result 1 is the source of the symbol;
[0085] Strategy 6: Get the conceptEntry tag from term_tag mapping, and perform regular matching on this paragraph of text: \[(source[::]){0,1}(.*?)[,,](.*?)\], the result is 1, which is the term source;
[0086] Strategy 7: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: \s*note\s{0,1}\d{0,1}[::](.*), and the result 1 is the term note;
[0087] Strategy 8: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: (example\s{0,1}\d{0,1})[::](.*), and the result 1 is the term example;
[0088] Strategy 9: Get the sec tag from the root_tag mapping, and perform regular matching on this paragraph of text: ^(\d+([\..]{0,1}\d)*)\s*(.*)?, result 1 is the sequence number, and result 3 is the title name;
[0089] Strategy 10: Get the conceptEntry tag from the term_tag mapping. This paragraph of text is the abbreviation term.
[0090] Strategy 11: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: <(.*)>. Result 1 is the domain. In this paragraph of text, the part after the domain is the term definition.
[0091] Strategy 12: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: see [::] (.*), and the result 1 is see.
[0092] The present invention has the following advantages: pre-processing the terminology file by setting a processing strategy to obtain the extraction range of the terminology file; the pre-processing steps are: dividing the terminology file into lines; filtering out irrelevant information from the divided terminology file according to the position information of the characters on the page, and completing the missing space characters; judging whether there is a first line indentation between two adjacent lines according to the horizontal and vertical coordinate information of the first character of the line, and dividing the paragraphs according to the segmentation rules; using regular matching to obtain the first-level title of the standard terminology file, and defining the paragraph between the "Terminology and Definition" title and the next first-level title as the extraction range. A number of preset rules are collected to build a rule library; the text within the extraction range is traversed and judged according to the set process and judgment order until the rules in the rule library are adapted; the text within the extraction range is processed according to the adaptation rules to obtain the processed text; the corresponding processing strategy is obtained according to the adaptation rule mapping; the processed text is parsed according to the corresponding processing strategy, and XML tags are constructed for embedding, and a structured terminology and definition XML file is output. The present invention pre-processes the original standard terminology file, divides the lines, filters and completes the characters, divides the paragraphs, and defines the extraction range; the paragraphs in the extraction range are matched according to the rules one by one, the paragraphs are parsed according to the processing method obtained by mapping the matching results, the xml tags are constructed and embedded in the corresponding positions, and finally the structured terminology and definition xml files are obtained. The present invention can more effectively utilize the published national standards, quickly and accurately construct standard terminology resources, assist in the writing of terms in the standards, help improve the standardization and accuracy of terminology writing, improve the consistency and coordination of terms in related fields, and is of great significance for strengthening the overall coordination, integration, sharing and protection of terminology resources, and ensuring the healthy, sustainable development and long-term effective use of my country's terminology resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the drawings required for the implementation methods or the prior art descriptions are briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0094] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0095] Figure 1 A schematic diagram of a flow chart of a method for extracting structured standard terms provided in Example 1 of the present invention;
[0096] Figure 2 A schematic diagram of the architecture of a standard terminology structured extraction device provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0097] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0098] Example 1
[0099] See also Figure 1 Embodiment 1 of the present invention provides a method for extracting structured standard terms, including:
[0100] S1. Preprocessing the terminology file by setting a processing strategy to obtain an extraction range of the terminology file;
[0101] S2, a plurality of preset rules are collected to construct a rule base; the text within the extraction range is traversed and judged according to the set process and judgment order, until the rules in the rule base are adapted; the text within the extraction range is processed according to the adapted rules to obtain the processed text;
[0102] S3. Obtain a corresponding processing strategy according to the adaptation rule mapping; parse and process the processed text according to the corresponding processing strategy, construct XML tags for embedding, and output structured terminology and definition XML files.
[0103] In this embodiment, in step S1, the terminology file is preprocessed by setting a processing strategy to obtain an extraction range of the terminology file;
[0104] Specifically, the preprocessing steps are:
[0105] S11, dividing the terminology file into rows;
[0106] Specifically, the character list of the terminology file is traversed word by word, and characters with similar vertical coordinates are appended, merged and divided into the same line.
[0107] S12, filtering out irrelevant information from the divided terminology file according to the position information of the characters on the page, and completing the missing space characters;
[0108] Specifically, irrelevant information such as headers, footers, and page numbers are filtered out according to the position information of the characters on the page, and the missing space characters are completed.
[0109] S13, judging whether there is a first line indent between two adjacent lines according to the horizontal and vertical coordinate information of the first character of the line, and dividing the paragraphs according to the segmentation rules;
[0110] Specifically, according to the horizontal and vertical coordinate information of the first character of the line, it is determined whether there is a first line indent between two adjacent lines. For two adjacent lines that meet the first line indent, the two lines and the following lines are merged into one section; for lines that do not meet the first line indent, each line is formed into a section.
[0111] S14. Use regular matching to obtain the first-level title of the standard terminology file, and define the paragraph between the "Terms and Definitions" title and the next first-level title as the extraction scope.
[0112] In this embodiment, in step S2, a plurality of preset rules are collected to construct a rule base; the text within the extraction range is traversed and judged according to the set process and judgment order, until the rules in the rule base are adapted; the text within the extraction range is processed according to the adapted rules to obtain the processed text;
[0113] Specifically, a rule library is constructed, and a process and judgment sequence are set. The text within the extraction range is sequentially traversed through the judgment rule conditions until a rule is hit, and the text within the extraction range is processed according to the adaptation rule to obtain the processed text;
[0114] The rules in the rule base include:
[0115] Rule 1: <term and definition>, conforming to the regularity ^(\d)+\.{0,1}\s+(term [and|and] definition)$;
[0116] Rule 2: <Introduction>, this paragraph complies with Rule 1, and the text of this paragraph complies with the regular expression .+(term [and|and] definition);
[0117] Rule 3: Sequence number, this paragraph of text conforms to the regular expression: \s*(\d+([\..]{0,1}\d)*)\s*$;
[0118] Rule 4_0: <Preferred term>, the previous paragraph complies with Rule 3, and the text of this paragraph complies with the regular expression: (.*?)\s(.*);
[0119] Rule 4_1: <Preferred term> (only Chinese), it is required that this paragraph is not the last paragraph, the previous paragraph complies with Rule 3, and the text of the next paragraph complies with the regular expression: ([a-zA-Z]{2})\s(.*);
[0120] Rule 5_0: <Preferred term> / <Permissible term>, the previous paragraph complies with Rule 5 or Rule 4, and the text of this paragraph complies with the regular expression: (.*?)\s(.*), and the previous paragraph complies with Rule 4 or Rule 5;
[0121] Rule 5_1: <Preferred term> (multilingual), the previous paragraph complies with Rule 5 or Rule 4, and the text of this paragraph complies with the regular expression: ([a-zA-Z]{2})\s(.*), and the language code is in the preset vocabulary list;
[0122] Rule 5_2: Symbol, the text of this paragraph is regularly matched: \[(.*)\], and the result obtained by the match is in the preset symbol table;
[0123] Rule 6: <Term source>, the text of this paragraph complies with the regular expression: \[(source[::]){0,1}(.*?)[,,](.*?)\];
[0124] Rule 7: <Term note>, the text of this paragraph complies with the regular expression: \s*Note\s{0,1}\d{0,1}[::](.*);
[0125] Rule 8: <Term example>, the text of this paragraph complies with the regular expression: (Example\s{0,1}\d{0,1})[::](.*);
[0126] Rule 9: <n-level term classification>, the previous paragraph complies with Rule 3, and the text of this paragraph does not comply with the regular expression: (.*?)\s(.*);
[0127] Rule 10: <Abbreviation form>, the previous paragraph complies with Rule 4 or Rule 5; and the similarity between the text of this paragraph and the current <Chinese term> is not less than 0.4;
[0128] Rule 11: <Term definition>, the previous paragraph complies with Rule 4 or Rule 5 or Rule 10;
[0129] Rule 12: <See>, the text of this paragraph complies with the regular expression: See[::](.*).
[0130] In this embodiment, in step S3, a corresponding processing strategy is obtained according to the adaptation rule mapping; the processed text is parsed according to the corresponding processing strategy, and an XML tag is constructed for embedding, and a structured term and definition XML file is output.
[0131] Specifically, according to the rule matching hit rule obtained in step S2, the processing strategy is mapped, parsing is performed through reflection, XML tags are constructed and embedded in corresponding positions, and finally a structured terminology and definition XML file is obtained.
[0132] The corresponding processing strategies of the rule mapping in the rule base include:
[0133] Strategy 1: Start extraction and perform regular matching on this paragraph of text: ^(\d)+\.{0,1}\s+(term [and|and] definition)$, result 1 is the sequence number, and result 2 is the title;
[0134] Construct the basic XML framework:
[0135] “ <tbx>
[0136] <tbxheader>
[0137] <filedesc>
[0138] <sourcedesc> ..< / sourcedesc>
[0139] < / filedesc>
[0140] < / tbxheader>
[0141] <text>
[0142]
[0143] <sec sec-type="terms">
[0144] <label> Serial number< / label>
[0145] <title> title< / title>
[0146]
[0147]
[0148] < / text>
[0149] < / tbx> ”
[0150] By default, the next line is an introductory statement, and the introductory statement tag is constructed and embedded in the XML framework.
[0151] Initialize global variables:
[0152] The document root node doc_root_tag is mapped to <tbx>Label
[0153] The root tag root_tag to be edited is mapped to the <sec sec-type="terms"> tag.
[0154] Strategy 2: This line is a leading statement line. The leading statement has been processed by Strategy 1, so this line is skipped.
[0155] Strategy 3: This line is a redundant serial number line after the leading statement, so this line is skipped.
[0156] Strategy 4_0: Regular matching is performed on the text of this paragraph: \s*(\d+([\..]{0,1}\d)*)\s*$, and the result 1 is the serial number; regular matching for this paragraph: (.*?)\s(.*), and the result 1 is the Chinese term.
[0157] Construct the conceptEntry tag:
[0158] "<conceptEntry id = serial number>
[0159] ”
[0160] Judge whether the term is replaced
[0161] Construct the langSec tag for the Chinese term and embed it into the conceptEntry tag:
[0162] "<langSec xml:lang = "zn">
[0163] <termsec>
[0164] <term> Chinese terminology< / term>
[0165] <termNotetype="normativeAuthorization">[preferredTerm|deprecatedTerm]
[0166] <termNote type="termType">fullForm
[0167] < / termsec>
[0168] ”
[0169] After the end position of the Chinese term in this paragraph are several corresponding words. Extract the corresponding words and perform the judgment of preferred and permitted corresponding words, and the judgment of whether they are replaced.
[0170] For the corresponding words, construct the langSec tag and embed it into the conceptEntry tag:
[0171] "<langSec xml:lang = "en">
[0172] <termsec>
[0173] <term> Corresponding words< / term>
[0174] <termNote
[0175] type="normativeAuthorization">[preferredTerm|admittedTerm|deprecatedTerm]
[0176] <termNote type="termType">fullForm
[0177] < / termsec>
[0178] ”
[0179] Map the global variable current term tag term_tag to the conceptEntry tag.
[0180] Strategy 4_1: Regularly match the previous paragraph of text: \s*(\d+([\..]{0,1}\d)*)\s*$, and the result 1 is the serial number; the text of this paragraph is the Chinese term;
[0181] Construct the langSec tag and embed the root_tag:
[0182] "<langSec xml:lang="zn">
[0183] <termsec>
[0184] <term> Chinese terminology< / term>
[0185] <termNotetype="normativeAuthorization">[preferredTerm|deprecatedTerm]
[0186] <termNote type="termType">fullForm
[0187] < / termsec>
[0188] ”.
[0189] Strategy 5_0: Obtain the conceptEntry tag mapped by the term_tag, and regularly match this paragraph of text: (.*?)\s(.*), and the result 1 is the Chinese term; judge whether it is a preferred term or a permitted term according to the font of the Chinese term, judge whether it is replaced, and process the corresponding word list; construct the tag and embed it into the conceptEntry tag.
[0190] Strategy 5_1: Obtain the conceptEntry tag mapped by the term_tag, and regularly match this paragraph of text: (.*?)\s(.*), and the result 1 is the language code; judge whether it is replaced. In this paragraph, the part after the language code is several corresponding words, extract the corresponding words and make a preferred term and permitted term judgment;
[0191] Construct the langSec tag and embed it into the conceptEntry tag:
[0192] "<langSec xml:lang=language code>
[0193] <termsec>
[0194] <term> Corresponding word 1< / term>
[0195] <termNotetype="normativeAuthorization">[preferredTerm|admittedTerm]
[0196] <termNote type="termType">fullForm
[0197] < / termsec>
[0198] <termsec>
[0199] <term> Corresponding word 2< / term>
[0200] <termNotetype="normativeAuthorization">[preferredTerm|admittedTerm]
[0201] <termNote type="termType">fullForm
[0202] < / termsec>
[0203] ”.
[0204] Strategy 5_2: Obtain the langSec tag mapped by the en_term_tag; extract the symbols and make a preferred term and permitted term judgment;
[0205] Construct the termSec tag and embed it into the langSec tag:
[0206] " <termsec>
[0207] <term>
[0208] <hi type="italic"> symbol
[0209] < / term>
[0210] <termNote
[0211] type="normativeAuthorization">[preferred|admittedTerm]
[0212] <termNote type="termType">symbol
[0213] < / termsec> ”
[0214] Regularly match this paragraph of text:.*\[(.*)\], and the result 1 is the symbol source;
[0215] If it matches, construct a descrip tag and embed the termSec tag:
[0216] "<descrip type="source"> The source of the symbol".
[0217] Strategy 6: Get the conceptEntry tag from term_tag mapping, and perform regular matching on this paragraph of text: \[(source[::]){0,1}(.*?)[,,](.*?)\], the result is 1, which is the term source;
[0218] Build the source tag and embed the conceptEntry tag:
[0219] <source type="source"> Terminology Note
[0220] Strategy 7: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: \s*note\s{0,1}\d{0,1}[::](.*), and the result 1 is the term note;
[0221] Construct the descrip tag and embed the conceptEntry tag:
[0222] "<descrip type="note"> "Term Note".
[0223] Strategy 8: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: (example\s{0,1}\d{0,1})[::](.*), and the result 1 is the term example;
[0224] Construct the descrip tag and embed the conceptEntry tag:
[0225] "<descrip type="example"> Terminology Examples".
[0226] Strategy 9: Get the sec tag from the root_tag mapping, and perform regular matching on this paragraph of text: ^(\d+([\..]{0,1}\d)*)\s*(.*)?, result 1 is the sequence number, and result 3 is the title name;
[0227] Construct label and title tags and embed sec tags:
[0228] " <label> Serial number< / label>
[0229] <title> Title Name< / title> ”.
[0230] Strategy 10: Map from the term_tag to obtain the conceptEntry label, and this paragraph of text is the abbreviated term;
[0231] Construct the termSec label and embed it into the conceptEntry label
[0232] " <termsec>
[0233] <term> Abbreviations< / term>
[0234] <termNote type="normativeAuthorization">admittedTerm
[0235] <termNote type="termType">acronym
[0236] < / termsec> ”.
[0237] Strategy 11: Map from the term_tag to obtain the conceptEntry label, and perform a regular match on this paragraph of text: <(.*)>, and the result 1 is the domain;
[0238] Construct the label descrip:
[0239] "<descrip type="definition">”
[0240] In this paragraph of text, the part after the domain is the term definition; traverse the term definition character by character. For the reference terms and reference numbers encountered, construct the hi label and append it to the descrip label:
[0241] "<hi target= reference number> reference term”
[0242] For other characters, append them to the descrip label as text; after traversing, embed the descrip label into the conceptEntry label.
[0243] Strategy 12: Map from the term_tag to obtain the conceptEntry label, and perform a regular match on this paragraph of text: See [::](.*), and the result 1 is the reference;
[0244] Construct the descrip label and embed it into the conceptEntry label:
[0245] "<descrip type="see">
[0246] <hi type="entailedTerm"target= serial number> reference
[0247] ”.
[0248] In summary, the present invention pre-processes the terminology file by setting a processing strategy to obtain the extraction range of the terminology file; the pre-processing steps are: dividing the terminology file into lines; filtering out irrelevant information from the divided terminology file according to the position information of the characters on the page, and completing the missing space characters; judging whether there is a first line indentation between two adjacent lines according to the horizontal and vertical coordinate information of the first character of the line, and dividing the paragraphs according to the segmentation rules; using regular matching to obtain the first-level title of the standard terminology file, and defining the paragraph between the "Terminology and Definition" title and the next first-level title as the extraction range. Collecting several preset rules to build a rule library; traversing the judgment rule conditions of the text within the extraction range according to the set process and judgment order until the rules in the rule library are adapted; processing the text within the extraction range according to the adaptation rules to obtain the processed text; obtaining the corresponding processing strategy according to the adaptation rule mapping; parsing the processed text according to the corresponding processing strategy, and constructing XML tags for embedding, and outputting the structured terminology and definition XML file. The present invention pre-processes the original standard terminology file, divides the lines, filters and completes the characters, divides the paragraphs, and defines the extraction range; the paragraphs in the extraction range are matched according to the rules one by one, the paragraphs are parsed according to the processing method obtained by mapping the matching results, the xml tags are constructed and embedded in the corresponding positions, and finally the structured terminology and definition xml files are obtained. The present invention can more effectively utilize the published national standards, quickly and accurately construct standard terminology resources, assist in the writing of terms in the standards, help improve the standardization and accuracy of terminology writing, improve the consistency and coordination of terms in related fields, and is of great significance for strengthening the overall coordination, integration, sharing and protection of terminology resources, and ensuring the healthy, sustainable development and long-term effective use of my country's terminology resources.
[0249] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0250] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0251] Example 2
[0252] See also Figure 2 Embodiment 2 of the present invention provides a method and apparatus for extracting structured standard terms, including:
[0253] A terminology file preprocessing module 001 is used to preprocess the terminology file by setting a processing strategy to obtain an extraction range of the terminology file;
[0254] The rule matching module 002 is used to collect a number of preset rules to construct a rule base; traverse the text within the extraction range according to the set process and judgment order to judge the rule conditions until the rules in the rule base are adapted; process the text within the extraction range according to the adapted rules to obtain the processed text;
[0255] The parsing and processing module 003 is used to obtain a corresponding processing strategy according to the adaptation rule mapping; parse and process the processed text according to the corresponding processing strategy, construct XML tags for embedding, and output structured terms and definition XML files.
[0256] In this embodiment, in the terminology file preprocessing module 001, the preprocessing submodule includes:
[0257] The row division submodule 011 is used to divide the terminology file into rows;
[0258] The character filtering and completion submodule 012 is used to filter out irrelevant information from the divided terminology file according to the position information of the characters on the page, and to complete the missing space characters;
[0259] The paragraph division submodule 013 is used to determine whether there is a first line indent between two adjacent lines according to the horizontal and vertical coordinate information of the first character of the line, and divide the paragraphs according to the segmentation rules;
[0260] The extraction scope definition submodule 014 is used to obtain the first-level title of the standard terminology file by using regular matching, and define the paragraph between the "Terms and Definitions" title and the next first-level title as the extraction scope.
[0261] In this embodiment, in the terminology file preprocessing module 001, in the process of dividing paragraphs according to the segmentation rule, the segmentation rule is:
[0262] For two adjacent lines that meet the first line indentation requirement, the two lines and the following lines are combined into one paragraph; for lines that do not meet the first line indentation requirement, each line becomes a separate paragraph.
[0263] In this embodiment, in the rule matching module 002, the rules in the rule base include:
[0264] Rule 1: <Terminology and Definitions>, which conforms to the regular expression ^(\d)+\.{0,1}\s+(Terminology [and|with] Definitions)$;
[0265] Rule 2: <Lead-in>, this paragraph conforms to Rule 1, and the text of this paragraph conforms to the regular expression.+(Terminology [and|with] Definitions);
[0266] Rule 3: Serial number, the text of this paragraph conforms to the regular expression: \s*(\d+([\..]{0,1}\d)*)\s*$;
[0267] Rule 4_0: <Preferred Term>, the previous paragraph conforms to Rule 3, and the text of this paragraph conforms to the regular expression: (.*?)\s(.*);
[0268] Rule 4_1: <Preferred Term> (only in Chinese), it is required that this paragraph is not the last paragraph, the previous paragraph conforms to Rule 3, and the text of the next paragraph conforms to the regular expression: ([a-zA-Z]{2})\s(.*);
[0269] Rule 5_0: <Preferred Term> / <Permissible Term>, the previous paragraph conforms to Rule 5 or Rule 4, and the text of this paragraph conforms to the regular expression: (.*?)\s(.*), and the previous paragraph conforms to Rule 4 or Rule 5;
[0270] Rule 5_1: <Preferred Term> (multilingual), the previous paragraph conforms to Rule 5 or Rule 4, and the text of this paragraph conforms to the regular expression: ([a-zA-Z]{2})\s(.*), and the language code is in the preset vocabulary list;
[0271] Rule 5_2: Symbol, the text of this paragraph is regularly matched: \[(.*)\], and the result obtained from the match is in the preset symbol table;
[0272] Rule 6: <Term Source>, the text of this paragraph conforms to the regular expression: \[(Source[::]){0,1}(.*?)[,,](.*?)\];
[0273] Rule 7: <Term Note>, the text of this paragraph conforms to the regular expression: \s*Note\s{0,1}\d{0,1}[::](.*);
[0274] Rule 8: <Term Example>, the text of this paragraph conforms to the regular expression: (Example\s{0,1}\d{0,1})[::](.*);
[0275] Rule 9: <n-level Term Classification>, the previous paragraph conforms to Rule 3, and the text of this paragraph does not conform to the regular expression: (.*?)\s(.*);
[0276] Rule 10: <Abbreviation Form>, the previous paragraph conforms to Rule 4 or Rule 5; and the similarity between the text of this paragraph and the current <Chinese Term> is not less than 0.4;
[0277] Rule 11: <Definition of term>, the preceding paragraph complies with Rule 4 or Rule 5 or Rule 10;
[0278] Rule 12: <See>, this paragraph of text meets the regular expression: See [::] (.*).
[0279] In this embodiment, in the analysis processing module 003, the corresponding processing strategies of the rule mapping in the rule base include:
[0280] Strategy 1: Start extraction and perform regular matching on this paragraph of text: ^(\d)+\.{0,1}\s+(term [and|and] definition)$, result 1 is the sequence number, and result 2 is the title;
[0281] Strategy 2: This line is an introductory line. The introductory line has been processed by Strategy 1, so this line is skipped.
[0282] Strategy 3: This line is a redundant serial number line after the introduction, so it is skipped;
[0283] Strategy 4_0: Regular expression matching of this paragraph: \s*(\d+([\..]{0,1}\d)*)\s*$, result 1 is the sequence number; Regular expression matching of this paragraph: (.*?)\s(.*), result 1 is the Chinese term;
[0284] Strategy 4_1: Perform regular expression matching on the previous text: \s*(\d+([\..]{0,1}\d)*)\s*$, the result 1 is the sequence number; this text is the Chinese term;
[0285] Strategy 5_0: Get the conceptEntry tag obtained by mapping term_tag, and perform regular matching on this paragraph of text: (.*?)\s(.*). Result 1 is the Chinese term. According to the font of the Chinese term, determine whether it is a preferred term or an allowed term, determine whether it has been replaced, and process the corresponding word list.
[0286] Strategy 5_1: Get the conceptEntry tag obtained by mapping term_tag, and perform regular matching on this paragraph of text: (.*?)\s(.*), and the result 1 is the language code; determine whether it is replaced. In this paragraph, the part after the language code is a number of corresponding words, extract the corresponding words and determine the preferred term and allowed term;
[0287] Strategy 5_2: Obtain the langSec tag from en_term_tag mapping; extract the symbol, and make judgments on preferred terms and permitted terms; perform regular matching on this paragraph of text: .*\[(.*)\], and the result 1 is the source of the symbol;
[0288] Strategy 6: Get the conceptEntry tag from term_tag mapping, and perform regular matching on this paragraph of text: \[(source[::]){0,1}(.*?)[,,](.*?)\], the result is 1, which is the term source;
[0289] Strategy 7: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: \s*note\s{0,1}\d{0,1}[::](.*), and the result 1 is the term note;
[0290] Strategy 8: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: (example\s{0,1}\d{0,1})[::](.*), and the result 1 is the term example;
[0291] Strategy 9: Get the sec tag from the root_tag mapping, and perform regular matching on this paragraph of text: ^(\d+([\..]{0,1}\d)*)\s*(.*)?, result 1 is the sequence number, and result 3 is the title name;
[0292] Strategy 10: Get the conceptEntry tag from the term_tag mapping. This paragraph of text is the abbreviation term.
[0293] Strategy 11: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: <(.*)>. Result 1 is the domain. In this paragraph of text, the part after the domain is the term definition.
[0294] Strategy 12: Get the conceptEntry tag from the term_tag mapping, and perform regular matching on this paragraph of text: see [::] (.*), and the result 1 is see.
[0295] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown in the previous part of the present application, and will not be repeated here.
[0296] Example 3
[0297] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which a program code of a synchrotron radiation micro-CT reconstruction method based on decomposed diffusion sampling is stored, and the program code includes instructions for executing the synchrotron radiation micro-CT reconstruction method based on decomposed diffusion sampling of Embodiment 1 or any possible implementation thereof.
[0298] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0299] Example 4
[0300] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0301] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the synchrotron radiation micro-CT reconstruction method based on decomposition diffusion sampling of Example 1 or any possible implementation thereof.
[0302] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0303] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0304] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0305] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.< / tbx>
Claims
1. A standard term structured extraction method, characterized in that: Including: Preprocessing the term file by setting a processing strategy to obtain the extraction range of the term file; Collecting a number of preset rules to build a rule library; traversing and judging the rule conditions for the text within the extraction range according to the set process and judgment order until the rules in the rule library are adapted; processing the text within the extraction range according to the adapted rules to obtain the processed text; Mapping to obtain the corresponding processing strategy according to the adapted rules; parsing and processing the processed text according to the corresponding processing strategy, and constructing xml tags for embedding to output the structured terms and definition xml file.
2. A method for extracting structured standard terms according to claim 1, characterized in that: During the preprocessing of the term file by the set processing strategy, the steps of the preprocessing are: Performing line division processing on the term file; Filtering out irrelevant information from the divided term file according to the position information of the characters on the page, and complementing the missing space characters; Judging whether there is a first-line indentation between adjacent two lines according to the horizontal and vertical coordinate information of the first character of the line, and dividing paragraphs according to the segmentation rules; Using regular matching to obtain the first-level title of the standard term file, and defining the paragraph between the title of "Terms and Definitions" and the next first-level title as the extraction range.
3. A method for extracting structured standard terms according to claim 2, characterized in that: During the process of dividing paragraphs according to the segmentation rules, the segmentation rules are: For adjacent two lines that meet the first-line indentation, merge the two lines and several subsequent lines into one paragraph; for lines that do not meet the first-line indentation, each line forms a separate paragraph.
4. A method for extracting structured standard terms according to claim 3, characterized in that: The rules in the rule library include: Rule 1: <Terms and Definitions>; Rule 2: <Lead-in>; Rule 3: Serial number; Rule 4_0: <Preferred Term>; Rule 4_1: <Preferred Term>; Rule 5_0: <Preferred Term> / <Permissible Term>; Rule 5_1: <Preferred Term>; Rule 5_2: Symbol; Rule 6: <Term Source>; Rule 7: <Term Note>; Rule 8: <Term Example>; Rule 9: <n-level Term Classification>; Rule 10: <Abbreviation Form>; Rule 11: <Term Definition>; Rule 12: <See Also> 5. A method for extracting structured standard terms according to claim 4, characterized in that: The corresponding processing strategies mapped by the rules in the rule library include: Strategy 1: Start extraction, perform regular matching on the text of this paragraph; Strategy 2: This line is a lead-in line, and the lead-in has been processed by Strategy 1, so this line is skipped; Strategy 3: This line is a redundant serial number line after the lead-in, so this line is skipped; Strategy 4_0: Perform regular matching on the text of this paragraph; Strategy 4_1: Perform regular matching on the text of the previous paragraph; Strategy 5_0: Obtain the conceptEntry tag mapped by term_tag, perform regular matching on the text of this paragraph; judge whether it belongs to the preferred term or the permissible term according to the Chinese term font, judge whether it is replaced, and process the corresponding word list; Strategy 5_1: Obtain the conceptEntry tag mapped by term_tag, perform regular matching on the text of this paragraph; judge whether it is replaced, in this paragraph, the part after the language code is several corresponding words, extract the corresponding words and perform preferred term and permissible term judgment; Strategy 5_2: Obtain the langSec tag from en_term_tag mapping; extract symbols, make judgments on preferred terms and permitted terms; perform regular expression matching on this paragraph of text; Strategy 6: Get the conceptEntry tag from the term_tag mapping and perform regular expression matching on this paragraph of text; Strategy 7: Get the conceptEntry tag from the term_tag mapping and perform regular expression matching on this paragraph of text; Strategy 8: Get the conceptEntry tag from the term_tag mapping and perform regular expression matching on this paragraph of text; Strategy 9: Get the sec tag from the root_tag mapping and perform regular expression matching on this paragraph of text; Strategy 10: Get the conceptEntry tag from the term_tag mapping. This paragraph of text is the abbreviation term. Strategy 11: Get the conceptEntry tag from the term_tag mapping and perform regular expression matching on this paragraph of text; Strategy 12: Get the conceptEntry tag from the term_tag mapping and perform regular expression matching on this paragraph of text.
6. A method and apparatus for extracting structured standard terms, using a method for extracting structured standard terms as claimed in any one of claims 1 to 5, characterized in that: include: A terminology file preprocessing module, used to preprocess the terminology file by setting a processing strategy to obtain an extraction range of the terminology file; A rule matching module is used to collect a number of preset rules to construct a rule base; the text within the extraction range is traversed and judged according to the set process and judgment order until the rules in the rule base are adapted; the text within the extraction range is processed according to the adapted rules to obtain the processed text; The parsing and processing module is used to obtain the corresponding processing strategy according to the adaptation rule mapping; parse and process the processed text according to the corresponding processing strategy, construct XML tags for embedding, and output structured terms and definition XML files.
7. A method and apparatus for extracting structured standard terms according to claim 6, characterized in that: In the terminology file preprocessing module, the preprocessing submodule includes: A row division submodule, used for dividing the term file into rows; The character filtering and completion submodule is used to filter out irrelevant information from the divided terminology file according to the position information of the characters on the page, and complete the missing space characters; The paragraph division submodule is used to determine whether there is a first line indent between two adjacent lines based on the horizontal and vertical coordinate information of the first character of the line, and divide the paragraphs according to the segmentation rules; The extraction scope definition submodule is used to obtain the first-level title of the standard terminology file using regular matching, and define the paragraph between the "Terms and Definitions" title and the next first-level title as the extraction scope.
8. A method and apparatus for extracting structured standard terms according to claim 7, characterized in that: In the term file preprocessing module, in the process of dividing paragraphs according to the segmentation rule, the segmentation rule is: For two adjacent lines that meet the first line indentation requirement, the two lines and the following lines are combined into one paragraph; for lines that do not meet the first line indentation requirement, each line becomes a separate paragraph.
9. A method and apparatus for extracting structured standard terms according to claim 8, characterized in that: In the rule matching module, the rules in the rule base include: Rule 1: <Terms and Definitions>; Rule 2: <Introduction>; Rule 3: Sequence number; Rule 4_0: <preferred term>; Rule 4_1: <preferred term>; Rule 5_0: <Preferred Term> / <Permissible Term>; Rule 5_1: <Preferred Term>; Rule 5_2: Symbol; Rule 6: <Term Source>; Rule 7: <Term Note>; Rule 8: <Term Example>; Rule 9: <n-level Term Classification>; Rule 10: <Abbreviation Form>; Rule 11: <Term Definition>; Rule 12: <See Also>.
10. The method and apparatus for extracting structured standard terms according to claim 6, characterized in that: In the parsing and processing module, the corresponding processing strategies mapped by the rules in the rule library include: Strategy 1: Start extraction and perform regular matching on this paragraph of text; Strategy 2: This line is a leading line, and the leading line has been processed by Strategy 1, so this line is skipped; Strategy 3: This line is a redundant serial number line after the leading line, so this line is skipped; Strategy 4_0: Perform regular matching on this paragraph of text; Strategy 4_1: Perform regular matching on the previous paragraph of text; Strategy 5_0: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text; Judge whether it belongs to the preferred term or the permissible term according to the Chinese term font, judge whether it is replaced, and process the corresponding word list; Strategy 5_1: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text; Judge whether it is replaced. In this paragraph, the part after the language code is several corresponding words. Extract the corresponding words and perform the preferred term and permissible term judgment; Strategy 5_2: Obtain the langSec label mapped by en_term_tag; Extract symbols and perform the preferred term and permissible term judgment; Perform regular matching on this paragraph of text; Strategy 6: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text; Strategy 7: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text; Strategy 8: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text; Strategy 9: Obtain the sec label mapped by root_tag, and perform regular matching on this paragraph of text; Strategy 10: Obtain the conceptEntry label mapped by term_tag, and this paragraph of text is the abbreviated term; Strategy 11: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text; Strategy 12: Obtain the conceptEntry label mapped by term_tag, and perform regular matching on this paragraph of text.
Citation Information
Patent Citations
Standard term structured processing method
CN118114631A