福尔摩斯和华生
获取作家阿瑟·柯南·道尔的与福尔摩斯有关的几本小说.
In[1]:=

novels = {Entity["Book", "TheSignOfTheFour1890"],
Entity["Book", "TheAdventuresOfSherlockHolmes"],
Entity["Book", "TheHoundOfTheBaskervilles"],
Entity["Book", "TheReturnOfSherlockHolmes1904"]};
In[2]:=

texts = EntityValue[novels, "Plaintext"];
找出两个主要角色被提到的次数.
In[3]:=

counts = WordCounts /@ texts;
In[4]:=

watson = counts[[All, "Watson"]];
holmes = counts[[All, "Holmes"]];
用全新 Callout 功能对结果绘图.
In[5]:=

callouts =
Callout @@@ Transpose[{Transpose[{holmes, watson}], novels}];
In[6]:=

ListPlot[callouts, AxesLabel -> {"Holmes", "Watson"},
AspectRatio -> Automatic, AxesOrigin -> {0, 0}]
Out[6]=
