zhenyuzeng
(Zhenyu Zeng)
January 9, 2023, 9:27am
1
CommunityGraphPlot[ First[TextStructure[First[TextSentences[WikipediaData[“language”]]], “ConstituentGraphs”]]]
Hello,
I see this code on my book. I am confused why added the First before the
TextStructure[First[TextSentences[WikipediaData[“language”]]],
“ConstituentGraphs”]]
I know no First will cause error, but I don’t know why should add it?
Thanks.
danl
(Daniel Lichtblau)
January 9, 2023, 2:03pm
2
What is TextStructure returning?
zhenyuzeng
(Zhenyu Zeng)
January 9, 2023, 2:14pm
3
The structure of the sentence according to the words in it? What’s the answer and hot to get the answer from MMA?
TextStructure returns a list. The text can be multiple sentences, in which case the list contains an element for each sentence. CommunityGraphPlot requires a Graph as input, not a List of Graph.
zhenyuzeng
(Zhenyu Zeng)
January 10, 2023, 1:46am
5
Thanks for your kind reply. I know now.