Index   Commented   Search   About

AddWordsHWL

  1. 0

Adds words to a word list.

int AddWordsHWL( HWL hwl, LPSTR lpsz, UINT uType )

Parameters

hwl

Handle to a word list, or the constant HWL_SYSTEM for the recognizer's master word list.

lpsz

A pointer to a source of words, depending on the uType parameter.

uType

Word list type. This can be one of the following values:

Constant
Description
WLT_STRING
lpsz points to a single null-terminated character string in memory.
WLT_STRINGTABLE
lpsz points to an array of null-terminated character strings in memory. The list is terminated by two null characters.
WLT_WORDLIST
lpsz is the handle of a previously created word list, cast as LPSTR.

Return Value

Returns HRCR_OK if successful; otherwise, returns one of the following negative values:

Constant
Description
HRCR_ERROR
Invalid parameter or other error.
HRCR_MEMERR
Insufficient memory.

Comments

If a user wants to add a word to the system word list, which is available whenever the system dictionary is enabled (see EnableSystemDictionaryHRC), then hwl should be set to the predefined constant HWL_SYSTEM. Words that are not normally found in a dictionary, such as a person's name, can be added to the system word list. How this list is implemented, its size, or if it even exists, depends on the recognizer. A typical recognizer might maintain a thousand-word list, replacing random entries on overflow.

The HWL_SYSTEM constant cannot be used in any of the other word-list functions. For example, it is not possible to destroy the system word list with the DestroyHWL function.

For a description of word lists and how a recognizer uses them, see "Configuring the HRC" in Chapter 5, "The Recognition Process."

See Also

CreateHWL
, EnableSystemDictionaryHRC

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun