Package opennlp.tools.tokenize
package opennlp.tools.tokenize
-
ClassDescriptionChecks whether a candidate token is accepted by the alphanumeric optimization of
TokenizerMEandTokSpanEventStream, so it is not split further.Character classifications and text transforms of the reference BERTBasicTokenizer, shared byWordpieceEncoderandWordpieceTokenizer.TheBPEModelstores learned BPE merge operations and can be serialized and deserialized for reuse.ATokenizerimplementation that performs subword tokenization using Byte Pair Encoding (BPE).Represents a pair of adjacent symbols in BPE.ABaseToolFactoryfor BPE tokenization that manages the BPE merge rules artifact and its serialization within aBPEModel.AnArtifactSerializerfor BPE merge rules.Learns BPE merge operations from a training corpus and produces aBPEModel.A defaultTokenContextGeneratorwhich produces events for maxent decisions for tokenization.ADetokenizermerges tokens back to their detokenized representation.This enum contains an operation for every token to merge the tokens together to their detokenized form.A rule based detokenizer.The normalized text with the original-text range for each character.A basicTokenizerimplementation which performs tokenization using character classes.One subword unit produced by aSubwordTokenizer, including the model representation and source range.Splits text into subword units from a fixed model vocabulary, reporting the model id and original-text span for each unit.Deprecated.Interface for context generators required fortokenizer implementations.The interface for tokenizers, which segment a string into its tokens.Adapts aTokenizerto the document pipeline: providesLayers.TOKENS.An immutable policy for testing token eligibility against explicit character sets.A cross validator fortokenizers.A marker interface for evaluatingtokenizers.TheTokenizerEvaluatormeasures the performance of the givenTokenizerwith the provided referencesamples.The factory that providesTokenizerdefault implementation and resources.Checks a candidate token against a whole-match regular expression, for factories and event streams configured with a custom alphanumericPattern.ATokenizerfor converting raw text into separated tokens.TheTokenizerModelis the model used by a learnableTokenizer.ATokenSampleis text with token spans.This class is astream filterwhich reads in string encoded samples and createssamplesout of them.A basicTokenizerimplementation which performs tokenization using white spaces.This stream formatsObjectStreamofsamplesinto whitespace separated token strings.ASubwordTokenizerimplementing the BERT tokenization stages: basic tokenization (control removal, whitespace normalization, CJK isolation, optional lower casing with accent stripping, punctuation isolation) followed by greedy longest-match wordpiece segmentation.One node of the vocabulary trie.A vocabulary match and the exclusive end offset in normalized text.Finds vocabulary entries without creating strings for candidate lengths.ATokenizerimplementation which performs tokenization using word pieces.
TokenizerMEis itself thread-safe.