Share via


InkAnalyzer.Search Method (String)

Provides a fuzzy, case-insensitive phrase based search for analyzed writing strokes and analyzed drawing strokes that have recognized types.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Function Search ( _
    phraseToSearch As String _
) As Strokes()
'Usage
Dim instance As InkAnalyzer 
Dim phraseToSearch As String 
Dim returnValue As Strokes()

returnValue = instance.Search(phraseToSearch)
public Strokes[] Search(
    string phraseToSearch
)
public:
array<Strokes^>^ Search(
    String^ phraseToSearch
)
public function Search(
    phraseToSearch : String
) : Strokes[]

Parameters

  • phraseToSearch
    Type: System.String

    The phrase that will be found in the alternates for the currently analyzed strokes.

Return Value

Type: array<Microsoft.Ink.Strokes[]
An array of Strokes representing a set of sets of strokes.

Remarks

This search finds multi-word and single word substrings. Both alternate recognition results and alternate segmentations are searched.

All incoming strings will be converted to a single casing for comparison utilizing the LCID of the current thread to do this conversion to respect cultural case conventions.

The string passed is treated as a phrase. Words and characters must appear in the alterantes for the strokes in the order specified. The first and last words of the phrase may be matched as substrings (the first word appearing at the end of an alternate and the last word appearing at the begginging of one), but any other words (those inside of the phrase) must appear as whole words.

If the string passed in has no whitespace in between characters, the substring may be found anywhere inside of a single word in an alternate.

Only the presence or absence of whitespace between characters changes the results of search. Whitespace that is not surrounded by characters is ignored. The type of the whitespace is ignored (a tab or a space between characters will give the same result). The amount of whitespace does not matter - one space or two spaces in between characters will give the same result.

Search does not generate PopulateContextNode events. Only the strokes that have already been populated will be searched.

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class

InkAnalyzer Members

Search Overload

Microsoft.Ink Namespace