Simplest possible tokenizer
Simplest possible tokenizer
input annotations columns currently used
Gets annotation column name going to generate
Gets annotation column name going to generate
Strings that will be split when found at the middle of token (Default: Array("\n", "(", ")")
).
Input Annotator Type : DOCUMENT
Input Annotator Type : DOCUMENT
columns that contain annotations necessary to run this annotator AnnotatorType is used both as input and output columns if not specified
columns that contain annotations necessary to run this annotator AnnotatorType is used both as input and output columns if not specified
Output Annotator Type : TOKEN
Output Annotator Type : TOKEN
Strings that will be split when found at the beginning of token (Default: Array("'", "\"", "(", "[", "\n")
).
Strings that will be split when found at the middle of token.
Overrides required annotators column if different than default
Overrides required annotators column if different than default
Overrides annotation column name when transforming
Overrides annotation column name when transforming
Strings that will be split when found at the beginning of token.
Strings that will be split when found at the end of token.
Whitelist.
Strings that will be split when found at the end of token (Default: Array(".", ":", "%", ",", ";", "?", "'", "\"", ")", "]", "\n", "!", "'s")
).
requirement for pipeline transformation validation.
requirement for pipeline transformation validation. It is called on fit()
required uid for storing annotator to disk
required uid for storing annotator to disk
takes a Dataset and checks to see if all the required annotation types are present.
takes a Dataset and checks to see if all the required annotation types are present.
to be validated
True if all the required types are present, else false
Whitelist (Default: Array("it's", "that's", "there's", "he's", "she's", "what's", "let's", "who's", "It's", "That's", "There's", "He's", "She's", "What's", "Let's", "Who's")
).
A list of (hyper-)parameter keys this annotator can take. Users can set and get the parameter values through setters and getters, respectively.
Required input and expected output annotator types
Tokenizes raw text recursively based on a handful of definable rules.
Unlike the Tokenizer, the RecursiveTokenizer operates based on these array string parameters only:
prefixes
: Strings that will be split when found at the beginning of token.suffixes
: Strings that will be split when found at the end of token.infixes
: Strings that will be split when found at the middle of token.whitelist
: Whitelist of strings not to splitFor extended examples of usage, see the Spark NLP Workshop and the TokenizerTestSpec.
Example