Syntax analysis model reinforcing method and device, equipment and storage medium

CN116384374BActive Publication Date: 2026-10-13CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310480244.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2026-10-13
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

[0003]本公开提供一种句法分析模型强化方法、装置、设备及存储介质,至少在一定程度上克服了当前深度学习对自然语言文本的句法结构分析准确性较低的问题

Benefits of technology

[0047]本公开的实施例所提供的句法分析模型强化方法、装置、设备及存储介质,通过获取待分析文本信息,基于句法分析模型对待分析文本信息进行语法分析,得到语法分析结果,然后基于自然语言处理模型对句法分析结果进行考量,得到考量结果,在考量结果与句法分析结果不匹配的情况下,对句法分析模型进行优化,得到优化后的句法分析模型,本公开通过以考量结果对句法分析结果进行评价,然后基于评价结果对句法分析模型进行优化,可以使得基于句法分析模型得到的句法分析结果更加准确。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116384374B_ABST
    Figure CN116384374B_ABST
Patent Text Reader

Abstract

The disclosure provides a syntax analysis model strengthening method, device, equipment and storage medium. The method comprises the following steps: obtaining text information to be analyzed; performing syntax analysis on the text information to be analyzed based on a syntax analysis model to obtain a syntax analysis result; performing consideration on the syntax analysis result based on a natural language processing model to obtain a consideration result; and optimizing the syntax analysis model in a case where the consideration result does not match the syntax analysis result to obtain an optimized syntax analysis model. The disclosure evaluates the syntax analysis result based on the consideration result, and then optimizes the syntax analysis model based on the evaluation result. The syntax analysis result obtained based on the syntax analysis model is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for strengthening a syntactic analysis model. Background Technology

[0002] Automatic analysis of the syntactic structure of natural language text has always been an important research topic in the field of natural language processing (NLP). Introducing the syntactic structure of NLP text as prior knowledge into deep learning models has also gradually become a common method for NLP tasks, improving the accuracy and interpretability of deep learning models. Most existing syntactic analysis techniques are based on manually constructed rule models or require manually annotated syntactic analysis results as training targets, necessitating significant manual work. Furthermore, rule-based models struggle to handle ambiguity in sentences, while deep learning-based methods are susceptible to imbalanced training samples, resulting in poor syntactic analysis performance. Therefore, improving the accuracy of deep learning in analyzing the syntactic structure of natural language text is a pressing issue that needs to be addressed. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and storage medium for enhancing syntactic analysis models, which at least to some extent overcomes the problem of low accuracy in the syntactic structure analysis of natural language text by current deep learning.

[0004] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0005] According to one aspect of this disclosure, a method for strengthening syntactic analysis models is provided, comprising:

[0006] Obtain the text information to be analyzed;

[0007] Syntactic analysis is performed on the text information to be analyzed based on the syntactic analysis model to obtain the syntactic analysis results;

[0008] The results of syntactic analysis are evaluated based on a natural language processing model, and the evaluation results are obtained.

[0009] When the results of the evaluation do not match the results of the syntactic analysis, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0010] In one embodiment of this disclosure, the method further includes:

[0011] Syntactic analysis is performed on the text information to be analyzed based on the optimized syntactic analysis model, and the optimized syntactic analysis results are obtained.

[0012] The optimized syntactic analysis results are evaluated based on the natural language processing model to obtain the evaluation results corresponding to the optimized syntactic analysis results.

[0013] If the optimized syntactic analysis result matches the corresponding consideration result, the optimized syntactic analysis model is output.

[0014] In one embodiment of this disclosure, the method further includes:

[0015] Input the target text information to be analyzed into the optimized syntactic analysis model to obtain the target syntactic analysis result.

[0016] In one embodiment of this disclosure, the syntactic analysis model includes a BERT model and a natural language processing model;

[0017] Based on the syntactic analysis model, syntactic analysis is performed on the text information to be analyzed, and the syntactic analysis results are obtained, including:

[0018] Input the text information to be analyzed into the BERT model to obtain the word segmentation results corresponding to the text information to be analyzed;

