IInkAnalyzer interface
Provides access to layout analysis, writing and drawing classification, and handwriting recognition.
Members
The IInkAnalyzer interface inherits from the IUnknown interface. IInkAnalyzer also has these types of members:
Methods
The IInkAnalyzer interface has these methods.
Method | Description |
---|---|
Abort | Cancels the current analysis operation. |
AddStroke | Adds stroke data for a single stroke to the IInkAnalyzer and assigns the active input thread's culture identifier to the stroke. |
AddStrokeForLanguage | Adds stroke data for a single stroke to the IInkAnalyzer and assigns a specific culture identifier to the stroke. |
AddStrokes | Adds stroke data for multiple strokes to the IInkAnalyzer and assigns the active input thread's culture identifier to the strokes. |
AddStrokesForLanguage | Adds stroke data for multiple strokes to the IInkAnalyzer and assigns the specified culture identifier to the strokes. |
AddStrokesToCustomRecognizer | Adds stroke data for multiple strokes to a custom recognizer node. |
AddStrokeToCustomRecognizer | Adds stroke data for a single stroke to a custom recognizer node. |
Analyze | Performs synchronous ink analysis. |
BackgroundAnalyze | Performs asynchronous ink analysis. |
ClearStrokeData | Clears stroke packet data from the IInkAnalyzer. |
CreateAnalysisHint | Adds a new analysis hint node with an infinite area to the IInkAnalyzer. |
CreateContextNodes | Creates an IContextNodes object. |
CreateCustomRecognizer | Creates a new custom recognizer node for the IInkAnalyzer. |
DeleteAnalysisHint | Removes an analysis hint from the IInkAnalyzer. |
FindInkLeafNodes | Retrieves all of the ink leaf nodes. |
FindInkLeafNodesForStrokes | Retrieves the ink leaf nodes that contain the specified strokes. |
FindLeafNodes | Retrieves all of the leaf nodes. |
FindNode | Retrieves the IContextNode object for a specified globally unique identifier (GUID). |
FindNodesOfType | Retrieves all of the IContextNode objects of the specified type. |
FindNodesOfTypeForStrokes | Retrieves all of the IContextNode objects of the specified type that contain the specified strokes. |
FindNodesOfTypeInSubTree | Retrieves all of the IContextNode objects of the specified type that are descendants of the specified IContextNode object. |
FindNodesWithCallBack | Retrieves all of the IContextNode objects that match the specified criteria. |
FindNodesWithCallBackInSubTree | Retrieves all of the IContextNode objects that match the specified criteria and are descendants of the specified IContextNode object. |
GetAlternates | Retrieves 10 analysis alternates for all ink associated with the IInkAnalyzer. |
GetAlternatesForContextNodes | Retrieves analysis alternates for the nodes in a specified IContextNodes collection. |
GetAlternatesForStrokes | Retrieves analysis alternates for the strokes with the specified stroke identifiers. |
GetAnalysisHints | Retrieves all of the analysis hint IContextNode objects that are attached to the IInkAnalyzer. |
GetAnalysisHintsByName | Retrieves all of the analysis hint IContextNode objects that are attached to the IInkAnalyzer and that have the specified name. |
GetAnalysisModes | Retrieves flags that control how the IInkAnalyzer performs ink analysis. |
GetDirtyRegion | Retrieves the area that has changed since the last analysis operation. |
GetInkAnalysisRecognizersByPriority | Retrieves an ordered collection of IInkAnalysisRecognizer objects. |
GetNodesFromTextRange | Retrieves a collection of IContextNode objects that are relevant to the specified text range for the specified context nodes. |
GetRecognizedString | Retrieves the best-result string of the recognition operation for the entire context node tree in the IInkAnalyzer. |
GetRootNode | Retrieves the root IContextNode of the IInkAnalyzer object's context tree. |
GetStrokeLanguageId | Retrieves the locale identifier of the specified stroke. |
GetStrokeType | Retrieves the type of the specified stroke. |
GetTextRangeFromNodes | Finds the text range in the recognized string that corresponds to a collection of IContextNode objects. |
IsAnalyzing | Retrieves a value indicating whether the IInkAnalyzer is performing ink analysis. |
LoadResults | Loads saved analysis results into the IInkAnalyzer. |
ModifyTopAlternate | Changes the current top alternate to the specified alternate and clears the confirmation type for all IContextNode objects associated with the alternate. |
ModifyTopAlternateWithConfirmation | Changes the current top alternate to the specified IAnalysisAlternate. |
Reconcile | Determines which portions of the analysis results have changed during background ink analysis. |
RemoveStroke | Removes the specified stroke from the IInkAnalyzer. |
RemoveStrokes | Removes the specified strokes from the IInkAnalyzer. |
SaveResults | Saves all analysis results for an IInkAnalyzer. |
SaveResultsForNodes | Saves analysis results for a specific context node collection associated with an IInkAnalyzer. |
SaveResultsForStrokes | Saves analysis results for the specified strokes associated with an IInkAnalyzer. |
Search | Provides a fuzzy, case-insensitive phrase based search for analyzed writing strokes and analyzed drawing strokes that have recognized types. |
SearchWithLanguageId | Provides a fuzzy, case-insensitive phrase based search for analyzed writing strokes and analyzed drawing strokes that have recognized types. |
SetAnalysisModes | Modifies flags that control how the IInkAnalyzer performs ink analysis. |
SetDirtyRegion | Modifies the area that has changed since the last analysis operation. |
SetHighestPriorityInkAnalysisRecognizer | Moves the specified IInkAnalysisRecognizer to the first position in the IInkAnalyzer object's list of ink recognizers. |
SetStrokeLanguageId | Changes the locale identifier for the specified stroke. |
SetStrokesLanguageId | Changes the locale identifier for the specified strokes. |
SetStrokesType | Changes the type of the specified strokes. |
SetStrokeType | Changes the type of the specified stroke. |
UpdateStrokesData | Updates the packet data for the specified strokes. |
Remarks
IInkAnalyzer uses stroke packet data to analyze ink and does not interact with InkDisp Class or InkStrokes Collection objects directly.
To add or remove strokes to the IInkAnalyzer for analysis, use one of the following methods.
- IInkAnalyzer::AddStroke Method
- IInkAnalyzer::AddStrokes Method
- IInkAnalyzer::RemoveStroke Method
- IInkAnalyzer::RemoveStrokes Method
These methods update the dirty region (see IInkAnalyzer::GetDirtyRegion Method), which is the region for which strokes are analyzed in the next analysis operation.
To analyze ink, use the IInkAnalyzer::Analyze Method or IInkAnalyzer::BackgroundAnalyze Method method. During analysis, the IInkAnalyzer performs layout analysis, stroke classification, and handwriting recognition.
To change the layout analysis and stroke classification settings, use the IInkAnalyzer::SetAnalysisModes Method property.
During analysis, the IInkAnalyzer receives a number of events, including events generated during background analysis. _IAnalysisProxyEvents supports the data proxy features of the IInkAnalyzer. For more information, see Data Proxy with Ink Analysis. To stop the analysis process from within an event handler, call IInkAnalyzer::Abort Method.
To modify the language the ink analyzer uses to recognize handwriting, use IInkAnalyzer::SetStrokeLanguageId Method or IInkAnalyzer::SetStrokesLanguageId Method. To modify how the ink analyzer classifies specific strokes, use IInkAnalyzer::SetStrokeType Method or IInkAnalyzer::SetStrokesType Method.
The IInkAnalyzer loads information for all of the installed ink recognizers. IInkAnalyzer::GetInkAnalysisRecognizersByPriority Method returns an IInkAnalysisRecognizers collection containing each available IInkAnalysisRecognizer. If more than one ink recognizer supports a specific language, use IInkAnalyzer::SetHighestPriorityInkAnalysisRecognizer Method to set which ink recognizer handles strokes for that language.
Using analysis hints can improve the recognition accuracy by providing extra context to the ink analyzer. The additional context information can help the ink analyzer limit the number of possible recognition results. For example, you can narrow the scope by defining factoids and expected words or by structuring your input into a recognition guide. For more information about providing context to the ink analyzer, see:
- IInkAnalyzer::CreateAnalysisHint Method
- IInkAnalyzer::DeleteAnalysisHint Method
- IInkAnalyzer::GetAnalysisHints Method
- IInkAnalyzer::GetAnalysisHintsByName Method
The ink analyzer represents analysis results as a string or as a tree of IContextNode objects. To access the recognized string, use IInkAnalyzer::GetRecognizedString Method. To access the root of the context node tree, use IInkAnalyzer::GetRootNode Method. The ink analyzer has the following methods for finding specific context nodes or text.
- IInkAnalyzer::FindInkLeafNodes Method
- IInkAnalyzer::FindInkLeafNodesForStrokes Method
- IInkAnalyzer::FindLeafNodes Method
- IInkAnalyzer::FindNode Method
- IInkAnalyzer::FindNodesOfType Method
- IInkAnalyzer::FindNodesOfTypeForStrokes Method
- IInkAnalyzer::FindNodesOfTypeInSubTree Method
- IInkAnalyzer::FindNodesWithCallBack Method
- IInkAnalyzer::FindNodesWithCallBackInSubTree Method
To work with alternate analysis results, use one of the following methods.
- IInkAnalyzer::GetAlternates Method
- IInkAnalyzer::GetAlternatesForContextNodes Method
- IInkAnalyzer::GetAlternatesForStrokes Method
- IInkAnalyzer::ModifyTopAlternate Method
- IInkAnalyzer::ModifyTopAlternateWithConfirmation Method
To save analysis results, use one of the following methods.
- IInkAnalyzer::SaveResults Method
- IInkAnalyzer::SaveResultsForNodes Method
- IInkAnalyzer::SaveResultsForStrokes Method
To load saved results, use IInkAnalyzer::LoadResults Method.
For more information about using the IInkAnalyzer to analyze ink, see Ink Analysis Overview.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server |
None supported |
Header |
|
DLL |
|