Overview
This node splits or extracts text from an input field based on various methods such as length, paragraph, sentence, word, or regex. It is useful for processing large text blocks by dividing them into manageable chunks or extracting specific patterns using regular expressions. Practical applications include preparing text for analysis, summarization, or further processing in workflows.
Use Case Examples
- Splitting a long article into paragraphs for individual processing.
- Extracting all email addresses from a text using regex.
- Dividing text into sentences for sentiment analysis.
Properties
| Name | Meaning |
|---|---|
| Text Field | Name of the field in the input item that contains the text to process. |
| Split Method | Method used to split the text into chunks. |
| Length (characters) | Number of characters per chunk when splitting by length. |
| Regex Pattern (for split) | Regular expression pattern used to split the text when split method is regex. |
Output
JSON
chunk- A chunk of text resulting from the split operation.match- A matched substring extracted using regex in extract operation.
Troubleshooting
- If the specified text field does not exist in the input item, the node will skip processing that item, resulting in no output chunks for it.
- Using an invalid regular expression pattern may cause errors or unexpected behavior; ensure the regex is valid and properly escaped.
- When splitting by sentence, if the text does not contain typical sentence-ending punctuation, the entire text may be returned as a single chunk.