[0019] The word segmentation results are input into a natural language processing model to obtain the syntactic analysis results of the word segmentation results.

[0020] In one embodiment of this disclosure, the syntactic analysis result includes multiple results, each of which corresponds to a probability of the current result;

[0021] The results of syntactic analysis are evaluated based on natural language processing models, and the evaluation results include:

[0022] Based on the natural language processing model, each result from the multiple results obtained from syntactic analysis is evaluated to obtain the evaluation result corresponding to each result.

[0023] In one embodiment of this disclosure, a mismatch between the consideration results and the syntactic analysis results includes:

[0024] There is at least one syntactic analysis result that does not match the corresponding consideration result.

[0025] According to another aspect of this disclosure, a syntactic analysis model enhancement device is provided, comprising:

[0026] The acquisition module is used to acquire the text information to be analyzed.

[0027] The first analysis module is used to perform syntactic analysis on the text information to be analyzed based on the syntactic analysis model, and obtain the syntactic analysis results.

[0028] The first consideration module is used to evaluate the syntactic analysis results based on the natural language processing model and obtain the evaluation results.

[0029] The optimization module is used to optimize the syntactic analysis model when the evaluation results do not match the syntactic analysis results, resulting in an optimized syntactic analysis model.

[0030] In one embodiment of this disclosure, the apparatus further includes:

[0031] The second analysis module is used to perform syntactic analysis on the text information to be analyzed based on the optimized syntactic analysis model, and obtain the optimized syntactic analysis results.

[0032] The second consideration module is used to evaluate the optimized syntactic analysis results based on the natural language processing model, and obtain the evaluation results corresponding to the optimized syntactic analysis results;

[0033] The output module is used to output the optimized syntactic analysis model when the optimized syntactic analysis result matches the corresponding consideration result.

[0034] In one embodiment of this disclosure, the apparatus further includes:

[0035] The input module is used to input the target text information to be analyzed into the optimized syntactic analysis model to obtain the target syntactic analysis result.

[0036] In one embodiment of this disclosure, the syntactic analysis model includes a BERT model and a natural language processing model;

[0037] The first analysis module includes:

[0038] The first input unit is used to input the text information to be analyzed into the BERT model and obtain the word segmentation results corresponding to the text information to be analyzed.

[0039] The second input unit is used to input the word segmentation results into the natural language processing model to obtain the syntactic analysis results of the word segmentation results.

[0040] In one embodiment of this disclosure, the syntactic analysis result includes multiple results, each of which corresponds to a probability of the current result;

[0041] The first consideration module includes:

[0042] The consideration unit is used to consider each of the multiple results obtained from syntactic analysis based on the natural language processing model, and to obtain the consideration result corresponding to each result.

[0043] In one embodiment of this disclosure, a mismatch between the consideration results and the syntactic analysis results includes:

[0044] There is at least one syntactic analysis result that does not match the corresponding consideration result.

[0045] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described syntactic analysis model enhancement method by executing the executable instructions.

[0046] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described syntactic analysis model enhancement method.

[0047] The syntactic analysis model enhancement method, apparatus, device, and storage medium provided in the embodiments of this disclosure acquire text information to be analyzed, perform syntactic analysis on the text information based on the syntactic analysis model to obtain syntactic analysis results, then evaluate the syntactic analysis results based on a natural language processing model to obtain evaluation results, and optimize the syntactic analysis model when the evaluation results do not match the syntactic analysis results to obtain an optimized syntactic analysis model. This disclosure evaluates the syntactic analysis results with evaluation results and then optimizes the syntactic analysis model based on the evaluation results, which can make the syntactic analysis results obtained based on the syntactic analysis model more accurate.

[0048] 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

[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0050] Figure 1 This diagram illustrates a flowchart of a syntactic analysis model enhancement method according to an embodiment of the present disclosure;

[0051] Figure 2 This diagram illustrates another syntax analysis model enhancement method in an embodiment of the present disclosure.

[0052] Figure 3 This diagram illustrates a flowchart of another syntactic analysis model enhancement method in an embodiment of the present disclosure.

