# US 11,907,668 B2 · Method for selecting annotated sample, apparatus, electronic device and storage medium

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

- Number: US 11,907,668 B2
- Document ID: US11907668B2
- Status: Granted
- Kind: B2
- Application number: 18/148,904
- Filed: 2022-12-30
- Published: 2023-05-11
- Granted: 2024-02-20
- Earliest claimed: 2022-02-09
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Minlong Peng; Mingming Sun; Ping Li
- Web page: https://patentgrep.com/patent/US11907668B2

## CPC

- G06F 40/30: Semantic analysis
- G06F 18/24: Classification techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure provides a method for selecting an annotated sample. The method includes: determining a first attribute and a second attribute of a sample characteristic; in which the first attribute is a characteristic attribute of the sample characteristic in a source field sample set, and the second attribute is a characteristic attribute of the sample characteristic in a target field sample set; and determining a target annotated sample from a plurality of candidate annotated samples of the source field sample set according to the first attribute and the second attribute; in which the target annotated sample is configured to train a classification model, the classification model includes a model for determining an emotion polarity by analyzing an input sample to be classified.

## Claims

### Claim 1

A method for selecting an annotated sample, comprising:
determining a first attribute and a second attribute of a sample characteristic; wherein the first attribute is a characteristic attribute of the sample characteristic in a source field sample set, and the second attribute is a characteristic attribute of the sample characteristic in a target field sample set; and
determining a target annotated sample from a plurality of candidate annotated samples of the source field sample set according to the first attribute and the second attribute; wherein the target annotated sample is configured to train a classification model, the classification model comprises a model for determining an emotion polarity by analyzing an input sample to be classified;
wherein determining the first attribute comprises:
determining a first frequency value of the sample characteristic in the source field sample set;
determining an importance level and an emotion polarity of the sample characteristic in the source field sample set using the first frequency value; and
determining the importance level and the emotion polarity of the sample characteristic in the source field sample set as the first attribute.

### Claim 2 (depends on 1)

The method as claimed in claim 1, wherein determining the importance level of the sample characteristic in the source field sample set using the first frequency value comprises:
determining a first chi-square value of the sample characteristic using the first frequency value and a sample number of the source field sample set; wherein the first chi-square value is a chi-square value of the sample characteristic in the source field sample set; and
determining the importance level of the sample characteristic in the source field sample set based on the first chi-square value.

### Claim 3 (depends on 2)

The method as claimed in claim 2, wherein determining the emotion polarity of the sample characteristic in the source field sample set using the first frequency value comprises:
determining an emotion polarity value of the sample characteristic using the first frequency value and the sample number of the source field sample set; and
determining the emotion polarity of the sample characteristic in the source field sample set using the emotion polarity value.

### Claim 4 (depends on 1)

The method as claimed in claim 1, wherein determining the second attribute comprises:
adding reference annotations for the target field sample set according to a preset condition; wherein the reference annotations comprises a positive annotation or a negative annotation; and
determining the second attribute of the sample characteristic using the reference annotations.

### Claim 5 (depends on 4)

The method as claimed in claim 4, wherein determining the second attribute of the sample characteristic using the reference annotation comprises:
determining a second frequency value of the sample characteristic in the target field sample set using the reference annotations;
determining a reference importance level and a reference emotion polarity of the sample characteristic in the target field sample set using a sample number of the target field sample set and the second frequency value; and
determining the reference importance level and the reference emotion polarity as the second attribute.

### Claim 6 (depends on 5)

The method as claimed in claim 5, wherein determining the reference importance level comprises:
determining a second chi-square value and an estimated deviation value of the sample characteristic using the second frequency value and the sample number of the target field sample set; wherein the second chi-square value is a chi-square value of the sample characteristic in the target field sample set; and
determining the reference importance level of the sample characteristic in the target field sample set using the second chi-square value and the estimated deviation value.

### Claim 7 (depends on 1)

The method as claimed in claim 1, wherein determining the target annotated sample from the plurality of candidate annotated samples of the source field sample set according to the first attribute and the second attribute comprises:
determining a target sample characteristic according to the first attribute and the second attribute; and
determining the target annotated sample by performing data filtration in the source field sample set using the target sample characteristic.

### Claim 8 (depends on 7)

The method as claimed in claim 7, wherein determining the target sample characteristic according to the first attribute and the second attribute comprises:
selecting, in the source field sample set, at least one sample characteristic with both an importance level in the first attribute and a reference importance level in the second attribute meeting a predetermined condition as at least one candidate sample characteristic; and
selecting, from the at least one candidate sample characteristic, a sample characteristic with an emotion polarity in the first attribute being same as a reference emotion polarity in the second attribute as the target sample characteristic.

