# US 2017/0293604 A1 · Methods and apparatus for spell checking

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

- Number: US 2017/0293604 A1
- Document ID: US20170293604A1
- Status: Published application
- Kind: A1
- Application number: 15/132,865
- Filed: 2016-04-19
- Published: 2017-10-12
- Earliest claimed: 2016-04-11
- Assignees: Zhuhai Kingsoft Office Software Co., Ltd; Beijing Kingsoft Office Software, Inc.
- Applicants: Zhuhai Kingsoft Office Software Co., Ltd; Beijing Kingsoft Office Software Co., Ltd
- Inventors: Junhang Zhu; Shicong Yan
- Web page: https://patentgrep.com/patent/US20170293604A1

## CPC

- G06F 40/205: Parsing
- G06F 40/232: Orthographic correction, e.g. spell checking or vowelisation
- G06F 40/166: Editing, e.g. inserting or deleting
- G06F 40/253: Grammatical analysis; Style critique
- G06F 40/274: Converting codes to words; Guess-ahead of partial word inputs
- G06F 40/289: Phrasal analysis, e.g. finite state techniques or chunking
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The embodiments of the present application disclose a spell checking method and device, which relate to the technical field of computer software. The method includes: determining character segments corresponding to characters contained in a page to be displayed according to preset character segment dividing rules; obtaining the character locations of wrong words in each of the determined character segments; presenting each of the determined character segments and marking wrong words in the corresponding character segment in a form of preset mark according to the character locations of wrong words in each of character segments. The solutions provided by the embodiments of the present application are applied to improve document loading speed and document displaying speed, thereby improving users' experience.

## Claims

### Claim 1

A method for spell checking, which is applied to a client, characterized in that the method comprises:
determining character segments corresponding to characters contained in a page to be presented, according to a preset character segment dividing rule;
obtaining character locations of wrong words in each of the determined character segments; and
presenting each of the determined character segments and marking, according to the character locations of the wrong words in each of the determined character segments, the wrong words in the corresponding character segment in a form of preset mark.

### Claim 2 (depends on 1)

The method according to claim 1, characterized in that after obtaining character locations of wrong words in each of the determined character segments, the method further comprises:
caching the character locations of the wrong words in each of the determined character segments.

### Claim 3 (depends on 2)

The method according to claim 2, characterized in that the step of obtaining character locations of wrong words in each of the determined character segments comprises:
obtaining character locations of wrong words in each of the determined character segments respectively by the following steps:
determining whether the spell checking has been performed on a target character segment, according to range of the target character segment, wherein the target character segment is any one of the determined character segments;
if not, performing word segmentation on the target character segment and obtaining words corresponding to the target character segment;
performing the spell checking on the words corresponding to the target character segment according to a preset spell checking rule, determining wrong words in the target character segment and obtaining character locations of the wrong words in the target character segment;
if yes, obtaining character locations of wrong words in the target character segment according to information on the target character segment in the cached character locations.

### Claim 4 (depends on 3)

The method according to claim 3, characterized in that the step of performing the spell checking on the words corresponding to the target character segment according to a preset spell checking rule, determining wrong words in the target character segment and obtaining character locations of the wrong words in the target character segment comprises:
performing the spell checking on the words corresponding to the target character segment according to a preset word library and obtaining wrong words in the target character segment; and
determining character locations of wrong words in the wrong words of the target character segment for which the spell checking is not ignorable as the character locations of the wrong words in the target character segment.

### Claim 5 (depends on 3)

The method according to claim 3, characterized in that the step of obtaining character locations of wrong words in the target character segment according to information on the target character segment in the cached character locations comprises:
obtaining wrong words in the target character segment according to the information on the target character segment in the cached character locations; and
determining character locations of wrong words in the wrong words of the target character segment for which the spell checking is not ignorable as the character locations of the wrong words in the target character segment.

### Claim 6 (depends on 3)

The method according to claim 3, characterized in that the step of performing the word segmentation on the target character segment and obtaining words corresponding to the target character segment comprises:
performing the word segmentation on the target character segment;
filtering the segmented words according to a preset word filtering rule; and
obtaining the words corresponding to the target character segment according to the filtered words.

