Tokenizer
On this Page
Overview
This Snap converts sentences into an array of tokens. A token, in the context of the ML Natural Language Processing Snap Pack, can be a word and / or special characters. In order to perform Natural Language Processing (NLP) operations with other Snaps in this Snap Pack, an array of tokens is required.
The Tokenizer Snap uses Apache OpenNLP Library.
The Apache OpenNLP library is a machine-learning based toolkit for processing natural language text. It supports the most common NLP tasks, such as tokenization, sentence segmentation, part-of-speech tagging, named entity extraction, chunking, parsing, and coreference resolution.
Input and Output
- Expected input: A document containing text fields.
- Expected output: A document containing an array of tokens.
- Expected upstream Snaps: Any Snap that offers documents. For example: Mapper, CSV Generator.
- Expected downstream Snaps: Any Snap that accepts documents. For example: Common Words, Bag of Words, or Mapper.
Prerequisites
None.
Configuring Accounts
Accounts are not used with this Snap.
Configuring Views
Input | This Snap has exactly one document input view. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
None.
Limitations and Known Issues
None.
Modes
- Ultra Pipelines: Works in Ultra Pipelines.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. |
---|---|
Text field | Required. The field containing the sentences that must be tokenized. This suggestible property is a JSONPath. Default value: None. Example: $text |
Word only | Select this property to not include spacial characters in the output. Default value: Selected. |
Snap Execution | Select one of the following three modes in which the Snap executes:
Default Value: Execute only |
Examples
Tokenizing Text Data
In this example, we show how to use the Tokenizer Snap to convert sentences into an array of tokens, which can be used in other NLP Snaps.
Download this pipeline.
Downloads
Important steps to successfully reuse Pipelines
- Download and import the pipeline into the SnapLogic application.
- Configure Snap accounts as applicable.
- Provide pipeline parameters as applicable.