تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
باستخدام واجهة برمجة التطبيقات للتعرّف على الحبر الرقمي ضمن أدوات تعلّم الآلة، يمكنك التعرّف على النصوص المكتوبة بخط اليد وتصنيف الإيماءات على سطح رقمي بمئات اللغات، بالإضافة إلى تصنيف الرسومات. وتستخدم واجهة برمجة التطبيقات الرقمية للتعرّف على الحبر التكنولوجيا نفسها التي تتيح التعرّف على الكتابة بخط اليد في Gboard و"ترجمة Google" ولعبة Quick, Draw!.
وتتيح لك ميزة التعرّف على الحبر الرقمي تنفيذ ما يلي:
يمكنك الكتابة على الشاشة بدلاً من الكتابة على لوحة مفاتيح افتراضية. ويتيح ذلك للمستخدمين
رسم أحرف غير متاحة على لوحة المفاتيح، مثل banana أو اثن أو 森
للوحات المفاتيح الأبجدية اللاتينية.
تنفيذ العمليات النصية الأساسية (التنقل والتعديل والتحديد وما إلى ذلك)
باستخدام الإيماءات.
يتيح لك هذا الإعداد التعرّف على الأشكال والرموز التعبيرية المرسومة يدويًا.
يعمل نظام التعرّف على الحبر الرقمي بالضغطات التي يرسمها المستخدم على الشاشة. وإذا كنت بحاجة إلى قراءة نص من الصور التي تم التقاطها باستخدام الكاميرا، يمكنك استخدام Text Recognition API.
تعمل ميزة التعرّف على الحبر الرقمي بلا اتصال بالإنترنت بشكل كامل ومتوافق مع نظامَي التشغيل Android وiOS.
توفِّر هذه الميزة تصنيف الإيماءات لهذه اللغات من خلال إضافات -x-gesture.
يتعرّف على الرموز التعبيرية والأشكال الأساسية
يعمل على إبقاء مساحة التخزين على الجهاز منخفضة من خلال تنزيل حِزم اللغات بشكل ديناميكي
حسب الحاجة
تستخدم أداة التعرُّف عنصر Ink كإدخال. Ink هي تمثيل متجه لما كتبه المستخدم على الشاشة: تسلسل من الضغطات، ويمثل كل منها قائمة من الإحداثيات مع معلومات زمنية تسمى نقاط الاتصال. ويبدأ ضغط المفاتيح
عندما يضع المستخدم قلم الشاشة أو إصبعه وينتهي عندما يرفعه. يتم تمرير Ink إلى أداة التعرّف، والتي تعرض نتيجة واحدة أو أكثر من نتائج التعرّف المحتمَلة بمستويات ثقة.
أمثلة
الكتابة بخط اليد بالإنجليزية
تُظهر الصورة على اليسار أدناه ما رسمه المستخدم على الشاشة. الصورة على اليمين هي كائن Ink المقابل. وهي تحتوي على الخطوط ذات النقاط الحمراء
التي تمثل نقاط الاتصال داخل كل ضربة.
توجد أربع ضغطات. تبدو أول ضغطتين في الكائن Ink على النحو التالي:
الحبر
شطب 1
x
392، 391، 389، 287، ...
y
52، 60، 76، 97، ...
t
0، 37، 56، 75، ...
شطب 2
x
497، 494، 493، 490، ...
y
167، 165، 165، 165، ...
t
694، 742، 751، 770، ...
...
عند إرسال Ink إلى أداة تعريف باللغة الإنجليزية، يتم عرض العديد من النصوص المحوَّلة من صوت محتمل، وهي تحتوي على خمسة إلى ستة أحرف. يتم ترتيبها عن طريق
تقليل الثقة:
RecognitionResult
المرشح رقم 1
ساعة اليد
المرشح رقم 2
هاندرو
مرشح التقدير رقم 3
صلب
المرشح رقم 4
هاندو
المرشح رقم 5
يدويًا
الإيماءات
تصنِّف مصنِّفات الإيماءات خط الحبر إلى فئة من فئات الإيماءات التسع
الواردة أدناه.
إيماءة
مثال
arch:above arch:below
caret:above caret:below
circle
كورن:أسفل اليسار
scribble
strike
verticalbar
writing
رسومات الرموز التعبيرية
تُظهر الصورة على اليسار أدناه ما رسمه المستخدم على الشاشة. الصورة على اليمين هي كائن Ink المقابل. وهي تحتوي على الخطوط ذات النقاط الحمراء
التي تمثل نقاط الاتصال داخل كل ضربة.
يحتوي الكائن Ink على ست ضغطات.
الحبر
شطب 1
x
269، 266، 262، 255، ...
y
40، 40، 40، 41، ...
t
0، 36، 56، 75، ...
شطب 2
x
179، 182، 183، 185، ...
y
157، 158، 159، 160، ...
t
2475، 2522، 2531، 2541، ...
...
عند إرسال Ink إلى أداة التعرّف على الرموز التعبيرية، ستحصل على عدة نصوص محتمَلة
مرتبة حسب ترتيب منخفض:
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eML Kit's Digital Ink Recognition API recognizes handwritten text and gestures, converting them into digital format, comparable to the technology used in Gboard and Google Translate.\u003c/p\u003e\n"],["\u003cp\u003eThis API enables on-screen writing in various languages, using gestures for text editing, and recognizing hand-drawn shapes and emojis, all without an internet connection.\u003c/p\u003e\n"],["\u003cp\u003eIt supports over 300 languages and 25+ writing systems, along with gesture classification and emoji recognition, functioning by processing stroke data of user input.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can integrate this feature to allow users to write with styluses or fingers, replacing or supplementing traditional keyboard input for a more natural and versatile user experience.\u003c/p\u003e\n"]]],["ML Kit's digital ink recognition API converts handwritten text, gestures, and sketches into digital formats. It operates offline on Android and iOS, supporting 300+ languages and 25+ writing systems. The API processes user-drawn strokes (Ink objects) to recognize text, emojis, and basic shapes, returning ranked recognition results. Gestures are classified into nine categories, aiding in text operations and user interface actions. Language packs are dynamically downloaded for space efficiency.\n"],null,["# Digital ink recognition\n\nWith ML Kit's digital ink recognition API, you can recognize handwritten text\nand classify gestures on a digital surface in hundreds of languages, as well as\nclassify sketches. The digital ink recognition API uses the same technology that\npowers handwriting recognition in Gboard, Google Translate, and the\n[Quick, Draw!](https://quickdraw.withgoogle.com/) game.\n\nDigital ink recognition allows you to:\n\n- Write on the screen instead of typing on a virtual keyboard. This lets users draw characters that are not available on their keyboard, such as ệ, अ or 森 for latin alphabet keyboards.\n- Perform basic text operations (navigation, editing, selection, and so on) using gestures.\n- Recognize hand‑drawn shapes and emojis.\n\nDigital ink recognition works with the strokes the user draws on the screen. If\nyou need to read text from images taken with the camera, use the\n[Text Recognition API](/ml-kit/vision/text-recognition).\n\nDigital ink recognition works fully offline and is supported on Android and iOS.\n\n[iOS](/ml-kit/vision/digital-ink-recognition/ios)\n[Android](/ml-kit/vision/digital-ink-recognition/android)\n\nKey Capabilities\n----------------\n\n- Converts handwritten text to sequences of unicode characters\n- Runs on the device in near real time\n- The user's handwriting stays on the device, recognition is performed without any network connection\n- Supports 300+ languages and 25+ writing systems, see the [complete list of supported languages](/ml-kit/vision/digital-ink-recognition/base-models#text)\n - Supports gesture classification for these languages via [`-x-gesture` extensions](/ml-kit/vision/digital-ink-recognition/base-models#text)\n- Recognizes emojis and basic shapes\n- Keeps on-device storage low by dynamically downloading language packs as needed\n\nThe recognizer takes an `Ink` object as input. `Ink` is a vector representation\nof what the user has written on the screen: a sequence of *strokes* , each being\na list of coordinates with time information called *touch points* . A stroke\nstarts when the user puts their stylus or finger down and ends when they lift it\nup. The `Ink` is passed to a recognizer, which returns one or more possible\nrecognition results, with levels of confidence.\n\nExamples\n--------\n\n### English handwriting\n\nThe image on the left below shows what the user drew on the screen. The image on\nthe right is the corresponding `Ink` object. It contains the strokes with red\ndots representing the touch points within each stroke.\n\n\nThere are four strokes. The first two strokes in the `Ink` object look like\nthis:\n\n| **Ink** |||\n|----------|-----|-------------------------|\n| Stroke 1 | `x` | 392, 391, 389, 287, ... |\n| Stroke 1 | `y` | 52, 60, 76, 97, ... |\n| Stroke 1 | `t` | 0, 37, 56, 75, ... |\n| Stroke 2 | `x` | 497, 494, 493, 490, ... |\n| Stroke 2 | `y` | 167, 165, 165, 165, ... |\n| Stroke 2 | `t` | 694, 742, 751, 770, ... |\n| ... | | |\n\nWhen you send this `Ink` to a recognizer for the English language, it returns\nseveral possible transcriptions, containing five or six characters. They are\nordered by decreasing confidence:\n\n| **RecognitionResult** ||\n|-------------------------|--------|\n| RecognitionCandidate #1 | handw |\n| RecognitionCandidate #2 | handrw |\n| RecognitionCandidate #3 | hardw |\n| RecognitionCandidate #4 | handu |\n| RecognitionCandidate #5 | handwe |\n\n### Gestures\n\nGesture classifiers classify an ink stroke into one of nine gesture classes\nlisted below.\n\n| Gesture | Example |\n|-----------------------------|---------|\n| `arch:above` `arch:below` | |\n| `caret:above` `caret:below` | |\n| `circle` | |\n| corner:downleft | |\n| `scribble` | |\n| `strike` | |\n| `verticalbar` | |\n| `writing` | |\n\n| **Note:** It is not always possible to reliably distinguish some gestures from writing. For example, the `verticalbar` gesture may look exactly like the digit `1` or letter `l` when they are written as a vertical lines. To allow the user to use both gestures and writing, your application may need to consider the position of the writing or gesture: for the writing over existing text, prefer the gesture interpretation; for the writing over empty space, prefer the text interpretation.\n\n### Emoji sketches\n\nThe image on the left below shows what the user drew on the screen. The image on\nthe right is the corresponding `Ink` object. It contains the strokes with red\ndots representing the touch points within each stroke.\n\n\nThe `Ink` object contains six strokes.\n\n\n| **Ink** |||\n|----------|-----|-----------------------------|\n| Stroke 1 | `x` | 269, 266, 262, 255, ... |\n| Stroke 1 | `y` | 40, 40, 40, 41, ... |\n| Stroke 1 | `t` | 0, 36, 56, 75, ... |\n| Stroke 2 | `x` | 179, 182, 183, 185, ... |\n| Stroke 2 | `y` | 157, 158, 159, 160, ... |\n| Stroke 2 | `t` | 2475, 2522, 2531, 2541, ... |\n| ... | | |\n\nWhen you send this `Ink` to the emoji recognizer, you get several possible\ntranscriptions, ordered by decreasing confidence:\n\n| **RecognitionResult** ||\n|-------------------------|--------------|\n| RecognitionCandidate #1 | 😂 (U+1f62d) |\n| RecognitionCandidate #2 | 😅 (U+1f605) |\n| RecognitionCandidate #3 | 😹 (U+1f639) |\n| RecognitionCandidate #4 | 😄 (U+1f604) |\n| RecognitionCandidate #5 | 😆 (U+1f606) |"]]