### Claim 7 (depends on 2)

The method according to claim 2, characterized in that the method further comprises:
receiving an instruction for presenting suggested words, wherein, range of a character segment to be corrected is carried in the instruction for presenting suggested words;
determining wrong words in the character segment to be corrected according to the range of the character segment to be corrected;
obtaining suggested words corresponding to the wrong words in the character segment to be corrected; and
presenting the obtained suggested words.

### Claim 8 (depends on 7)

The method according to claim 7, characterized in that the step of determining wrong words in the character segment to be corrected according to the range of the character segment to be corrected comprises:
matching the range of the character segment to be corrected with the cached character locations; and
determining wrong words in the character segment to be corrected according to the result of the matching.

### Claim 9 (depends on 7)

The method according to claim 7, characterized in that after obtaining suggested words corresponding to the wrong words in the character segment to be corrected, the method further comprises:
caching character locations of the wrong words in the character segment to be corrected and the suggested words corresponding to the wrong words in the character segment to be corrected.

### Claim 10 (depends on 9)

The method according to claim 9, characterized in that the step of obtaining suggested words corresponding to the wrong words in the character segment to be corrected comprises:
determining whether the suggested words corresponding to the wrong words in the character segment to be corrected has been cached, according to the character locations of the wrong words in the character segment to be corrected;
if so, obtaining the suggested words corresponding to the wrong words in the character segment to be corrected from the cached suggested words corresponding to the wrong words;
otherwise, obtaining the suggested words corresponding to the wrong words in the character segment to be corrected according to a preset word library.

### Claim 11 (depends on 7)

The method according to claim 7, characterized in that after determining wrong words in the character segment to be corrected according to the range of the character segment to be corrected, the method further comprises:
determining whether the length of the wrong words in the character segment to be corrected is within a preset range;
if so, performing the step of obtaining suggested words corresponding to the wrong words in a character segments to be corrected.

### Claim 12 (depends on 7)

The method according to claim 7, characterized in that the method further comprises:
receiving an instruction for selecting suggested words, wherein, target suggested words are carried in the instruction for selecting suggested words; and
replacing original words corresponding to the target suggested words with the target suggested words and presenting the target suggested words.

### Claim 13 (depends on 2)

The method according to claim 2, characterized in that the method further comprises:
obtaining range of a modified character segment;
obtaining character locations of wrong words in the modified character segment;
marking the wrong words in the modified character segment in a form of preset mark and updating the cached character locations of the wrong words according to the range of the modified character segment and the character locations of the wrong words in the modified character segment.

### Claim 14

A method for spell checking, which is applied to a server, characterized in that the method comprises:
receiving character segments corresponding to characters contained in a page to be presented sent by a client, wherein, the character segments are obtained by dividing the page to be presented according to a preset character segment dividing rule by the client;
obtaining character locations of wrong words in each of the received character segments;
sending the character locations of the wrong words in each of the character segments to the client such that the client presents each of the character segments and mark wrong words in the corresponding character segment in a form of preset mark according to the character locations of the wrong words in each of the character segments.

### Claim 15 (depends on 14)

The method according to claim 14, characterized in that the method further comprises:
receiving an instruction for presenting suggested words sent by the client, wherein, range of a character segment to be corrected is carried in the instruction for presenting suggested words;
determining wrong words in the character segment to be corrected according to the range of the character segment to be corrected;
obtaining suggested words corresponding to the wrong words in the character segment to be corrected; and
sending the obtained suggested words to the client such that the client presents the obtained suggested words.

### Claim 16 (depends on 14)

The method according to claim 14, characterized in that the method further comprises:
receiving an instruction for checking a modified character segment, wherein, range of the modified character segment is carried in the instruction for checking;
obtaining character locations of wrong words in the modified character segment;
sending the character locations of the wrong words in the modified character segment to the client such that the client is able to mark the wrong words in the form of the preset mark according to the character locations of the wrong words in the modified character segment.

### Claim 17 (depends on 15)

