

TextWords
Details

- Characters in string that are not identified as being part of words are dropped by TextWords.
- TextWords[ContentObject[…]] gives words from the plain text contents of the ContentObject.
Examples
open all close allBasic Examples (3)
Segment a string into a list of words:
TextWords separates words by punctuation as well as whitespace:
Scope (3)
TextWords preserves hyphenation:
Titles, currencies and other syntactic units are segmented as separate words:
Get a list of words from a ContentObject:
Applications (1)
Make a WordCloud of words from a poem:
Properties & Relations (2)
Possible Issues (1)
Words returned by TextWords are identified structurally, and may not be dictionary words:
See Also
WordCount TextSentences TextCases StringSplit WordCounts DeleteStopwords WordStem TextRecognize FeatureExtractor SequencePredict
Text Contents: Word
Function Repository: JapaneseTextTokenizer KeywordsGraph
Related Guides
Related Workflows
- Analyze the Text on a Webpage
Text
Wolfram Research (2015), TextWords, Wolfram Language function, https://reference.wolfram.com/language/ref/TextWords.html (updated 2016).
CMS
Wolfram Language. 2015. "TextWords." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/TextWords.html.
APA
Wolfram Language. (2015). TextWords. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TextWords.html
BibTeX
@misc{reference.wolfram_2025_textwords, author="Wolfram Research", title="{TextWords}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/TextWords.html}", note=[Accessed: 10-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_textwords, organization={Wolfram Research}, title={TextWords}, year={2016}, url={https://reference.wolfram.com/language/ref/TextWords.html}, note=[Accessed: 10-August-2025]}