IP Library Granted Patent US 11,526,657
Granted Patent B2
US 11,526,657 · App. 17/375,225 · Granted Dec 13, 2022

Method and apparatus for error correction of numerical contents in text, and storage medium

Inventors: Chenhui Li (Beijing, CN); Teng Hu (Beijing, CN); Yongfeng Chen (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
G06F40/166G06F40/103G06F40/194G06F40/232G06F40/279
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,526,657
App. No.
17/375,225
Granted
Dec 13, 2022
Kind
B2
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 (69)

1. A method for error correction of numerical contents in a text, comprising:

obtaining, by a computer processor, a target text to be processed;

determining, by the computer processor, original numerical contents included in the target text;

determining, by the computer processor, target types corresponding to the original numerical contents; and

performing, by the computer processor, error correction on each original numerical content according to an error correction manner corresponding to each target type;

wherein the target text comprises a counting type value, an initial counting point, and an ending counting point, wherein performing error correction on each original numerical content according to an error correction manner corresponding to each target type comprises:

determining, by the computer processor, the initial counting point and the ending counting point corresponding to the counting type value;

determining, by the computer processor, a target count value according to the ending counting point and the initial counting point;

replacing, by the computer processor, the counting type value by the target count value in case that the target count value does not match the counting type value;

wherein the target text comprises N original numerical contents, wherein N is an integer greater than 1; and

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.

2. 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.

3. 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.

4. 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.

5. 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;

wherein the target text comprises a counting type value, an initial counting point, and an ending counting point;

wherein the one or more processors are configured to:

determine the initial counting point and the 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;

replace the counting type value by the target count value in case that the target count value does not match the counting type value;

wherein the target text comprises N original numerical contents, wherein N is an integer greater than 1; and

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.

6. The apparatus of claim 5 , 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.

7. The apparatus of claim 5 , 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.

8. The apparatus of claim 5 , 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.

9. 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;

wherein the target text comprises a counting type value, an initial counting point, and an ending counting point, wherein performing error correction on each original numerical content according to an error correction manner corresponding to each target type comprises:

determining the initial counting point and the 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;

replacing the counting type value by the target count value in case that the target count value does not match the counting type value;

wherein the target text comprises N original numerical contents, wherein N is an integer greater than 1; and

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.

10. The non-transitory computer-readable storage medium of claim 9 , 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.

11. The non-transitory computer-readable storage medium of claim 9 , 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.

12. The non-transitory computer-readable storage medium of claim 9 , 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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 24, 2022
From: LI, CHENHUI; HU, TENG; CHEN, YONGFENG
To: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Reel/Frame 061513/0021 →
Priority Claims (1)
CN 202011561776.2 · Dec 25, 2020 · national
Continuity (1)
Related Publication 20210342524A1 · Nov 4, 2021