Share via


InkAnalyzer.Search Method (String, Int32)

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, _
    languageId As Integer _
) As Strokes()
'Usage
Dim instance As InkAnalyzer 
Dim phraseToSearch As String 
Dim languageId As Integer 
Dim returnValue As Strokes()

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

Parameters

  • phraseToSearch
    Type: System.String

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

  • languageId
    Type: System.Int32

    The LCID associated with the string that is passed. Used to convert the case interally to support case insensitive comparisons.

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