[0053] Figure 4 This diagram illustrates a flowchart of yet another syntactic analysis model enhancement method in an embodiment of this disclosure;

[0054] Figure 5 This diagram illustrates a flowchart of yet another syntactic analysis model enhancement method in an embodiment of this disclosure;

[0055] Figure 6 This diagram illustrates a syntactic analysis result in an embodiment of the present disclosure.

[0056] Figure 7 This diagram illustrates a syntactic analysis model enhancement device according to an embodiment of the present disclosure.

[0057] Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0058] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0059] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0060] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0061] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0062] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0063] To address the aforementioned issues, this disclosure provides a method, apparatus, device, and storage medium for strengthening syntactic analysis models.

[0064] For ease of understanding, the embodiments of this disclosure first describe the syntactic analysis model enhancement method.

[0065] It should be noted that the syntactic analysis model enhancement method can be applied to terminal devices or servers.

[0066] It should be noted that terminal devices can be various electronic devices, including but not limited to smartphones, tablets, laptops, desktop computers, wearable devices, augmented reality devices, virtual reality devices, etc.

[0067] In one embodiment, the syntactic analysis model enhancement apparatus for performing the syntactic analysis model enhancement method can be located on a server.

[0068] Optionally, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal device and the server can be connected directly or indirectly through wired or wireless communication, which is not limited herein.

[0069] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0070] Figure 1 A flowchart of a syntactic analysis model enhancement method according to an embodiment of this disclosure is shown.

[0071] like Figure 1 As shown, the method may include:

[0072] S101, Obtain the text information to be analyzed.

[0073] In one embodiment, the text information to be analyzed may include text information entered by the user and text information obtained from the network.

[0074] In one embodiment, the aforementioned text information can be obtained from the network based on a worm algorithm.

[0075] In one embodiment, the text information may include text information consisting of words.

[0076] S102, perform syntactic analysis on the text information to be analyzed based on the syntactic analysis model, and obtain the syntactic analysis results.

[0077] In one embodiment, the syntactic analysis model may include the BERT model.

[0078] In one embodiment, the syntactic analysis model may have a correspondence between text and vectors. Based on this correspondence, the model can represent the text information to be analyzed using vectors. After obtaining the vector representation of the text information, the model can segment the text information into multiple word groups based on these vector representations, and then determine the syntactic analysis results between the word groups. These syntactic analysis results may include lexical relationships between the word groups.

[0079] In one embodiment, the syntactic analysis model may also include a language processing model.

[0080] S103, the results of syntactic analysis are evaluated based on the natural language processing model to obtain the evaluation results.

[0081] In one embodiment, considering the syntactic analysis results may include inputting the syntactic analysis results into a natural language processing model, and then having the natural language processing model consider the syntactic analysis results.

[0082] In one embodiment, considering the results of syntactic analysis may further include performing a natural language processing task on the syntactic analysis results. The natural language processing task then evaluates the syntactic analysis results.

[0083] S104. In cases where the evaluation results do not match the syntactic analysis results, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0084] In one embodiment, optimizing the syntactic analysis model can include a variety of optimization methods.

[0085] In one embodiment, optimization may include multiple training iterations and adjustments to the model's parameters.

[0086] The syntactic analysis model enhancement method provided in the embodiments of this disclosure obtains the text information to be analyzed, performs syntactic analysis on the text information based on the syntactic analysis model to obtain the syntactic analysis result, and then evaluates the syntactic analysis result based on the natural language processing model to obtain the evaluation result. If the evaluation result does not match the syntactic analysis result, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model. This disclosure evaluates the syntactic analysis result with the evaluation result and then optimizes the syntactic analysis model based on the evaluation result, which can make the syntactic analysis result obtained based on the syntactic analysis model more accurate.

[0087] Figure 2 A flowchart of another syntactic analysis model enhancement method in an embodiment of this disclosure is shown.

[0088] like Figure 2 As shown, the method may include:

[0089] S201, Obtain the text information to be analyzed;