The method according to claim 15, characterized in that the method further comprises:
receiving an instruction for checking a modified character segment, wherein, range of the modified character segment is carried in the instruction for checking;
obtaining character locations of wrong words in the modified character segment;
sending the character locations of the wrong words in the modified character segment to the client such that the client is able to mark the wrong words in the form of the preset mark according to the character locations of the wrong words in the modified character segment.

### Claim 18

An apparatus for spell checking, which is applied to a client, characterized in that the apparatus comprises:
a character segment determining module for determining character segments corresponding to characters contained in a page to be presented according to a preset character segment dividing rule;
a character location obtaining module for obtaining character locations of wrong words in each of the determined character segments; and
a wrong word marking module for presenting each of the determined character segments and marking, according to the character locations of the wrong words in each of the determined character segments, the wrong words in the corresponding character segment in a form of preset mark.

### Claim 19 (depends on 18)

The apparatus according to claim 18, characterized in that the apparatus further comprises:
a character location caching module for caching the character locations of the wrong words in each of the determined character segments after the character location obtaining module obtaining the character locations.

### Claim 20 (depends on 19)

The apparatus according to claim 19, characterized in that the character location obtaining module comprises:
a character segment determining submodule for determining whether the spell checking has been performed on a target character segment, according to range of the target character segment, wherein the target character segment is any one of the determined character segments;
a word obtaining submodule for performing word segmentation on the target character segment and obtaining words corresponding to the target character segment in case that the determining result from the character segment determining submodule is negative;
a first character location obtaining submodule for performing the spell checking on the words corresponding to the target character segment according to a preset spell checking rule, determining wrong words in the target character segment and obtaining character locations of the wrong words in the target character segment;
a second character location obtaining submodule for obtaining character locations of wrong words in the target character segment according to information on the target character segment in the cached character locations in case that the determining result from the character segment determining submodule is positive.

### Claim 21 (depends on 20)

The apparatus according to claim 20, characterized in that the first character location obtaining submodule comprises:
a first wrong word obtaining unit for performing the spell checking on the words corresponding to the target character segment according to a preset word library and obtaining wrong words in the target character segment; and
a first character location determining unit for determining character locations of wrong words in the wrong words of the target character segment for which the spell checking is not ignorable as the character locations of the wrong words in the target character segment.

### Claim 22 (depends on 20)

The apparatus according to claim 20, characterized in that the second character location obtaining submodule comprises:
a second wrong word obtaining unit for obtaining the wrong words in the target character segment according to the information on the target character segment in the cached character locations;
a second character location determining unit for determining character locations of wrong words in the wrong words of the target character segment for which the spell checking is not ignorable as the character locations of the wrong words in the target character segment.

### Claim 23 (depends on 20)

The apparatus according to claim 20, characterized in that the word obtaining submodule comprises:
a word segmentation unit for performing the word segmentation on the target character segment;
a filtering unit for filtering the segmented words according to a preset word filtering rule; and
a word obtaining unit for obtaining the words corresponding to the target character segment according to the filtered words.

### Claim 24 (depends on 19)

The apparatus according to claim 19, characterized in that the apparatus further comprises:
a presenting instruction receiving module for receiving an instruction for presenting suggested words, wherein, range of a character segment to be corrected is carried in the instruction for presenting suggested words;
a wrong word determining module for determining wrong words in the character segment to be corrected according to the range of the character segment to be corrected;
a suggested word obtaining module for obtaining suggested words corresponding to the wrong words in the character segment to be corrected; and
a suggested word presenting module for presenting the obtained suggested words.

### Claim 25 (depends on 24)

The apparatus according to claim 24, characterized in that the wrong word determining module comprises:
a range matching submodule for matching the range of the character segment to be corrected with the cached character locations; and
a wrong word determining submodule for determining the wrong words in the character segment to be corrected according to the result of the matching.

### Claim 26 (depends on 24)

The apparatus according to claim 24, characterized in that the apparatus further comprises:
a suggested word caching module for caching character locations of the wrong words in the character segment to be corrected and the suggested words corresponding to the wrong words in the character segment to be corrected after the suggested word obtaining module obtaining the suggested words.

