MLKitEntityExtraction Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
MoneyEntity
class MoneyEntity : NSObject
A money entity extracted from text.
-
The currency part of the detected annotation. No formatting is applied so this will return a
subset of the initial string.
Declaration
Swift
var unnormalizedCurrency: String { get }
-
The integer part of the detected annotation. This is the integer written to the left of the
decimal separator.
Declaration
Swift
var integerPart: Int { get }
-
The fractional part of the detected annotation. This is the integer written to the right of the
decimal separator.
Declaration
Swift
var fractionalPart: Int { get }
-
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\u003e\u003ccode\u003eMoneyEntity\u003c/code\u003e objects represent monetary values extracted from text.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eunnormalizedCurrency\u003c/code\u003e property provides the original currency text as detected.\u003c/p\u003e\n"],["\u003cp\u003eThe monetary value is split into \u003ccode\u003eintegerPart\u003c/code\u003e and \u003ccode\u003efractionalPart\u003c/code\u003e for numerical representation.\u003c/p\u003e\n"],["\u003cp\u003eDirect initialization of \u003ccode\u003eMoneyEntity\u003c/code\u003e instances is not allowed.\u003c/p\u003e\n"]]],["The `MoneyEntity` class extracts money information from text. Key properties include `unnormalizedCurrency`, which represents the raw currency string found. `integerPart` and `fractionalPart` provide the numerical components, to the left and right of the decimal separator, respectively. The class properties are read-only and no instantiation is possible, since `init` is unavailable.\n"],null,[]]