مرجع إطار عمل MLKitText learning Common
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
TextElement
class TextElement : NSObject
عنصر نصي تم التعرّف عليه في صورة. العنصر النصي هو جزء مفصول بمسافة في النص
سطر (على سبيل المثال، كلمة بمعظم اللغات ذات النصوص اللاتينية).
-
تمثيل سلسلة للعنصر النصي الذي تم التعرّف عليه
بيان الإفصاح
Swift
var text: String { get }
-
المستطيل الذي يحتوي على عنصر النص الخاص بالصورة في الإحداثي الافتراضي
مساحة.
بيان الإفصاح
Swift
var frame: CGRect { get }
-
مصفوفة من اللغات المعروفة في العنصر النصي. إذا لم يتم التعرف على أي لغة، فإن الصفيفة
فارغ.
بيان الإفصاح
Swift
var recognizedLanguages: [MLKTextRecognizedLanguage] { get }
-
نقاط الزوايا الأربع للعنصر النصي بترتيب في اتجاه عقارب الساعة بدءًا من النقطة العلوية اليسرى
بالنسبة للصورة في مساحة الإحداثيات الافتراضية. عناصر NSValue
هي CGPoint
.
بيان الإفصاح
Swift
var cornerPoints: [NSValue] { get }
-
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["`MLKTextElement` represents a word or space-separated text segment recognized within an image."],["It provides access to the text content, its bounding rectangle (`frame`), and recognized languages."],["Corner points of the element's location in the image are also available, along with a string representation of the recognized text."],["Direct initialization of `MLKTextElement` is not allowed; it's obtained through text recognition results."]]],["A `TextElement` represents a recognized word in an image. It provides the `text` as a string, its `frame` (bounding rectangle), and an array of `recognizedLanguages`. It also offers `cornerPoints`, detailing the four corners of the element's position. The text's properties are provided as get-only. It is not initializable with `init`, so you will have to retrieve them from an existing recognized text object.\n"]]