### Claim 9

An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor to cause the at least one processor to implement a method for selecting an annotated sample, comprising:
determining a first attribute and a second attribute of a sample characteristic; wherein the first attribute is a characteristic attribute of the sample characteristic in a source field sample set, and the second attribute is a characteristic attribute of the sample characteristic in a target field sample set; and
determining a target annotated sample from a plurality of candidate annotated samples of the source field sample set according to the first attribute and the second attribute; wherein the target annotated sample is configured to train a classification model, the classification model comprises a model for determining an emotion polarity by analyzing an input sample to be classified;
wherein determining the first attribute comprises:
determining a first frequency value of the sample characteristic in the source field sample set;
determining an importance level and an emotion polarity of the sample characteristic in the source field sample set using the first frequency value; and
determining the importance level and the emotion polarity of the sample characteristic in the source field sample set as the first attribute.

### Claim 10 (depends on 9)

The electronic device as claimed in claim 9, wherein determining the importance level of the sample characteristic in the source field sample set using the first frequency value comprises:
determining a first chi-square value of the sample characteristic using the first frequency value and a sample number of the source field sample set; wherein the first chi-square value is a chi-square value of the sample characteristic in the source field sample set; and
determining the importance level of the sample characteristic in the source field sample set based on the first chi-square value.

### Claim 11 (depends on 10)

The electronic device as claimed in claim 10, wherein determining the emotion polarity of the sample characteristic in the source field sample set using the first frequency value comprises:
determining an emotion polarity value of the sample characteristic using the first frequency value and the sample number of the source field sample set; and
determining the emotion polarity of the sample characteristic in the source field sample set using the emotion polarity value.

### Claim 12 (depends on 9)

The electronic device as claimed in claim 9, wherein determining the second attribute comprises:
adding reference annotations for the target field sample set according to a preset condition; wherein the reference annotations comprises a positive annotation or a negative annotation; and
determining the second attribute of the sample characteristic using the reference annotations.

### Claim 13 (depends on 12)

The electronic device as claimed in claim 12, wherein determining the second attribute of the sample characteristic using the reference annotation comprises:
determining a second frequency value of the sample characteristic in the target field sample set using the reference annotations;
determining a reference importance level and a reference emotion polarity of the sample characteristic in the target field sample set using a sample number of the target field sample set and the second frequency value; and
determining the reference importance level and the reference emotion polarity as the second attribute.

### Claim 14 (depends on 13)

The electronic device as claimed in claim 13, wherein determining the reference importance level comprises:
determining a second chi-square value and an estimated deviation value of the sample characteristic using the second frequency value and the sample number of the target field sample set; wherein the second chi-square value is a chi-square value of the sample characteristic in the target field sample set; and
determining the reference importance level of the sample characteristic in the target field sample set using the second chi-square value and the estimated deviation value.

### Claim 15 (depends on 9)

The electronic device as claimed in claim 9, wherein determining the target annotated sample from the plurality of candidate annotated samples of the source field sample set according to the first attribute and the second attribute comprises:
determining a target sample characteristic according to the first attribute and the second attribute; and
determining the target annotated sample by performing data filtration in the source field sample set using the target sample characteristic.

### Claim 16 (depends on 15)

The electronic device as claimed in claim 15, wherein determining the target sample characteristic according to the first attribute and the second attribute comprises:
selecting, in the source field sample set, at least one sample characteristic with both an importance level in the first attribute and a reference importance level in the second attribute meeting a predetermined condition as at least one candidate sample characteristic; and
selecting, from the at least one candidate sample characteristic, a sample characteristic with an emotion polarity in the first attribute being same as a reference emotion polarity in the second attribute as the target sample characteristic.

### Claim 17

A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to implement a method for selecting an annotated sample, comprising:
determining a first attribute and a second attribute of a sample characteristic; wherein the first attribute is a characteristic attribute of the sample characteristic in a source field sample set, and the second attribute is a characteristic attribute of the sample characteristic in a target field sample set; and
determining a target annotated sample from a plurality of candidate annotated samples of the source field sample set according to the first attribute and the second attribute; wherein the target annotated sample is configured to train a classification model, the classification model comprises a model for determining an emotion polarity by analyzing an input sample to be classified;
wherein determining the first attribute comprises:
determining a first frequency value of the sample characteristic in the source field sample set;
determining an importance level and an emotion polarity of the sample characteristic in the source field sample set using the first frequency value; and
determining the importance level and the emotion polarity of the sample characteristic in the source field sample set as the first attribute.
