TextWords

TextWords["string"]

gives a list of the runs of characters identified as words in string.

TextWords["string",n]

gives the first n words in string.

Details

Examples

open allclose all

Basic Examples  (3)

Segment a string into a list of words:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

TextWords separates words by punctuation as well as whitespace:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Get the first 10 words in a block of text:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Applications  (1)

Properties & Relations  (2)

Possible Issues  (1)

See Also

WordCount  TextSentences  TextCases  StringSplit  WordCounts  DeleteStopwords  WordStem  TextRecognize  FeatureExtractor  SequencePredict

Introduced in 2015
(10.1)