Hamlet

Hamlet, Prince of Denmark, by William Shakespeare

(31874 words/173845 characters)

Examples

Basic Examples

Retrieve the ResourceObject:

In[1]:=
ResourceObject["Hamlet"]
Out[1]=

View the data:

In[2]:=
TextCases[ResourceData["Hamlet"], "Paragraph"][[44]]
Out[2]=

Visualization

Compare word lengths:

In[3]:=
With[{words = TextWords[ResourceData["Hamlet"]]},
 Histogram[(StringLength /@ words), PlotRange -> Full]]
Out[3]=

Create a word cloud:

In[4]:=
WordCloud[ResourceData["Hamlet"]]
Out[4]=

Wolfram Research, "Hamlet" from the Wolfram Data Repository. (2015) https://doi.org/10.24097/wolfram.15472.data

Source Metadata

Data Downloads