[0090] S202, Perform syntactic analysis on the text information to be analyzed based on the syntactic analysis model to obtain the syntactic analysis results;

[0091] S203, the results of syntactic analysis are evaluated based on the natural language processing model to obtain the evaluation results;

[0092] S204. In cases where the results of the evaluation do not match the results of the syntactic analysis, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0093] S205. Based on the optimized syntactic analysis model, perform syntactic analysis on the text information to be analyzed to obtain the optimized syntactic analysis results.

[0094] In one embodiment, after optimizing the syntactic analysis model, syntactic analysis can be performed on the text information to be analyzed based on the optimized model.

[0095] In one embodiment, the text to be analyzed before the syntactic analysis model is optimized and the text to be analyzed after the syntactic analysis model is optimized can be the same text or different texts.

[0096] S206, Based on the natural language processing model, the optimized syntactic analysis results are evaluated to obtain the evaluation results corresponding to the optimized syntactic analysis results.

[0097] In one embodiment, the consideration method in this disclosure may be the same as the consideration method in the above embodiments, and will not be repeated here.

[0098] S207, if the optimized syntactic analysis result matches the corresponding consideration result, output the optimized syntactic analysis model.

[0099] In one embodiment, matching the optimized syntactic analysis result with the corresponding consideration result may include the difference between the optimized syntactic analysis result and the consideration result being within a preset range.

[0100] The syntactic analysis model enhancement method provided in the embodiments of this disclosure obtains the text information to be analyzed, performs syntactic analysis on the text information based on the syntactic analysis model to obtain the syntactic analysis result, and then evaluates the syntactic analysis result based on the natural language processing model to obtain the evaluation result. If the evaluation result does not match the syntactic analysis result, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model. This disclosure evaluates the syntactic analysis result with the evaluation result and then optimizes the syntactic analysis model based on the evaluation result, which can make the syntactic analysis result obtained based on the syntactic analysis model more accurate.

[0101] Figure 3 A flowchart of another syntactic analysis model enhancement method in an embodiment of this disclosure is shown.

[0102] like Figure 3 As shown, the method may include:

[0103] S301, Obtain the text information to be analyzed;

[0104] S302, Perform syntactic analysis on the text information to be analyzed based on the syntactic analysis model to obtain the syntactic analysis results;

[0105] S303, The results of syntactic analysis are evaluated based on the natural language processing model to obtain the evaluation results;

[0106] S304. When the results of the evaluation do not match the results of the syntactic analysis, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0107] S305. Based on the optimized syntactic analysis model, perform syntactic analysis on the text information to be analyzed to obtain the optimized syntactic analysis results.

[0108] S306, Based on the natural language processing model, the optimized syntactic analysis results are evaluated to obtain the evaluation results corresponding to the optimized syntactic analysis results.

[0109] S307, if the optimized syntactic analysis result matches the corresponding consideration result, output the optimized syntactic analysis model.

[0110] S308: Input the target text information to be analyzed into the optimized syntactic analysis model to obtain the target syntactic analysis result.

[0111] In one embodiment, if the results match the syntactic analysis results, it indicates that the optimized syntactic analysis model meets the requirements. In this case, the text information can be analyzed based on the optimized syntactic analysis model to obtain the analysis results.

[0112] Figure 4 A flowchart of another syntactic analysis model enhancement method in an embodiment of this disclosure is shown.

[0113] like Figure 4 As shown, the method may include:

[0114] S401, Obtain the text information to be analyzed;

[0115] S402, Input the text information to be analyzed into the BERT model to obtain the word segmentation results corresponding to the text information to be analyzed;

[0116] In one embodiment, the syntactic analysis model may include the BERT model and the natural language processing model.

[0117] Syntactic analysis of text information based on a syntactic analysis model can include: inputting the text information into a BERT model, which segments the characters in the text information into multiple word groups. Then, these word groups are input into a natural language processing model, which obtains the grammatical relationships between the word groups, i.e., the syntactic analysis results.

[0118] S403, input the word segmentation results into the natural language processing model to obtain the syntactic analysis results of the word segmentation results.

