A corresponding grammar description file and a word category description file are defined based on a logical grammar by manifest language LGML according to a common sentence expression of a semantic meaning, in the grammar description file, the description for a common sentence is composed by operators, word categories, and functions, the word category description file is used to describe specific values for the word categories; the grammar description file and the word category description file are generated, with a reduction method according to a defined sequence, into a grammar tree for the grammar description file and word category trees for the word category description file; the word category trees are grafted at the positions of corresponding word categories on the grammar tree, forming a grammar tree for the semantic meaning, in this way, grammar compiling is accomplished. Based on the grammar tree of a semantic meaning with aforementioned ways, semantic parsing is carried out with whole-sentence matching, semantic mapping matching, or a combination of whole-sentence matching and semantic mapping matching.
展开▼