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: Chapter1/list/apply_functions_to_elements.ipynb
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -204,12 +204,12 @@
204
204
"id": "c45f86ed",
205
205
"metadata": {},
206
206
"source": [
207
-
"If you want to sort a list of tuples by the first or second item in a tuple, use the `sort` method. To specify which item to sort by, use the `key` parameter."
207
+
"To sort a list of tuples, use the `sort()` method and pass in the key parameter to indicate which item to sort by."
Copy file name to clipboardExpand all lines: Chapter5/natural_language_processing.ipynb
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -682,7 +682,7 @@
682
682
"id": "040bd4b1",
683
683
"metadata": {},
684
684
"source": [
685
-
"### Convert Number to Words\n"
685
+
"### Num2Words: Convert Number to Words\n"
686
686
]
687
687
},
688
688
{
@@ -705,7 +705,9 @@
705
705
"id": "aef1c93b",
706
706
"metadata": {},
707
707
"source": [
708
-
"If there are both number 2019 and the words 'two thousand and nineteen' in a text, they should deliver the same meaning. How can we map 2019 to 'two thousand and nineteen'? There is a Python libary to convert number to words called `num2words`."
708
+
"When data contains both a numerical value (2019) and a written expression ('two thousand and nineteen') that represent the same quantity, it's essential for them to match for accurate NLP interpretation.\n",
709
+
"\n",
710
+
"This can be achieved by using num2words, which helps convert numbers to their word equivalent."
709
711
]
710
712
},
711
713
{
@@ -871,7 +873,7 @@
871
873
"id": "56643f49",
872
874
"metadata": {},
873
875
"source": [
874
-
"[Link to num2words](https://github.com/savoirfairelinux/num2words)."
<h2><spanclass="section-number">2.3.5.5. </span>sort: Sort a List of Tuples by the First or Second Item<aclass="headerlink" href="#sort-sort-a-list-of-tuples-by-the-first-or-second-item" title="Permalink to this heading">#</a></h2>
609
-
<p>If you want to sort a list of tuples by the first or second item in a tuple, use the <codeclass="docutils literal notranslate"><spanclass="pre">sort</span></code> method. To specify which item to sort by, use the <codeclass="docutils literal notranslate"><spanclass="pre">key</span></code> parameter.</p>
610
+
<p>To sort a list of tuples, use the <codeclass="docutils literal notranslate"><spanclass="pre">sort()</span></code> method and pass in the key parameter to indicate which item to sort by.</p>
0 commit comments