Penrod and Sam

Plaintext for Booth Tarkington's "Penrod and Sam"

(66747 words/382573 characters)

Examples

Basic Examples

Retrieve the ResourceObject:

In[1]:=
ResourceObject["Penrod and Sam"]
Out[1]=

View the data:

In[2]:=
RandomChoice[TextCases[ResourceData["Penrod and Sam"], "Paragraph"]]
Out[2]=

Visualization

Show the popularity of countries in a text:

In[3]:=
BarChart[TakeLargest[
   Counts[Interpreter["Country"][
     ToLowerCase /@ 
      TextCases[ResourceData["Penrod and Sam"], "Country"]]], 4] // 
  Reverse, BarOrigin -> Left, ChartLabels -> Automatic]
Out[3]=

Diagram a sentence:

In[4]:=
Column[{#, TextStructure[#, "ConstituentGraph"]}] &[
 RandomChoice[TextSentences[ResourceData["Penrod and Sam"]]]]
Out[4]=

Wolfram Research, "Penrod and Sam" from the Wolfram Data Repository. (2016) https://doi.org/10.24097/wolfram.82024.data

Source Metadata

Data Downloads