AnalysisHintNode.SetWordlist Method

Changes the word list for the current analysis hint. The word list supplements or replaces the dictionary as a source of possible terms to match with handwriting.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.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

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 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 and fails to match the handwritten phrase to a term then the recognizer returns nothing. 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, 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 System.Windows.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 AnalysisHintNode = Me.theInkAnalyzerWithHint.CreateAnalysisHint()
theAnalysisHint.Location.MakeInfinite()

theAnalysisHint.SetWordlist(Me.theWordList)
theAnalysisHint.Name = "Wordlist"
// Add a new, global analysis hint to theInkAnalyzerWithHint.
AnalysisHintNode theAnalysisHint =
    this.theInkAnalyzerWithHint.CreateAnalysisHint();
theAnalysisHint.Location.MakeInfinite();

theAnalysisHint.SetWordlist(this.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
System.Windows.Ink Namespace