Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Nov 19, 2024
1 parent 5bf7c94 commit 8669288
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
27 changes: 27 additions & 0 deletions _sources/zipf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,33 @@
"np.random.choice(singletons, 100)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As it turns out, \"chartist\" and \"chartism\" do not appear in this corpus, confirming that they are rare words. "
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"counter['chartist'], counter['chartism']"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions zipf.html
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,19 @@ <h2>Word Frequencies<a class="headerlink" href="#word-frequencies" title="Permal
</div>
</div>
</div>
<p>As it turns out, “chartist” and “chartism” do not appear in this corpus, confirming that they are rare words.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">counter</span><span class="p">[</span><span class="s1">&#39;chartist&#39;</span><span class="p">],</span> <span class="n">counter</span><span class="p">[</span><span class="s1">&#39;chartism&#39;</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0
</pre></div>
</div>
</div>
</div>
<p>Now let’s see what the distribution of word frequencies looks like.</p>
</section>
<section id="zipfs-law">
Expand Down

0 comments on commit 8669288

Please sign in to comment.