# US 2021/0342524 A1 · Method and apparatus for error correction of numerical contents in text, 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 2021/0342524 A1
- Document ID: US20210342524A1
- Status: Published application
- Kind: A1
- Application number: 17/375,225
- Filed: 2021-07-14
- Published: 2021-11-04
- Earliest claimed: 2020-12-25
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Chenhui Li; Teng Hu; Yongfeng Chen
- Web page: https://patentgrep.com/patent/US20210342524A1

## CPC

- G06F 40/166: Editing, e.g. inserting or deleting
- G06F 40/103: Formatting, i.e. changing of presentation of documents (automatic justification G06F40/189; automatic line break hyphenation G06F40/191)
- G06F 40/194: Calculation of difference between files
- G06F 40/232: Orthographic correction, e.g. spell checking or vowelisation
- G06F 40/279: Recognition of textual entities
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application discloses a method, an apparatus and an electronic device for error correction of numerical contents in a text, and relates to a technology field of artificial intelligence such as natural language processing and deep learning. The implementation method is: obtaining a target text to be processed; determining original numerical contents included in the target text; determining target types corresponding to the original numerical contents; and performing error correction on each original numerical content according to an error correction manner corresponding to each target type. Therefore, the error correction of numerical contents is realized according to types of the numerical contents, which is not only limited to the error correction of the numerical format, but also the logical error correction of the numerical content, so as to improve the numerical error correction capability and thereby improving the recall rate of detection and correction of wrong values.

## Claims

### Claim 1

A method for error correction of numerical contents in a text, comprising:
obtaining a target text to be processed;
determining original numerical contents included in the target text;
determining target types corresponding to the original numerical contents; and
performing error correction on each original numerical content according to an error correction manner corresponding to each target type.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining the original numerical contents included in the target text comprises at least one of:
traversing the target text based on a specified keyword to determine the original numerical contents included in the target text that match the specified keyword; and,
traversing the target text based on a specified template to determine the original numerical contents included in the target text that match the specified template.

### Claim 3 (depends on 1)

The method of claim 1, wherein the target text comprises N original numerical contents, wherein N is an integer greater than 1, after determining the target types corresponding to the original numerical contents, the method further comprises:
performing normalization on M original numerical contents according to data formats associated with the target types corresponding to the M original numerical contents in case that the target types corresponding to the M original numerical contents are the same, wherein M is a positive integer less than or equal to N.

### Claim 4 (depends on 1)

The method of claim 1, wherein the target text comprises a counting type value, wherein performing error correction on each original numerical content according to an error correction manner corresponding to each target type comprises:
determining an initial counting point and an ending counting point corresponding to the counting type value;
determining a target count value according to the ending counting point and the initial counting point; and
replacing the counting type value by the target count value in case that the target count value does not match the counting type value.

### Claim 5 (depends on 1)

The method of claim 1, wherein the target text comprises at least two consecutive amount type values, wherein performing the error correction on each original numerical content according to an error correction manner corresponding to each target type comprises:
performing normalization on the at least two consecutive amount type values to obtain at least two amount type values in a same format;
determining target values corresponding to remaining amount type values except for a first amount type value in the at least two consecutive amount type values according to the first amount type value in case that the at least two amount type values in the same format are inconsistent; and
replacing the remaining amount type values by the target values.

### Claim 6 (depends on 1)

The method of claim 1, wherein performing the error correction on each original numerical content comprises:
determining a second display mode corresponding to numerical contents subjected to the error correction according to a first display mode corresponding to the original numerical contents in the target text; and
adding the numerical contents subjected to the error correction to a position where the original numerical contents are located based on the second display mode.

### Claim 7

An apparatus for error correction of numerical contents in a text, 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:
obtain a target text to be processed;
determine original numerical contents included in the target text;
determine target types corresponding to the original numerical contents; and
perform error correction on each original numerical content according to an error correction manner corresponding to each target type.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the one or more processors are configured to:
traverse the target text based on a specified keyword to determine the original numerical contents included in the target text; and
traverse the target text based on a specified template to determine the original numerical contents included in the target text that match the specified template.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the one or more processors are configured to:
perform normalization on M original numerical contents according to data formats associated with the target types corresponding to the M original numerical contents in case that the target types corresponding to the M original numerical contents are the same, wherein M is a positive integer less than or equal to N.

### Claim 10 (depends on 7)

The apparatus of claim 7, wherein the one or more processors are configured to:
determine an initial counting point and an ending counting point corresponding to the counting type value;
determine a target count value according to the ending counting point and the initial counting point; and
replace the counting type value by the target count value in case that the target count value does not match the counting type value.

### Claim 11 (depends on 7)

The apparatus of claim 7, wherein the one or more processors are configured to:
perform normalization on at least two consecutive amount type values to obtain at least two amount type values in a same format;
determine target values corresponding to remaining amount type values except for a first amount type value in the at least two consecutive amount type values according to the first amount type value in case that the at least two amount type values in the same format are inconsistent; and
replace the remaining amount type values by the target values.

### Claim 12 (depends on 7)

The apparatus of claim 7, wherein the one or more processors are configured to:
determine a second display mode corresponding to numerical contents subjected to the error correction according to a first display mode corresponding to the original numerical contents in the target text; and
add the numerical contents subjected to the error correction to a position where the original numerical contents are located based on the second display mode.

### Claim 13

A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to execute a method for error correction of numerical contents in a text, and the method comprises:
obtaining a target text to be processed;
determining original numerical contents included in the target text;
determining target types corresponding to the original numerical contents; and
performing error correction on each original numerical content according to an error correction manner corresponding to each target type.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein determining the original numerical contents included in the target text comprises at least one of:
traversing the target text based on a specified keyword to determine the original numerical contents included in the target text that match the specified keyword; and,
traversing the target text based on a specified template to determine the original numerical contents included in the target text that match the specified template.

### Claim 15 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the target text comprises N original numerical contents, wherein N is an integer greater than 1, after determining the target types corresponding to the original numerical contents, the method further comprises:
performing normalization on M original numerical contents according to data formats associated with the target types corresponding to the M original numerical contents in case that the target types corresponding to the M original numerical contents are the same, wherein M is a positive integer less than or equal to N.

### Claim 16 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the target text comprises a counting type value, wherein performing error correction on each original numerical content according to an error correction manner corresponding to each target type comprises:
determining an initial counting point and an ending counting point corresponding to the counting type value;
determining a target count value according to the ending counting point and the initial counting point; and
replacing the counting type value by the target count value in case that the target count value does not match the counting type value.

### Claim 17 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the target text comprises at least two consecutive amount type values, wherein performing the error correction on each original numerical content according to an error correction manner corresponding to each target type comprises:
performing normalization on the at least two consecutive amount type values to obtain at least two amount type values in a same format;
determining target values corresponding to remaining amount type values except for a first amount type value in the at least two consecutive amount type values according to the first amount type value in case that the at least two amount type values in the same format are inconsistent; and
replacing the remaining amount type values by the target values.

### Claim 18 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein performing the error correction on each original numerical content comprises:
determining a second display mode corresponding to numerical contents subjected to the error correction according to a first display mode corresponding to the original numerical contents in the target text; and
adding the numerical contents subjected to the error correction to a position where the original numerical contents are located based on the second display mode.
