# US 2021/0200958 A1 · Comment information processing method and apparatus, and medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0200958 A1
- Document ID: US20210200958A1
- Status: Published application
- Kind: A1
- Application number: 16/938,355
- Filed: 2020-07-24
- Published: 2021-07-01
- Earliest claimed: 2019-12-27
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Hao LIU; Bolei HE; Xinyan XIAO
- Web page: https://patentgrep.com/patent/US20210200958A1

## CPC

- G06F 40/30: Semantic analysis
- G06F 40/242: Dictionaries
- G06F 40/289: Phrasal analysis, e.g. finite state techniques or chunking
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/09: Supervised learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure discloses a comment information processing method and apparatus, and a medium. The specific implementation solution is: in response to a user operation, determining an opinion category corresponding to each opinion phrase in a comment opinion dictionary; obtaining a target corpus matching each opinion phrase from a plurality of comment corpora; for each opinion phrase, using a corresponding opinion category to label the target corpus matching each opinion phrase to obtain a first training sample; and training a classification model with the first training sample to identify the opinion category of a comment by using a trained classification model.

## Claims

### Claim 1

A comment information processing method, comprising:
in response to a user operation, determining an opinion category corresponding to each opinion phrase in a comment opinion dictionary;
obtaining a target corpus matching with each opinion phrase from a plurality of comment corpora;
for each opinion phrase, using the opinion category to label the target corpus to obtain a first training sample; and
training a classification model with the first training sample, and identifying an opinion category of a comment by using the classification model.

### Claim 2 (depends on 1)

The method of claim 1, wherein each opinion phrase comprises a substantive word and a descriptive word; and obtaining the target corpus matching with each opinion phrase from the plurality of comment corpora comprises:
for each opinion phrase, filtering the plurality of comment corpora to obtain a candidate corpus containing the substantive word and the descriptive word in the opinion phrase; and
in response to the substantive word and the descriptive word in the candidate corpus appearing in a same short sentence, and a number of words between the substantive word and the descriptive word being smaller than a threshold, determining the candidate corpus as the target corpus matching with the opinion phrase.

### Claim 3 (depends on 1)

The method of claim 1, after obtaining the target corpus matching with each opinion phrase from the plurality of comment corpora, further comprising:
labeling the target corpus with the opinion phrase matched to obtain a second training sample;
determining a comment corpus that does not match with any opinion phrase in the plurality of comment corpora as a latent corpus, and labeling an opinion phrase of the latent corpus in a manual information labeling manner to obtain a third training sample; and
training an encoding-decoding model with the second training sample and the third training sample, and extracting an opinion phrase of the comment by using the encoding-decoding model.

### Claim 4 (depends on 3)

The method of claim 3, wherein the encoding-decoding model comprises an encoder and a decoder;
wherein the encoder is configured to perform semantic encoding on the comment to obtain a hidden state vector of the comment; and
the decoder is configured to decode the hidden state vector to output the opinion phrase of the comment, wherein the decoder has learned a mapping relationship between the hidden state vector and the opinion phrase.

### Claim 5 (depends on 3)

The method of claim 3, after training the encoding-decoding model with the second training sample and the third training sample, further comprising:
for a comment that the opinion phrase needs to be extracted, determining whether the opinion phrase matching with the comment exists in the comment opinion dictionary;
in response to that the opinion phrase matching with the comment exists in the comment opinion dictionary, determining the opinion phrase matching with the comment as the opinion phrase of the comment; and
in response to that the opinion phrase matching with the comment does not exist in the comment opinion dictionary, inputting the comment into the encoding-decoding model, and determining the opinion phrase outputted from the encoding-decoding model as the opinion phrase of the comment.

### Claim 6 (depends on 5)

The method of claim 5, wherein each opinion phrase in the comment opinion dictionary has a fixed collocation of emotion word; and
after the opinion phrase matching with the comment is determined as the opinion phrase of the comment, the method further comprises:
determining an emotional tendency of the comment based on the fixed collocation of emotion word of the opinion phrase matching with the comment.

