US 11,983,500 B2
Method and device for semantic analysis and storage medium
Yuankai Guo, Beijing (CN); Yulan Hu, Beijing (CN); Liang Shi, Beijing (CN); Erli Meng, Beijing (CN); Bin Wang, Beijing (CN); Yingzhe Wang, Beijing (CN); Shuo Wang, Beijing (CN); and Xinyu Hua, Beijing (CN)
Assigned to BEIJING XIAOMI PINECONE ELECTRONICS CO., LTD., Beijing (CN)
Filed by BEIJING XIAOMI PINECONE ELECTRONICS CO., LTD., Beijing (CN)
Filed on May 31, 2021, as Appl. No. 17/334,924.
Claims priority of application No. 202011401136.5 (CN), filed on Dec. 2, 2020.
Prior Publication US 2022/0171940 A1, Jun. 2, 2022
Int. Cl. G06F 40/30 (2020.01); G06F 40/20 (2020.01)
CPC G06F 40/30 (2020.01) [G06F 40/20 (2020.01)] 15 Claims
OG exemplary drawing
 
1. A method for semantic analysis, applied to terminal equipment, comprising:
recognizing, by the terminal equipment, voice signals from a user to acquire sentence information received by the terminal equipment;
extracting a part-of-speech label sequence of text data in the sentence information for which part-of-speech labelling is to be performed by
performing, based on a preset extraction model, feature extraction on each word contained in the text data to acquire an emission probability of each word with respect to each part-of-speech label; and
acquiring the part-of-speech label sequence of the text data according to the emission probability and an order in which each word in the text data is arranged, wherein the preset extraction model comprises at least one of a Hidden Markov Model (HMM), a Long Short-Term Memory (LSTM) a maximum entropy model, or a decision-tree-based model, and the preset extraction model comprises a feature extractor and a decoder;
acquiring a detection result by detecting legitimacy of the part-of-speech label sequence;
in response to the detection result indicating that the part-of-speech label sequence is illegitimate, correcting the part-of-speech label sequence by correcting the part-of-speech label sequence according to a transition probability indicating an inter-parts-of-speech conversion relation, wherein the transition probability comprises a probability of transition occurring between words in the sentence information;
outputting a corrected part-of-speech label sequence as a result of performing part-of-speech labelling on the text data;
determining semantics corresponding to the sentence information according to output sentence information with part-of-speech labels; and
providing, by the terminal equipment, an answer to the voice signals from the user according to the determined semantics.