AnalysisHintNode.SetWordlist Method
Changes the word list for this analysis hint. The word list supplements or replaces the dictionary as a source of possible terms to match with handwriting.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.dll)
Syntax
'Declaration
Public Sub SetWordlist ( _
wordlist As String() _
)
'Usage
Dim instance As AnalysisHintNode
Dim wordlist As String()
instance.SetWordlist(wordlist)
public void SetWordlist (
string[] wordlist
)
public:
void SetWordlist (
array<String^>^ wordlist
)
public void SetWordlist (
String[] wordlist
)
public function SetWordlist (
wordlist : String[]
)
Not applicable.
Parameters
- wordlist
A string array to add a word list, or a null reference (Nothing in Visual Basic) to remove the word list.
Remarks
The Factoid and CoerceToFactoid properties and the word list interact to modify how handwriting is matched to terms.
When the Factoid property is set with the (!IS_PHRASELIST) token, the recognizer matches to terms in the word list instead of the dictionary. If the token is not set, the recognizer matches to terms in both the word list and the dictionary.
The CoerceToFactoid property determines whether the recognizer will return words that are not matched in either the dictionary or word list. If the property is set to true, the recognizer returns nothing if it fails to match the handwritten phrase to a term. If CoerceToFactoid is set to false, the recognizer favors matched results, but can return a string that does not occur in either list.
The following table summarizes possible return values given various combinations of these property settings:
Factoid |
CoerceToFactoid |
Possible Return Values |
---|---|---|
Does not contain (!IS_PHRASELIST) or "WORDLIST" |
false |
A value from either the word list or the dictionary, or an unlisted result. |
Contains (!IS_PHRASELIST) or "WORDLIST" |
false |
A value from the word list, or an unlisted result. |
Contains "(!IS_PHRASELIST)" or "WORDLIST" |
true |
A value from the word list, or nothing. |
If a string is added to a word list, its capitalized versions are also implicitly added. For instance, adding "hello" implicitly adds "Hello" and "HELLO".
To return the hint's word list, use GetWordlist.
During analysis, if the ink recognizer applied to the strokes does not support word lists, the ink analyzer generates an AnalysisWarning with its WarningCode property set to the Microsoft.Ink.AnalysisWarningCode value of WordlistNotSupported.
Example
This example creates an AnalysisHintNode, theAnalysisHint
, for the InkAnalyzer, theInkAnalyzerWithHint
, and makes theAnalysisHint
a global hint. It then adds a word list to the hint and sets the hint's name.
' Add a new, global analysis hint to theInkAnalyzerWithHint.
Dim theAnalysisHint As Microsoft.Ink.AnalysisHintNode = _
Me.theInkAnalyzerWithHint.CreateAnalysisHint()
theAnalysisHint.Location.MakeInfinite()
theAnalysisHint.SetWordlist(TheForm.theWordList)
theAnalysisHint.Name = "Wordlist"
// Add a new, global analysis hint to theInkAnalyzerWithHint.
Microsoft.Ink.AnalysisHintNode theAnalysisHint =
this.theInkAnalyzerWithHint.CreateAnalysisHint();
theAnalysisHint.Location.MakeInfinite();
theAnalysisHint.SetWordlist(TheForm.theWordList);
theAnalysisHint.Name = "Wordlist";
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
AnalysisHintNode Class
AnalysisHintNode Members
Microsoft.Ink Namespace