Features

public struct Features : Codable, Equatable

Analysis features and options.

  • Returns text classifications for the content. Supported languages: English only.

    Declaration

    Swift

    public var classifications: ClassificationsOptions?
  • Returns high-level concepts in the content. For example, a research paper about deep learning might return the concept, “Artificial Intelligence” although the term is not mentioned. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.

    Declaration

    Swift

    public var concepts: ConceptsOptions?
  • Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with entities.emotion and for keywords with keywords.emotion. Supported languages: English.

    Declaration

    Swift

    public var emotion: EmotionOptions?
  • Identifies people, cities, organizations, and other entities in the content. For more information, see Entity types and subtypes. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through custom models.

    Declaration

    Swift

    public var entities: EntitiesOptions?
  • Returns important keywords in the content. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.

    Declaration

    Swift

    public var keywords: KeywordsOptions?
  • Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only.

    Declaration

    Swift

    public var metadata: [String : JSON]?
  • Recognizes when two entities are related and identifies the type of relation. For example, an awardedTo relation might connect the entities “Nobel Prize” and “Albert Einstein”. For more information, see Relation types. Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also supported.

    Declaration

    Swift

    public var relations: RelationsOptions?
  • Parses sentences into subject, action, and object form. Supported languages: English, German, Japanese, Korean, Spanish.

    Declaration

    Swift

    public var semanticRoles: SemanticRolesOptions?
  • Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with entities.sentiment and for keywords with keywords.sentiment. Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish.

    Declaration

    Swift

    public var sentiment: SentimentOptions?
  • (Experimental) Returns a summary of content. Supported languages: English only.

    Declaration

    Swift

    public var summarization: SummarizationOptions?
  • Returns a five-level taxonomy of the content. The top three categories are returned. Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.

    Declaration

    Swift

    public var categories: CategoriesOptions?
  • Returns tokens and sentences from the input text.

    Declaration

    Swift

    public var syntax: SyntaxOptions?
  • Initialize a Features with member variables.

    Declaration

    Swift

    public init(
        classifications: ClassificationsOptions? = nil,
        concepts: ConceptsOptions? = nil,
        emotion: EmotionOptions? = nil,
        entities: EntitiesOptions? = nil,
        keywords: KeywordsOptions? = nil,
        metadata: [String: JSON]? = nil,
        relations: RelationsOptions? = nil,
        semanticRoles: SemanticRolesOptions? = nil,
        sentiment: SentimentOptions? = nil,
        summarization: SummarizationOptions? = nil,
        categories: CategoriesOptions? = nil,
        syntax: SyntaxOptions? = nil
    )

    Parameters

    classifications

    Returns text classifications for the content. Supported languages: English only.

    concepts

    Returns high-level concepts in the content. For example, a research paper about deep learning might return the concept, “Artificial Intelligence” although the term is not mentioned. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.

    emotion

    Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with entities.emotion and for keywords with keywords.emotion. Supported languages: English.

    entities

    Identifies people, cities, organizations, and other entities in the content. For more information, see Entity types and subtypes. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through custom models.

    keywords

    Returns important keywords in the content. Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.

    metadata

    Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only.

    relations

    Recognizes when two entities are related and identifies the type of relation. For example, an awardedTo relation might connect the entities “Nobel Prize” and “Albert Einstein”. For more information, see Relation types. Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also supported.

    semanticRoles

    Parses sentences into subject, action, and object form. Supported languages: English, German, Japanese, Korean, Spanish.

    sentiment

    Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with entities.sentiment and for keywords with keywords.sentiment. Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish.

    summarization

    (Experimental) Returns a summary of content. Supported languages: English only.

    categories

    Returns a five-level taxonomy of the content. The top three categories are returned. Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.

    syntax

    Returns tokens and sentences from the input text.

    Return Value

    An initialized Features.