[0119] S404, based on the natural language processing model, considers the syntactic analysis results and obtains the evaluation results;

[0120] S405. When the results of the evaluation do not match the results of the syntactic analysis, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0121] S406. Based on the optimized syntactic analysis model, syntactic analysis is performed on the text information to be analyzed, and the optimized syntactic analysis results are obtained.

[0122] The syntactic analysis model enhancement method provided in the embodiments of this disclosure obtains the text information to be analyzed, performs syntactic analysis on the text information based on the syntactic analysis model to obtain the syntactic analysis result, and then evaluates the syntactic analysis result based on the natural language processing model to obtain the evaluation result. If the evaluation result does not match the syntactic analysis result, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model. This disclosure evaluates the syntactic analysis result with the evaluation result and then optimizes the syntactic analysis model based on the evaluation result, which can make the syntactic analysis result obtained based on the syntactic analysis model more accurate.

[0123] Figure 5 A flowchart of another syntactic analysis model enhancement method in an embodiment of this disclosure is shown.

[0124] like Figure 5 As shown, the method may include:

[0125] S501, Obtain the text information to be analyzed;

[0126] S502, based on the syntactic analysis model, perform syntactic analysis on the text information to be analyzed, and obtain the syntactic analysis results;

[0127] S503, based on the natural language processing model, considers each of the multiple results obtained from syntactic analysis to obtain the consideration result corresponding to each result.

[0128] In one embodiment, the syntactic analysis results include multiple results, each of which corresponds to a probability of the current result.

[0129] like Figure 6 The diagram shown is a schematic representation of a syntactic analysis result according to an embodiment of this disclosure.

[0130] like Figure 6 As shown, the syntactic analysis results include two types of outcomes. The probability of the first outcome is 30%, and the probability of the second outcome is 70%.

[0131] In one embodiment, the sum of the probabilities for each outcome among the multiple probabilities is 100%.

[0132] In one embodiment, a natural language processing model may include multiple models, each of which can score any of the above syntactic analysis results. The scores from multiple models are then combined to obtain the final score for any one of the syntactic analysis results.

[0133] For example, multiple models considered the results of the first type of syntactic analysis and obtained a final score of 7 points, while the result of the second type of syntactic analysis was 3 points.

[0134] S504. When the results of the evaluation do not match the results of the syntactic analysis, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0135] In one embodiment, as shown above, if the score for a syntactic analysis result with a 30% probability is 70, and the score for a syntactic analysis result with a 70% probability is 30, then it can be determined that the above considerations do not match the syntactic analysis results.

[0136] In one embodiment, as shown above, if the score for a syntactic analysis result with a 70% probability is 70, and the score for a syntactic analysis result with a 30% probability is 30, then it can be determined that the above considerations match the syntactic analysis results.

[0137] In one embodiment, a mismatch between the consideration result and the syntactic analysis result includes: at least one syntactic analysis result does not match the consideration result corresponding to the syntactic analysis result.

[0138] The syntactic analysis model enhancement method provided in the embodiments of this disclosure obtains the text information to be analyzed, performs syntactic analysis on the text information based on the syntactic analysis model to obtain the syntactic analysis result, and then evaluates the syntactic analysis result based on the natural language processing model to obtain the evaluation result. If the evaluation result does not match the syntactic analysis result, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model. This disclosure evaluates the syntactic analysis result with the evaluation result and then optimizes the syntactic analysis model based on the evaluation result, which can make the syntactic analysis result obtained based on the syntactic analysis model more accurate.

[0139] Based on the same inventive concept, this disclosure also provides a syntactic analysis model enhancement device, as shown in the following embodiment. Since the principle by which this device embodiment solves the problem is similar to that of the above-described method embodiment, the implementation of this device embodiment can refer to the implementation of the above-described method embodiment, and repeated details will not be elaborated further.

[0140] Figure 7 A schematic diagram of a syntactic analysis model enhancement device is shown in an embodiment of this disclosure.

[0141] like Figure 7 As shown, the device may include:

