MLKitDigitalInkRecognition Framework Reference

  • ML Kit's Digital Ink Recognition API offers various models for recognizing handwritten text and symbols.

  • Language models cover a wide range of languages, scripts, and regional variations.

  • Constants like MLKDigitalInkRecognitionModelIdentifierEnGb specify the recognition model.

  • Developers can tailor the recognition process by selecting the appropriate model.

  • These models are essential for accurate and language-specific handwriting recognition in your apps.

Constants

The following constants are available globally.

  • Autodraw symbol recognition model.

    Model similar to that used by www.autodraw.com for sketch recognition. Given a collection of strokes representing a drawing, returns a string identifying the object. Because of the inherent ambiguity in recognizing some drawings, it is recommended to use multiple candidates, for example by exposing them to the user and letting them decide.

    This recognition model provides scores via DigitalInkRecognitionCandidate.score.

    Declaration

    Objective-C

    extern NS_SWIFT_NAME(DigitalInkRecognitionModelIdentifier.autodraw)
                             MLKDigitalInkRecognitionModelIdentifier *const
                         MLKDigitalInkRecognitionModelIdentifierAutodraw
  • Emoji symbol recognition model.

    Recognizes single Emoji characters and returns them as Unicode code points. Because of the inherent ambiguity in recognizing some drawings, it is recommended to use multiple candidates, for example by exposing them to the user and letting them decide.

    This recognition model provides scores via DigitalInkRecognitionCandidate.score.

    Declaration

    Objective-C

    extern NS_SWIFT_NAME(DigitalInkRecognitionModelIdentifier.emoji)
                             MLKDigitalInkRecognitionModelIdentifier *const
                         MLKDigitalInkRecognitionModelIdentifierEmoji
  • Shapes symbol recognition model.

    Given a collection of strokes representing a single shape, returns a string containing either RECTANGLE, TRIANGLE, ARROW, or ELLIPSE.

    This recognition model provides scores via DigitalInkRecognitionCandidate.score.

    Declaration

    Objective-C

    extern NS_SWIFT_NAME(DigitalInkRecognitionModelIdentifier.shapes)
                             MLKDigitalInkRecognitionModelIdentifier *const
                         MLKDigitalInkRecognitionModelIdentifierShapes