TokenDictRule
public struct TokenDictRule : Codable, Equatable
An object defining a single tokenizaion rule.
-
The string to tokenize.
Declaration
Swift
public var text: String -
Array of tokens that the
textfield is split into when found.Declaration
Swift
public var tokens: [String] -
Array of tokens that represent the content of the
textfield in an alternate character set.Declaration
Swift
public var readings: [String]? -
The part of speech that the
textstring belongs to. For examplenoun. Custom parts of speech can be specified.Declaration
Swift
public var partOfSpeech: String -
Initialize a
TokenDictRulewith member variables.Declaration
Swift
public init( text: String, tokens: [String], partOfSpeech: String, readings: [String]? = nil )Parameters
textThe string to tokenize.
tokensArray of tokens that the
textfield is split into when found.partOfSpeechThe part of speech that the
textstring belongs to. For examplenoun. Custom parts of speech can be specified.readingsArray of tokens that represent the content of the
textfield in an alternate character set.Return Value
An initialized
TokenDictRule.
View on GitHub
TokenDictRule Structure Reference