Natural language semantic representation method and device based on function declaration and electronic equipment
A technology of natural language and semantic representation, applied in natural language data processing, semantic analysis, electronic digital data processing, etc., can solve problems such as difficult operation, poor stability, and difficulty in describing natural language semantics completely, and achieve flexibility High and reusable effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0046] Such as figure 1 As shown, the embodiment of the present invention provides a natural language semantic representation method based on function declaration, including:
[0047] S101, perform word segmentation processing on the natural language sequence, and each word in the word segmentation result corresponds to a terminal symbol in the pre-generated context-free grammar instance;
[0048] Wherein, the context-free grammar instance is obtained by parsing a predefined context-free grammar file. The context-free grammar file uses custom context-free grammar rules.
[0049]S102. Obtain a function declaration associated with the terminal symbol according to the context-free grammar instance;
[0050] S103, using the function declaration to construct a semantic tree of the natural language sequence;
[0051] S104. Express the semantic tree by using a higher-order function, and perform the execution to obtain a semantic expression result of the natural language sequence. ...
example 1
[0053]
[0054] The above example 1 includes multiple context-free grammar instances, and the grammar instance includes a set of multiple productions. In the productions, the left part of the deduced symbols "=" and "|" is a non-terminal symbol, and the right part is a non-terminal symbol and / or a set of terminals, the right-hand side of each production is the corresponding function declaration. A nonterminal may appear on the left side of more than one production. For example, the above example shows three productions of the non-terminal , and the right part of one production is a non-terminal, which appears in the left part of the five productions shown, The right part of "=" in the production of is the terminal symbols "one", "two"..., and each production has a corresponding function declaration. The terminator is associated with a specific natural language, and the corresponding function declaration corresponds to the semantic realization of the natural language. ...
example 2
[0056]
[0057] In Example 2, the left part of the derivation symbol of the production is a non-terminal symbol, the right part is a combination of a non-terminal symbol and a terminal symbol, and the right side of the production is the corresponding function declaration.
[0058] It should be noted that the grammar examples in the examples are only examples, and the expression form of the production is not limited thereto, for example, derivation symbols, terminals and non-terminals may be expressed in other ways.
[0059] For the natural language sequence to be semantically represented, word segmentation processing is first performed on it, and each word obtained after the word segmentation processing corresponds to a terminal symbol in the grammar instance. For example, for the natural language sequence "the square of the sum of five and 5.8", after word segmentation, "five", "5.8", "the sum of... Terminal correspondences in context-free grammar instances of .
[0060] ...
PUM

Abstract
Description
Claims
Application Information

- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com