Let InkAnalyzer only recognize shapes RRS feed

  • Question

  • Hello all

    I'm now already trying for some hours to forcefully disable text recognition such as the recognition results will only return non-textual nodes (like Rectangle, Straight, Other, Triangle, etc)..

    I've somewhere read, that setting the Factoid of a global AnalysisHintNode to "None" would disable any text interpretation.. But today I struggled over another site (after the InkAnalyzer still returned some text results!), where it says that setting the Factoid to none would only deactivate the dictionaries and allow recognition of unknown words. So that's not really what I want..

    I saw that RecognizerContext eventually may be the better choice, but as I'm using WPF 3.5 SP1 (and therefore the System.Windows.Ink namespace contained in IAWinFX.dll) I have some compatibility issues (different Stroke classes) when trying to use the RecognizerContext (Microsoft.Ink).

    So my Question is: is there any way in WPF to get the strokes only interpreted as Shapes? That may e.g. be useful for sketching / rapid prototyping applications.

    My current idea is to draw "nodes" and if one or more strokes has been recognized as a node, I'm adding an AnalysisHintNode "over" this node to allow text/number recognition inside this node. How should one implement this?

    Interesting Links I found:
    Setting the Factoid (beware that the Syntax has changed! See next Link for more infos. Also there is a regex like extension to allow self defined Factoids)
    Currently supported Factoids

    Kind regards,

    Technical details, I'm using:
    - C# 3.5 SP1
    - WPF
    - InkAnalyzer
    - TabletPC SDK v1.7 (included in Vista SDK or so? I'm not sure anymore)
    • Edited by Bibolorean Wednesday, October 28, 2009 12:09 PM clearify some things
    Wednesday, October 28, 2009 12:06 PM


  • oh my god...

    there is another way I almost forgot: Set stroke type

    But I'm wondering why an AnalysisHint won't be capable of the same thing..
    It would be surely nicer to create an analysis hint and define, that all strokes collected inside this hint, would get the StrokeType.Drawing.. Isn't it?

    Maybe I'll implement a little helper method which decides which StrokeType current stroke should get by using AnalysisHintNodes as carrier for this information..

    Have a nice day!

    • Marked as answer by Bibolorean Thursday, October 29, 2009 8:15 AM
    Thursday, October 29, 2009 8:15 AM