Skip to content

Commit 52f6217

Browse files
committed
added some more models and code
1 parent afdf959 commit 52f6217

11 files changed

+482
-15
lines changed

notebooks/N-gram Models for Language Models.ipynb

+447
Large diffs are not rendered by default.

notebooks/Python Tutorial HMM.ipynb

+34-14
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
},
503503
{
504504
"cell_type": "code",
505-
"execution_count": 1,
505+
"execution_count": 9,
506506
"metadata": {
507507
"jupyter": {
508508
"outputs_hidden": true
@@ -522,7 +522,7 @@
522522
},
523523
{
524524
"cell_type": "code",
525-
"execution_count": 2,
525+
"execution_count": 10,
526526
"metadata": {
527527
"jupyter": {
528528
"outputs_hidden": true
@@ -542,7 +542,7 @@
542542
},
543543
{
544544
"cell_type": "code",
545-
"execution_count": 3,
545+
"execution_count": 11,
546546
"metadata": {
547547
"jupyter": {
548548
"outputs_hidden": true
@@ -562,7 +562,7 @@
562562
},
563563
{
564564
"cell_type": "code",
565-
"execution_count": 4,
565+
"execution_count": 12,
566566
"metadata": {},
567567
"outputs": [
568568
{
@@ -601,7 +601,7 @@
601601
" ('.', '.')]]"
602602
]
603603
},
604-
"execution_count": 4,
604+
"execution_count": 12,
605605
"metadata": {},
606606
"output_type": "execute_result"
607607
}
@@ -619,7 +619,7 @@
619619
},
620620
{
621621
"cell_type": "code",
622-
"execution_count": 6,
622+
"execution_count": 13,
623623
"metadata": {},
624624
"outputs": [],
625625
"source": [
@@ -635,7 +635,7 @@
635635
},
636636
{
637637
"cell_type": "code",
638-
"execution_count": 7,
638+
"execution_count": 14,
639639
"metadata": {},
640640
"outputs": [
641641
{
@@ -644,7 +644,7 @@
644644
"<HiddenMarkovModelTagger 46 states and 12408 output symbols>"
645645
]
646646
},
647-
"execution_count": 7,
647+
"execution_count": 14,
648648
"metadata": {},
649649
"output_type": "execute_result"
650650
}
@@ -662,7 +662,7 @@
662662
},
663663
{
664664
"cell_type": "code",
665-
"execution_count": 8,
665+
"execution_count": 15,
666666
"metadata": {
667667
"jupyter": {
668668
"outputs_hidden": true
@@ -682,7 +682,7 @@
682682
},
683683
{
684684
"cell_type": "code",
685-
"execution_count": 9,
685+
"execution_count": 16,
686686
"metadata": {},
687687
"outputs": [
688688
{
@@ -691,7 +691,7 @@
691691
"['Today', 'is', 'a', 'good', 'day', '.']"
692692
]
693693
},
694-
"execution_count": 9,
694+
"execution_count": 16,
695695
"metadata": {},
696696
"output_type": "execute_result"
697697
}
@@ -709,9 +709,29 @@
709709
},
710710
{
711711
"cell_type": "code",
712-
"execution_count": 11,
712+
"execution_count": 17,
713713
"metadata": {},
714714
"outputs": [
715+
{
716+
"name": "stderr",
717+
"output_type": "stream",
718+
"text": [
719+
"c:\\Users\\damir\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\nltk\\tag\\hmm.py:334: RuntimeWarning: overflow encountered in cast\n",
720+
" X[i, j] = self._transitions[si].logprob(self._states[j])\n",
721+
"c:\\Users\\damir\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\nltk\\tag\\hmm.py:336: RuntimeWarning: overflow encountered in cast\n",
722+
" O[i, k] = self._output_logprob(si, self._symbols[k])\n",
723+
"c:\\Users\\damir\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\nltk\\tag\\hmm.py:332: RuntimeWarning: overflow encountered in cast\n",
724+
" P[i] = self._priors.logprob(si)\n"
725+
]
726+
},
727+
{
728+
"name": "stderr",
729+
"output_type": "stream",
730+
"text": [
731+
"c:\\Users\\damir\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\nltk\\tag\\hmm.py:364: RuntimeWarning: overflow encountered in cast\n",
732+
" O[i, k] = self._output_logprob(si, self._symbols[k])\n"
733+
]
734+
},
715735
{
716736
"data": {
717737
"text/plain": [
@@ -731,7 +751,7 @@
731751
" ('.', 'NNP')]"
732752
]
733753
},
734-
"execution_count": 11,
754+
"execution_count": 17,
735755
"metadata": {},
736756
"output_type": "execute_result"
737757
}
@@ -787,7 +807,7 @@
787807
"name": "python",
788808
"nbconvert_exporter": "python",
789809
"pygments_lexer": "ipython3",
790-
"version": "3.12.1"
810+
"version": "3.11.3"
791811
},
792812
"latex_envs": {
793813
"LaTeX_envs_menu_present": true,

notebooks/Python Tutorial PoS Tagging.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@
14861486
"name": "python",
14871487
"nbconvert_exporter": "python",
14881488
"pygments_lexer": "ipython3",
1489-
"version": "3.12.1"
1489+
"version": "3.11.3"
14901490
},
14911491
"latex_envs": {
14921492
"LaTeX_envs_menu_present": true,

notebooks/data/StanfordSentimentTreebank/README.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/SOStr.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/STree.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/datasetSentences.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/datasetSplit.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/dictionary.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/original_rt_snippets.txt

100644100755
File mode changed.

notebooks/data/StanfordSentimentTreebank/sentiment_labels.txt

100644100755
File mode changed.

0 commit comments

Comments
 (0)