[0142] The acquisition module 710 is used to acquire the text information to be analyzed;

[0143] The first analysis module 720 is used to perform syntactic analysis on the text information to be analyzed based on the syntactic analysis model, and obtain the syntactic analysis results.

[0144] The first consideration module 730 is used to consider the syntactic analysis results based on the natural language processing model and obtain the consideration results;

[0145] The optimization module 740 is used to optimize the syntactic analysis model when the evaluation results do not match the syntactic analysis results, so as to obtain the optimized syntactic analysis model.

[0146] The syntactic analysis model enhancement device provided in the embodiments of this disclosure acquires the text information to be analyzed, performs syntactic analysis on the text information based on the syntactic analysis model to obtain the syntactic analysis result, and then evaluates the syntactic analysis result based on the natural language processing model to obtain the evaluation result. If the evaluation result does not match the syntactic analysis result, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model. This disclosure evaluates the syntactic analysis result with the evaluation result and then optimizes the syntactic analysis model based on the evaluation result, which can make the syntactic analysis result obtained based on the syntactic analysis model more accurate.

[0147] In one embodiment of this disclosure, the apparatus further includes:

[0148] The second analysis module is used to perform syntactic analysis on the text information to be analyzed based on the optimized syntactic analysis model, and obtain the optimized syntactic analysis results.

[0149] The second consideration module is used to evaluate the optimized syntactic analysis results based on the natural language processing model, and obtain the evaluation results corresponding to the optimized syntactic analysis results;

[0150] The output module is used to output the optimized syntactic analysis model when the optimized syntactic analysis result matches the corresponding consideration result.

[0151] In one embodiment of this disclosure, the apparatus further includes:

[0152] The input module is used to input the target text information to be analyzed into the optimized syntactic analysis model to obtain the target syntactic analysis result.

[0153] In one embodiment of this disclosure, the syntactic analysis model includes a BERT model and a natural language processing model;

[0154] The first analysis module includes:

[0155] The first input unit is used to input the text information to be analyzed into the BERT model and obtain the word segmentation results corresponding to the text information to be analyzed.

[0156] The second input unit is used to input the word segmentation results into the natural language processing model to obtain the syntactic analysis results of the word segmentation results.

[0157] In one embodiment of this disclosure, the syntactic analysis result includes multiple results, each of which corresponds to a probability of the current result;

[0158] The first consideration module includes:

[0159] The consideration unit is used to consider each of the multiple results obtained from syntactic analysis based on the natural language processing model, and to obtain the consideration result corresponding to each result.

[0160] In one embodiment of this disclosure, a mismatch between the consideration results and the syntactic analysis results includes:

[0161] There is at least one syntactic analysis result that does not match the corresponding consideration result.

[0162] The syntactic analysis model enhancement device provided in the embodiments of this disclosure acquires the text information to be analyzed, performs syntactic analysis on the text information based on the syntactic analysis model to obtain the syntactic analysis result, then evaluates the syntactic analysis result based on the natural language processing model to obtain the evaluation result, and optimizes the syntactic analysis model when the evaluation result does not match the syntactic analysis result to obtain the optimized syntactic analysis model. This disclosure, by evaluating the syntactic analysis result with the evaluation result and then optimizing the syntactic analysis model based on the evaluation result, can make the syntactic analysis result obtained based on the syntactic analysis model more accurate.

[0163] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described syntactic analysis model enhancement method by executing the executable instructions.

[0164] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0165] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0166] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).

[0167] The storage unit stores program code, which can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 810 can perform the following steps of the above method embodiments:

[0168] Obtain the text information to be analyzed;

[0169] Syntactic analysis is performed on the text information to be analyzed based on the syntactic analysis model to obtain the syntactic analysis results;

[0170] The results of syntactic analysis are evaluated based on a natural language processing model, and the evaluation results are obtained.

[0171] When the results of the evaluation do not match the results of the syntactic analysis, the syntactic analysis model is optimized to obtain the optimized syntactic analysis model.

[0172] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.