### Claim 27 (depends on 26)

The apparatus according to claim 26, characterized in that the suggested word obtaining module comprises:
a suggested word determining submodule for determining whether the suggested words corresponding to the wrong words in the character segment to be corrected have been cached according to the character locations of the wrong words in the character segment to be corrected;
a first suggested word obtaining submodule for obtaining the suggested words corresponding to the wrong words in the character segment to be corrected from the cached suggested words corresponding to the wrong words in case that the determining result from the suggested word determining submodule is positive; and
a second suggested word obtaining submodule for obtaining the suggested words corresponding to the wrong words in the character segment to be corrected according to a preset word library in case that the determining result from the suggested word determining submodule is negative.

### Claim 28 (depends on 24)

The apparatus according to claim 24, characterized in that the apparatus further comprises:
a length determining module for determining whether the length of the wrong words in the character segment to be corrected is within a preset range, and if so, triggering the suggested word obtaining module to obtain the suggested words.

### Claim 29 (depends on 24)

The apparatus according to claim 24, characterized in that the apparatus further comprises:
a selection instruction receiving module for receiving an instruction for selecting suggested words, wherein, target suggested words are carried in the instruction for selecting suggested words; and
a word replacing module for replacing original words corresponding to the target suggested words with the target suggested words and presenting the target suggested words.

### Claim 30 (depends on 19)

The apparatus according to claim 19, characterized in that the apparatus further comprises:
a range obtaining module for obtaining range of a modified character segment;
the character location obtaining module is further used for obtaining character locations of wrong words in the modified character segment;
the wrong word marking module is further used for marking the wrong words in the modified character segment in a form of preset mark and updating the cached character locations of the wrong words according to the range of the modified character segment and the character locations of the wrong words in the modified character segment.

### Claim 31

An apparatus for spell checking, which is applied to a server, characterized in that the apparatus comprises:
a character segment receiving module for receiving character segments corresponding to characters contained in a page to be presented sent by a client, wherein, the character segments are obtained by dividing the page to be presented according to a preset character segment dividing rule by the client;
a character location obtaining module for obtaining character locations of wrong words in each of the received character segments; and
a character location sending module for sending the character locations of the wrong words in each of the character segments to the client such that the client is able to present each of the character segments and mark wrong words in the corresponding character segment in a form of preset mark according to the character locations of the wrong words in each of the character segments.

### Claim 32 (depends on 31)

The apparatus according to claim 31, characterized in that the apparatus further comprises:
a presenting instruction receiving module for receiving an instruction for presenting suggested words sent by the client, wherein, range of a character segment to be corrected is carried in the instruction for presenting suggested words;
a wrong word determining module for determining wrong words in the character segment to be corrected according to the range of the character segment to be corrected;
a suggested word obtaining module for obtaining suggested words corresponding to the wrong words in the character segment to be corrected; and
a suggested word sending module for sending the obtained suggested words to the client such that the client is able to present the obtained suggested words.

### Claim 33 (depends on 31)

The apparatus according to claim 31, characterized in that the apparatus further comprises:
a check instruction receiving module for receiving an instruction for checking a modified character segment, wherein, the range of the modified character segment is carried in the instruction for checking;
the character location obtaining module is further used for obtaining character locations of wrong words in the modified character segment;
the character location sending module is further used for sending the character locations of the wrong words in the modified character segment to the client such that the client is able to mark the wrong words in the form of the preset mark according to the character locations of the wrong words in the modified character segment.

### Claim 34 (depends on 32)

The apparatus according to claim 32, characterized in that the apparatus further comprises:
a check instruction receiving module for receiving an instruction for checking a modified character segment, wherein, the range of the modified character segment is carried in the instruction for checking;
the character location obtaining module is further used for obtaining character locations of wrong words in the modified character segment;
the character location sending module is further used for sending the character locations of the wrong words in the modified character segment to the client such that the client is able to mark the wrong words in the form of the preset mark according to the character locations of the wrong words in the modified character segment.
