次の方法で共有


InkAnalyzer.GetAlternates メソッド (ContextNodeCollection, Int32)

指定した ContextNodeCollection 内のノードの分析代替候補を指定した数返します。

名前空間 :  Microsoft.Ink
アセンブリ :  Microsoft.Ink.Analysis (Microsoft.Ink.Analysis.dll 内)

構文

'宣言
Public Function GetAlternates ( _
    nodes As ContextNodeCollection, _
    maximumAlternates As Integer _
) As AnalysisAlternateCollection
'使用
Dim instance As InkAnalyzer
Dim nodes As ContextNodeCollection
Dim maximumAlternates As Integer
Dim returnValue As AnalysisAlternateCollection

returnValue = instance.GetAlternates(nodes, _
    maximumAlternates)
public AnalysisAlternateCollection GetAlternates(
    ContextNodeCollection nodes,
    int maximumAlternates
)
public:
AnalysisAlternateCollection^ GetAlternates(
    ContextNodeCollection^ nodes, 
    int maximumAlternates
)
public AnalysisAlternateCollection GetAlternates(
    ContextNodeCollection nodes,
    int maximumAlternates
)
public function GetAlternates(
    nodes : ContextNodeCollection, 
    maximumAlternates : int
) : AnalysisAlternateCollection

パラメータ

  • maximumAlternates
    型 : System.Int32
    返される分析代替候補の数。

戻り値

型 : Microsoft.Ink.AnalysisAlternateCollection
nodes の最大 maximumAlternates 個の上位分析代替候補。

解説

最上位の代替候補が、コレクションの最初の代替候補として返されます。

nodes 内の ContextNode オブジェクトは、ドキュメントの隣接する領域を表している必要はありません。

nodes 内の分析のヒントごとに、InkAnalyzer は最上位の代替候補のみ返します。

この例では、InkAnalyzer、theInkAnalyzer に関連付けられた ContextNodeCollection、theContextNodes の上位 5 個までの代替候補を取得します。次に、代替候補の認識された文字列を System.Collections.Specialized.StringCollection、theAlternateStrings に追加します。

' Get 5 analysis alternates for the context node collection and add the
' recognized strings to a string collection.
theAlternateCollection = Me.theInkAnalyzer.GetAlternates(theContextNodes, 5)
theAlternateStrings.Clear()
Dim theAlternate As Microsoft.Ink.AnalysisAlternate
For Each theAlternate In theAlternateCollection
    theAlternateStrings.Add(theAlternate.RecognizedString)
Next theAlternate
// Get 5 analysis alternates for the context node collection and add the
// recognized strings to a string collection.
theAlternateCollection = this.theInkAnalyzer.GetAlternates(theContextNodes, 5);
theAlternateStrings.Clear();
foreach (Microsoft.Ink.AnalysisAlternate theAlternate
    in theAlternateCollection)
{
    theAlternateStrings.Add(theAlternate.RecognizedString);
}

プラットフォーム

Windows Vista

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

InkAnalyzer クラス

InkAnalyzer メンバ

GetAlternates オーバーロード

Microsoft.Ink 名前空間

Microsoft.Ink.AnalysisAlternate

Microsoft.Ink.AnalysisAlternateCollection

Microsoft.Ink.ContextNode

Microsoft.Ink.ContextNodeCollection