MLKitDigitalInkRecognition Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Classes
The following classes are available globally.
-
Individual recognition candidate.
A recognizer usually provides several recognition alternatives. This object represents one such
alternative.
See DigitalInkRecognitionResult
for more details.
Declaration
Objective-C
@interface
MLKDigitalInkRecognitionCandidate
:
NSObject
-
Information about the context in which an ink has been drawn.
Pass this object to a DigitalInkRecognizer
alongside an ink to improve the recognition
quality.
Declaration
Objective-C
@interface
MLKDigitalInkRecognitionContext
:
NSObject
-
Represents a downloadable recognition model.
Recognition models are downloaded on the device when the download
method is called. The
downloaded model is unzipped when DigitalInkRecognizer
loads it at inference time for the
first time, which makes the first recognition a bit slower than subsequent ones.
This object contains properties that are constant throughout the lifetime of a recognition model.
See DigitalInkRecognitionContext
for the properties that depend on the ink being recognized.
-
Represents a digital ink recognition model specific to a language, script, and optionally a
regional variant.
Declaration
Objective-C
@interface
MLKDigitalInkRecognitionModelIdentifier
:
NSObject
-
Object representing the output of an ink recognition.
A recognizer usually provides several recognition alternatives, because the user intent is not
always clear. For example, if the user writes a vertical line and then a circle, the recognition
alternatives could include “10”, “IO”, and “lo”.
Alternatives are named “candidates”. This object represents a set of candidates as a list of DigitalInkRecognitionCandidate
.
Use DigitalInkRecognizer
to perform the recognition itself. If nothing could be recognized,
the property candidates
will be an empty array.
Declaration
Objective-C
@interface
MLKDigitalInkRecognitionResult
:
NSObject
-
Object to perform handwriting recognition on digital ink.
Digital ink is the vector representation of what a user has written. It is composed of a sequence
of strokes, each being a sequence of touch points (coordinates and timestamp). See Ink
for
details.
Declaration
Objective-C
@interface
MLKDigitalInkRecognizer
:
NSObject
-
Options defining the behavior of a DigitalInkRecognizer
.
Declaration
Objective-C
@interface
MLKDigitalInkRecognizerOptions
:
NSObject
-
A single touch point from the user.
Declaration
Objective-C
@interface
MLKStrokePoint
:
NSObject
-
Represents a sequence of touch points between a pen (resp. touch) down and pen (resp. touch) up
event.
Declaration
Objective-C
@interface
MLKStroke
:
NSObject
-
Represents the user input as a collection of Stroke
and serves as input for the handwriting
recognition task.
Declaration
Objective-C
@interface
MLKInk
:
NSObject
-
A model that is stored remotely on the server and downloaded to the device.
Declaration
Objective-C
@interface
MLKRemoteModel
:
NSObject
-
Properties of the writing area.
The writing area is the area on the screen where the user can draw an ink.
Declaration
Objective-C
@interface
MLKWritingArea
:
NSObject
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eThis documentation details globally available classes for digital ink recognition within ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eThese classes provide functionality for recognizing handwritten text from user input, including representing ink strokes, managing recognition models, and handling recognition results.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMLKDigitalInkRecognizer\u003c/code\u003e is the core class used to perform the recognition, utilizing models like \u003ccode\u003eMLKDigitalInkRecognitionModel\u003c/code\u003e and options defined by \u003ccode\u003eMLKDigitalInkRecognizerOptions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eInput is represented by \u003ccode\u003eMLKInk\u003c/code\u003e, comprising of \u003ccode\u003eMLKStroke\u003c/code\u003e objects made up of \u003ccode\u003eMLKStrokePoint\u003c/code\u003e instances, while \u003ccode\u003eMLKDigitalInkRecognitionResult\u003c/code\u003e encapsulates the recognition output with candidate interpretations (\u003ccode\u003eMLKDigitalInkRecognitionCandidate\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMLKDigitalInkRecognitionContext\u003c/code\u003e provides contextual information for improved recognition, and \u003ccode\u003eMLKWritingArea\u003c/code\u003e defines properties of the user's writing space.\u003c/p\u003e\n"]]],["The content outlines classes for digital ink recognition. Key classes include `MLKDigitalInkRecognizer` for performing recognition, `MLKInk` for representing user input, and `MLKStroke` with `MLKStrokePoint` for handling touch data. `MLKDigitalInkRecognitionResult` provides recognition alternatives (`MLKDigitalInkRecognitionCandidate`). `MLKDigitalInkRecognitionModel` and `MLKDigitalInkRecognitionModelIdentifier` manage downloadable recognition models. `MLKDigitalInkRecognitionContext` enhances recognition quality. `MLKDigitalInkRecognizerOptions` adjust recognizer behavior, and `MLKWritingArea` sets the drawing area properties. `MLKRemoteModel` is for models on the server.\n"],null,["# MLKitDigitalInkRecognition Framework Reference\n\nClasses\n=======\n\nThe following classes are available globally.\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognitionCandidate](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognitionCandidate)\n\n `\n ` \n Individual recognition candidate.\n\n A recognizer usually provides several recognition alternatives. This object represents one such\n alternative.\n\n See `DigitalInkRecognitionResult` for more details. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognitionCandidate : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognitionContext](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognitionContext)\n\n `\n ` \n Information about the context in which an ink has been drawn.\n\n Pass this object to a `DigitalInkRecognizer` alongside an ink to improve the recognition\n quality. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognitionContext : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognitionModel](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognitionModel)\n\n `\n ` \n Represents a downloadable recognition model.\n\n Recognition models are downloaded on the device when the `download` method is called. The\n downloaded model is unzipped when `DigitalInkRecognizer` loads it at inference time for the\n first time, which makes the first recognition a bit slower than subsequent ones.\n\n This object contains properties that are constant throughout the lifetime of a recognition model.\n\n See `DigitalInkRecognitionContext` for the properties that depend on the ink being recognized. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognitionModel : /ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKRemoteModel\n\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognitionModelIdentifier](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognitionModelIdentifier)\n\n `\n ` \n Represents a digital ink recognition model specific to a language, script, and optionally a\n regional variant. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognitionModelIdentifier : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognitionResult](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognitionResult)\n\n `\n ` \n Object representing the output of an ink recognition.\n\n A recognizer usually provides several recognition alternatives, because the user intent is not\n always clear. For example, if the user writes a vertical line and then a circle, the recognition\n alternatives could include \"10\", \"IO\", and \"lo\".\n\n Alternatives are named \"candidates\". This object represents a set of candidates as a list of\n `DigitalInkRecognitionCandidate`.\n\n Use `DigitalInkRecognizer` to perform the recognition itself. If nothing could be recognized,\n the property `candidates` will be an empty array. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognitionResult : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognizer](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognizer)\n\n `\n ` \n Object to perform handwriting recognition on digital ink.\n\n Digital ink is the vector representation of what a user has written. It is composed of a sequence\n of strokes, each being a sequence of touch points (coordinates and timestamp). See `Ink` for\n details. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognizer : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKDigitalInkRecognizerOptions](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKDigitalInkRecognizerOptions)\n\n `\n ` \n Options defining the behavior of a `DigitalInkRecognizer`. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKDigitalInkRecognizerOptions : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKStrokePoint](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKStrokePoint)\n\n `\n ` \n A single touch point from the user. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKStrokePoint : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKStroke](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKStroke)\n\n `\n ` \n Represents a sequence of touch points between a pen (resp. touch) down and pen (resp. touch) up\n event. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKStroke : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKInk](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKInk)\n\n `\n ` \n Represents the user input as a collection of `Stroke` and serves as input for the handwriting\n recognition task. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKInk : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKRemoteModel](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKRemoteModel)\n\n `\n ` \n A model that is stored remotely on the server and downloaded to the device. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKRemoteModel : NSObject\n\n- `\n ``\n ``\n `\n\n ### [MLKWritingArea](/ml-kit/reference/ios/mlkitdigitalinkrecognition/api/reference/Classes/MLKWritingArea)\n\n `\n ` \n Properties of the writing area.\n\n The writing area is the area on the screen where the user can draw an ink. \n\n #### Declaration\n\n Objective-C \n\n\n @interface MLKWritingArea : NSObject"]]