Expansion

public struct Expansion : Codable, Equatable

An expansion definition. Each object respresents one set of expandable strings. For example, you could have expansions for the word hot in one object, and expansions for the word cold in another.

  • A list of terms that will be expanded for this expansion. If specified, only the items in this list are expanded.

    Declaration

    Swift

    public var inputTerms: [String]?
  • A list of terms that this expansion will be expanded to. If specified without input_terms, it also functions as the input term list.

    Declaration

    Swift

    public var expandedTerms: [String]
  • Initialize a Expansion with member variables.

    Declaration

    Swift

    public init(
        expandedTerms: [String],
        inputTerms: [String]? = nil
    )

    Parameters

    expandedTerms

    A list of terms that this expansion will be expanded to. If specified without input_terms, it also functions as the input term list.

    inputTerms

    A list of terms that will be expanded for this expansion. If specified, only the items in this list are expanded.

    Return Value

    An initialized Expansion.