[0173] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0174] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0175] Electronic device 800 can also communicate with one or more external devices 840 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0176] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0177] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the methods described above is stored thereon. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0178] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0179] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.

[0180] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0181] In practical implementation, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0182] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0183] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0184] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0185] 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 appended claims.

Claims

1. A method for enhancing a syntactic analysis model, characterized in that, The methods include: Obtain the text information to be analyzed; The text information to be analyzed is syntactically analyzed based on the syntactic analysis model to obtain syntactic analysis results. The syntactic analysis results include multiple results, where each syntactic analysis result corresponds to the probability of the current syntactic analysis result. The syntactic analysis results are evaluated based on a natural language processing model to obtain an evaluation result. The natural language processing model includes multiple models, and the evaluation result is determined by multiple syntactic analysis results. If the consideration results do not match the syntactic analysis results, the syntactic analysis model is optimized to obtain an optimized syntactic analysis model.

2. The syntactic analysis model enhancement method according to claim 1, characterized in that, The method further includes: Based on the optimized syntactic analysis model, the text information to be analyzed is syntactically analyzed to obtain the optimized syntactic analysis result. Based on the natural language processing model, the optimized syntactic analysis results are evaluated to obtain the evaluation results corresponding to the optimized syntactic analysis results; If the optimized syntactic analysis result matches the consideration result corresponding to the optimized syntactic analysis result, the optimized syntactic analysis model is output.

3. The syntactic analysis model enhancement method according to claim 2, characterized in that, The method further includes: The target text information to be analyzed is input into the optimized syntactic analysis model to obtain the target syntactic analysis result.

4. The syntactic analysis model enhancement method according to claim 1, characterized in that, The syntactic analysis model includes the BERT model and a natural language processing model; The syntactic analysis of the text information to be analyzed is performed based on the syntactic analysis model to obtain the syntactic analysis results, including: The text information to be analyzed is input into the BERT model to obtain the word segmentation results corresponding to the text information to be analyzed; The word segmentation results are input into the natural language processing model to obtain the syntactic analysis results of the word segmentation results.

5. The syntactic analysis model enhancement method according to claim 1, characterized in that, The syntactic analysis results include multiple results, each of which corresponds to a probability of the current result; The syntactic analysis results based on the natural language processing model are evaluated to obtain the following evaluation results: Based on the natural language processing model, each of the multiple results obtained from the syntactic analysis is evaluated to obtain the evaluation result corresponding to each result.

6. The syntactic analysis model enhancement method according to claim 5, characterized in that, The mismatch between the consideration results and the syntactic analysis results includes: There is at least one syntactic analysis result that does not match the corresponding consideration result.

7. A syntactic analysis model enhancement device, characterized in that, The device includes: The acquisition module is used to acquire the text information to be analyzed. The first analysis module is used to perform syntactic analysis on the text information to be analyzed based on the syntactic analysis model to obtain syntactic analysis results. The syntactic analysis results include multiple results, where each syntactic analysis result corresponds to the probability of the current syntactic analysis result. The first consideration module is used to consider the syntactic analysis results based on the natural language processing model to obtain the consideration results. The natural language processing model includes multiple models, and the consideration results are determined by multiple syntactic analysis results. An optimization module is used to optimize the syntactic analysis model when the consideration results do not match the syntactic analysis results, so as to obtain an optimized syntactic analysis model.

8. The syntactic analysis model enhancement device according to claim 7, characterized in that, The device also includes: The second analysis module is used to perform syntactic analysis on the text information to be analyzed based on the optimized syntactic analysis model, and obtain the optimized syntactic analysis result. The second consideration module is used to consider the optimized syntactic analysis results based on the natural language processing model, and obtain the consideration results corresponding to the optimized syntactic analysis results; The output module is used to output the optimized syntactic analysis model when the optimized syntactic analysis result matches the consideration result corresponding to the optimized syntactic analysis result.

9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the syntactic analysis model enhancement method according to any one of claims 1 to 6 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the syntactic analysis model enhancement method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dependence syntax model optimization method, device and equipment and readable storage medium

    CN112084769A