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

Inactive Publication Date: 2020-11-20
北京智源人工智能研究院
View PDF6 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The maintenance of semantic representation grammar needs to directly modify the code, which is difficult to operate and poor in stability;
[0012] d. The method of semantic representation based on directed acyclic graph is theoretically a relatively complete semantic representation method, but such a method requires a large amount of labeled data for model training, and the accuracy and transferability of the model cannot Meet practical application needs
In addition, the semantic repre...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Natural language semantic representation method and device based on function declaration and electronic equipment
  • Natural language semantic representation method and device based on function declaration and electronic equipment
  • Natural language semantic representation method and device based on function declaration and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

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] ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a natural language semantic representation method and device based on function declaration and electronic equipment. The method comprises the steps: performing word segmentation processing on a natural language sequence, wherein each word in a word segmentation result corresponds to a terminator in a pre-generated context-independent grammar instance; obtaining a function statement associated with the terminator according to the context-independent grammar instance; utilizing the function statement to construct a semantic tree of the natural language sequence; expressing the semantic tree by adopting a high-order function, and executing to obtain a semantic expression result of the natural language sequence. Free combination and nesting of different grammars can beachieved, and then semantic structure representation of complex natural languages is achieved; the specific implementation mode of the function is separated from the semantic representation process declared by the function, the reusability is good, and the flexibility is high; in addition, a semantic representation result can be represented and realized by a function nested executed by a computer,and can be directly executed to complete a specific task.

Description

technical field [0001] The invention relates to the technical field of natural language processing, in particular to a method, device and electronic equipment for expressing natural language semantics based on function declarations. Background technique [0002] Language is the carrier of human knowledge, and semantic representation is the bridge between computers and human natural language. In the early 20th century, a group of semiotic linguists represented by Saussure began to systematically study the semantic representation of natural language. By the end of the 1960s, as the barrier between logicians and linguists began to break down, a group of theoretical linguists set out to seek a complete semantic theoretical model for natural language to fully represent semantics . American logician Richard Montagu believed that natural language and formal language are consistent in basic grammatical logic, and the "Montague Grammar" proposed laid the foundation for the subseque...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F40/253G06F40/30G06F40/289G06F8/41
CPCG06F8/42G06F40/253G06F40/289G06F40/30
Inventor 刘占亮钱泓锦窦志成
Owner 北京智源人工智能研究院
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products