The Prince

Plaintext for Niccolò Machiavelli's "The Prince"

(45617 words/258412 characters)

Examples

Basic Examples

Retrieve the ResourceObject:

In[1]:=
ResourceObject["The Prince"]
Out[1]=

View the data:

In[2]:=
TextCases[ResourceData["The Prince"], "Paragraph"][[20]]
Out[2]=

Visualization

Show the distribution of sentence lengths:

In[3]:=
With[{sentences = TextSentences[ResourceData["The Prince"]]},
 Histogram[(Length /@ (TextWords /@ sentences)), PlotRange -> Full]]
Out[3]=

Show the most frequently used adjectives:

In[4]:=
BarChart[TakeLargest[
   Counts[TextCases[ResourceData["The Prince"], "Adjective"]], 20] // 
  Reverse, BarOrigin -> Left, ChartLabels -> Automatic]
Out[4]=

Wolfram Research, "The Prince" from the Wolfram Data Repository. (2016) https://doi.org/10.24097/wolfram.47573.data

Source Metadata

Data Downloads