Page Summary
-
The Entity Extraction API provides functions to access supported entity types and model identifiers.
-
Developers can retrieve a set of all supported entity types using
allEntityTypes(). -
allModelIdentifiers()returns a set of all supported model identifiers for the API. -
Functions are available to convert between model identifiers and BCP 47 language tags.
Functions
The following functions are available globally.
-
Returns a set that contains
EntityTypecodes of all entity types supported by the entity extraction API.Declaration
Swift
static func allEntityTypes() -> Set<EntityType> -
Returns a set that contains
EntityExtractionModelIdentifiervalues of all model identifiers supported by the Entity Extraction API.Declaration
Swift
static func allModelIdentifiers() -> Set<EntityExtractionModelIdentifier> -
Returns the BCP 47 language tag for this
EntityExtractionModelIdentifier.Declaration
Swift
func toLanguageTag() -> String -
Returns the
EntityExtractionModelIdentifierfor a given BCP 47 language tag, ornilif the language tag is invalid or not supported by the Entity Extraction API.Declaration
Swift
static func fromLanguageTag(_ languageTag: String) -> EntityExtractionModelIdentifier?