This function sets a spelling error tolerance that an application’s automatic replace feature can use. When a misspelling exceeds the error tolerance, the spelling checker does not return suggestions for the misspelled word.
At a Glance
Header file: | Splapi.h |
Windows CE versions: | 2.10 and later |
Syntax
int SplLimitSet ( HSPL hslp, DWORD dw);
Parameters
hspl
Handle to the spelling session. An application initiates a spelling session by calling the SplInit function, which then generates this handle.
dw
Specifies the error tolerance.
The spelling errors in the following list are ordered from the least severe to the most severe. The spelling checker does not provide a suggestion when it encounters either the specified error type or any error more severe than the set limit.
The dw parameter is one of the following error types:
Value | Description |
SPL_LIMIT_NONE | The only spelling suggestion returned is for a word that is correctly spelled one way. For example, the suggestion for “i” is “I,” and the suggestion for “thier” is “their.” |
SPL_LIMIT_CAPITAL | An error is corrected by capitalizing the initial letter of the word. |
SPL_LIMIT_DROP_DOUBLE_CONSONANT | An error is corrected by substituting a double consonant for a single consonant. |
SPL_LIMIT_ADD_DOUBLE_CONSONANT | An error is corrected by substituting a single consonant for a double consonant. |
SPL_LIMIT_TRANSPOSE_VOWEL | An error is corrected by transposing two vowels. |
SPL_LIMIT_DROP_DOUBLE_VOWEL | An error is corrected by substituting a single vowel for a double vowel. |
SPL_LIMIT_ADD_DOUBLE_VOWEL | An error is corrected by substituting a double vowel for a single vowel. |
SPL_LIMIT_TRANSPOSE_CONSONANT | An error is corrected by transposing two consonants. |
SPL_LIMIT_TRANSPOSE | An error is corrected by transposing any two letters. |
SPL_LIMIT_SUBSTITUTE_VOWEL | An error is corrected by substituting a vowel for another vowel. |
SPL_LIMIT_DROP | An error is corrected by dropping a letter. |
SPL_LIMIT_ADD | An error is corrected by adding a letter. |
SPL_LIMIT_SUBSTITUTE_CONSONANT | An error is corrected by substituting a consonant for another consonant. |
SPL_LIMIT_SUBSTITUTE | An error is corrected by substituting a letter for another letter. |
Return Values
1 indicates success. 0 indicates failure.
Remarks
Typically, automatic replacement features set a low error tolerance limit; for instance, at SPL_LIMIT_NONE or SPL_LIMIT_CAPITAL.
In addition to setting an error limit for an automatic replace feature, the error types listed for dw are used to score suggestions that the spelling checker returns to the output buffer of the SPLBUFFER structure. For more information about scoring suggestions, see SplSuggest and SPLSUGGEST.
See Also