You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapter5/natural_language_processing.ipynb
+71-22Lines changed: 71 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,6 @@
27
27
"### TextBlob: Processing Text in One Line of Code"
28
28
]
29
29
},
30
-
{
31
-
"attachments": {},
32
-
"cell_type": "markdown",
33
-
"id": "955a5dec",
34
-
"metadata": {},
35
-
"source": [
36
-
"Processing text doesn’t need to be hard. If you want to find the sentiment of the text, tokenize text, find noun phrase and word frequencies, correct spelling, etc in one line of code, try TextBlob.\n"
37
-
]
38
-
},
39
30
{
40
31
"cell_type": "code",
41
32
"execution_count": null,
@@ -68,35 +59,70 @@
68
59
"!python -m textblob.download_corpora"
69
60
]
70
61
},
62
+
{
63
+
"attachments": {},
64
+
"cell_type": "markdown",
65
+
"id": "955a5dec",
66
+
"metadata": {},
67
+
"source": [
68
+
"To quickly analyze text, including determining its sentiment, tokenization, noun phrase and word frequency analysis, and spelling correction, use TextBlob.\n",
69
+
"\n",
70
+
"To use TextBlob, start with creating a new instance of the TextBlob class with the text \"Today is a beautiful day\"."
"[Link to TextBlob](https://textblob.readthedocs.io/en/dev/).\n",
264
+
"[Link to TextBlob](https://bit.ly/465oJK0).\n",
216
265
"\n",
217
266
"[Link to my article about TextBlob](https://towardsdatascience.com/supercharge-your-python-string-with-textblob-2d9c08a8da05?sk=b9de5981cf74c0adf8d9f2a913e3ca05)."
<h2><spanclass="section-number">6.6.1. </span>TextBlob: Processing Text in One Line of Code<aclass="headerlink" href="#textblob-processing-text-in-one-line-of-code" title="Permalink to this heading">#</a></h2>
554
-
<p>Processing text doesn’t need to be hard. If you want to find the sentiment of the text, tokenize text, find noun phrase and word frequencies, correct spelling, etc in one line of code, try TextBlob.</p>
@@ -578,14 +577,22 @@ <h2><span class="section-number">6.6.1. </span>TextBlob: Processing Text in One
578
577
</div>
579
578
</details>
580
579
</div>
580
+
<p>To quickly analyze text, including determining its sentiment, tokenization, noun phrase and word frequency analysis, and spelling correction, use TextBlob.</p>
581
+
<p>To use TextBlob, start with creating a new instance of the TextBlob class with the text “Today is a beautiful day”.</p>
@@ -619,9 +628,10 @@ <h2><span class="section-number">6.6.1. </span>TextBlob: Processing Text in One
619
628
</div>
620
629
</div>
621
630
</div>
631
+
<p>Count words:</p>
622
632
<divclass="cell docutils container">
623
633
<divclass="cell_input docutils container">
624
-
<divclass="highlight-ipython3 notranslate"><divclass="highlight"><pre><span></span><spanclass="n">blob</span><spanclass="o">.</span><spanclass="n">word_counts</span><spanclass="c1"># Word counts</span>
<spanclass="n">text</span><spanclass="o">=</span><spanclass="s2">"Today is a beutiful day"</span>
647
+
<divclass="highlight-ipython3 notranslate"><divclass="highlight"><pre><span></span><spanclass="n">text</span><spanclass="o">=</span><spanclass="s2">"Today is a beutiful day"</span>
@@ -646,7 +656,7 @@ <h2><span class="section-number">6.6.1. </span>TextBlob: Processing Text in One
646
656
</div>
647
657
</div>
648
658
</div>
649
-
<p><aclass="reference external" href="https://textblob.readthedocs.io/en/dev/">Link to TextBlob</a>.</p>
659
+
<p><aclass="reference external" href="https://bit.ly/465oJK0">Link to TextBlob</a>.</p>
650
660
<p><aclass="reference external" href="https://towardsdatascience.com/supercharge-your-python-string-with-textblob-2d9c08a8da05?sk=b9de5981cf74c0adf8d9f2a913e3ca05">Link to my article about TextBlob</a>.</p>
Copy file name to clipboardExpand all lines: docs/Chapter6/better_outputs.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1089,7 +1089,7 @@ <h2><span class="section-number">7.5.9. </span>Camelot: PDF Table Extraction for
1089
1089
</details>
1090
1090
</div>
1091
1091
<p>With Camelot, you can extract tables from PDFs using Python and convert the data into a more structured format, such as a pandas DataFrame or a CSV file for efficient analysis, manipulation, and integration.</p>
1092
-
<p>To see how Camelot works, start with reading the PDF file named ‘foo.pdf’ and extracts all the tables present in the file.</p>
1092
+
<p>To see how Camelot works, start by reading the PDF file named ‘foo.pdf’ and extracts all the tables present in the file.</p>
0 commit comments