TextStructure

TextStructure["text"]
generates a nested collection of TextElement objects representing the grammatical structure of natural language text.

TextStructure["text",form]
generates a representation of the type specified by form of the grammatical structure of text.

DetailsDetails

  • Possible types of text structure include:
  • "ConstituentTree"nested text elements of phrase structure
    "ConstituentGraphs"graph of phrase structure
    "ConstituentStrings"string representing phrase structure
    "PartsOfSpeech"text elements tagging parts of speech
    "DependencyGraphs"graph of grammatical dependencies
    "DependencyStrings"string representing grammatical dependencies

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Display the grammatical structure of a sentence:

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

Display parts of speech tags:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2015
(10.3)