Patent ID: 11900918
Assignee: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 7:
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled with the at least one processor;
wherein, the memory stores instructions executable by the at least one processor that, when executed by the at least one processor, cause the at least one processor to perform a method for training a linguistic model, the method comprising:
obtaining grammars corresponding to a plurality of sample texts and a slot value of a slot in each grammar by using semantic analysis;
generating a grammar graph corresponding to each grammar based on the corresponding grammar and the slot value of the slot in the corresponding grammar;
obtaining a weight of each grammar, a weight of each slot, and a weight of each slot value in each grammar graph based on the sample texts;
determining at least one grammar frequency of each order based on the weight of each grammar, the weight of each slot, and the weight of each slot value in each grammar graph; and
training the linguistic model based on the at least one grammar frequency of each order.