### Claim 7 (depends on 1)

The method of claim 1, before determining the opinion category corresponding to each opinion phrase in the comment opinion dictionary in response to the user operation, further comprising:
performing, based on a preset extraction rule, phrase extraction on the plurality of comment corpora to obtain a plurality of candidate phrases; and
filtering, based on an appearance frequency of each candidate phrase in the plurality of comment corpora, the plurality of candidate phrases to obtain a plurality of comment opinion phrases.

### Claim 8

A comment information processing apparatus, comprising:
one or more processors;
a memory storing instructions executable by the one or more processors;
wherein the one or more processors are configured to:
in response to a user operation, determine an opinion category corresponding to each opinion phrase in a comment opinion dictionary;
obtain a target corpus matching with each opinion phrase from a plurality of comment corpora;
for each opinion phrase, use the opinion category to label the target corpus to obtain a first training sample; and
train a classification model with the first training sample, and identify an opinion category of a comment by using the classification model.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein each opinion phrase comprises a substantive word and a descriptive word; and the one or more processors are configured to:
for each opinion phrase, filter the plurality of comment corpora to obtain a candidate corpus containing the substantive word and the descriptive word in the opinion phrase; and
in response to the substantive word and the descriptive word in the candidate corpus appearing in a same short sentence, and a number of words between the substantive word and the descriptive word being smaller than a threshold, determine the candidate corpus as the target corpus matching with the opinion phrase.

### Claim 10 (depends on 8)

The apparatus of claim 8, wherein
the one or more processors are configured to label the target corpus with the opinion phrase matched to obtain a second training sample; and to determine a comment corpus that does not match with any opinion phrase in the plurality of comment corpora as a latent corpus, and to label an opinion phrase of the latent corpus in a manual information labeling manner to obtain a third training sample; and
the one or more processors are configured to train an encoding-decoding model with the second training sample and the third training sample, and to extract an opinion phrase of the comment by using the encoding-decoding model.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein
the encoding-decoding model comprises an encoder and a decoder;
wherein the encoder is configured to perform semantic encoding on the comment to obtain a hidden state vector of the comment; and
the decoder is configured to decode the hidden state vector to output the opinion phrase of the comment, wherein the decoder has learned a mapping relationship between the hidden state vector and the opinion phrase.

### Claim 12 (depends on 10)

The apparatus of claim 10, wherein the one or more processors are configured to:
for a comment that the opinion phrase needs to be extracted, determine whether the opinion phrase matching with the comment exists in the comment opinion dictionary;
in response to that the opinion phrase matching with the comment exists in the comment opinion dictionary, determine the opinion phrase matching with the comment as the opinion phrase of the comment; and
in response to that the opinion phrase matching with the comment does not exist in the comment opinion dictionary, input the comment into the encoding-decoding model, and determine the opinion phrase outputted from the encoding-decoding model as the opinion phrase of the comment.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein each opinion phrase in the comment opinion dictionary has a fixed collocation of emotion word; and the one or more processors are configured to:
determine an emotional tendency of the comment based on the fixed collocation of emotion word of the opinion phrase matching with the comment.

### Claim 14 (depends on 8)

The apparatus of claim 8, wherein the one or more processors are configured to:
perform, based on a preset extraction rule, phrase extraction on the plurality of comment corpora to obtain a plurality of candidate phrases; and
filter, based on an appearance frequency of each candidate phrase in the plurality of comment corpora, the plurality of candidate phrases to obtain a plurality of comment opinion phrases.

### Claim 15

A non-transitory computer-readable storage medium having a computer instruction stored thereon, wherein the computer instruction is configured to cause a computer to implement a comment information processing method, wherein the method comprises:
in response to a user operation, determining an opinion category corresponding to each opinion phrase in a comment opinion dictionary;
obtaining a target corpus matching with each opinion phrase from a plurality of comment corpora;
for each opinion phrase, using the opinion category to label the target corpus to obtain a first training sample; and
training a classification model with the first training sample, and identifying an opinion category of a comment by using the classification model.
