Поделиться через


AnalysisHintNode.SetWordlist - метод

Обновлен: Ноябрь 2007

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

Пространство имен:  System.Windows.Ink
Сборка:  IAWinFX (в IAWinFX.dll)

Синтаксис

'Декларация
Public Sub SetWordlist ( _
    wordlist As String() _
)
'Применение
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[]
)

Параметры

Заметки

The Factoid and CoerceToFactoid properties interact with the word list to modify how handwriting is matched to terms.

  • When the Factoid property is set with the (!IS_PHRASELIST) token, the recognizer matches terms that are stored in the word list. If the token is not set, the recognizer matches terms that are stored 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.

Примеры

This example creates an AnalysisHintNode (named theAnalysisHint) for the InkAnalyzer (named 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";

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

AnalysisHintNode Класс

AnalysisHintNode - члены

System.Windows.Ink - пространство имен