Explorez la structure des textes
La version 11 inclut un nouvel outil sophistiqué pour analyser et visualiser des textes, TextStructure.
Générez une collection imbriquée d'objets de TextElement représentant la structure grammaticale d'une phrase générique.
In[1]:=
![Click for copyable input](assets.fr/explore-the-structure-of-texts/In_94.png)
TextStructure["The cat sat on the mat."]
Out[1]=
![](assets.fr/explore-the-structure-of-texts/O_62.png)
Affichez seulement les balises des parties du discours.
In[2]:=
![Click for copyable input](assets.fr/explore-the-structure-of-texts/In_95.png)
TextStructure["The cat sat on the mat.", "PartsOfSpeech"]
Out[2]=
![](assets.fr/explore-the-structure-of-texts/O_63.png)
Renvoyez les dépendances grammaticales sous la forme d'un graphe.
In[3]:=TextStructure["The cat sat on the mat.", "DependencyGraphs"]
Out[3]=