Wolfram Language

Text & Language Processing

Explore the Structure of Texts

Version 11 includes a new sophisticated tool to analyze and visualize texts, TextStructure.

Generate a nested collection of TextElement objects representing the grammatical structure of a generic sentence.

In[1]:=
Click for copyable input
TextStructure["The cat sat on the mat."]
Out[1]=

Display parts of speech tags only.

In[2]:=
Click for copyable input
TextStructure["The cat sat on the mat.", "PartsOfSpeech"]
Out[2]=

Return the grammatical dependencies as a graph.

In[3]:=
Click for copyable input
TextStructure["The cat sat on the mat.", "DependencyGraphs"]
Out[3]=

Related Examples

de es fr ja ko pt-br ru zh