noshot 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- noshot/__init__.py +1 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(A) Breadth First Search.ipynb +112 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(B) Depth First Search.ipynb +111 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(C) Uniform Cost Search.ipynb +134 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(D) Depth Limites Search.ipynb +115 -0
- noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(E) Iterative Deepening DFS.ipynb +123 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/2_ANOVA.csv +769 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA (Repeated Measure).ipynb +126 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA.ipynb +134 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Sample 1 Way ANOVA Test.ipynb +119 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Two Way ANOVA.ipynb +138 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/reaction_time.csv +5 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sample_data.csv +16 -0
- noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sleep_deprivation.csv +4 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/3_Linear.csv +4802 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression LAB.ipynb +113 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression New- sklearn.ipynb +118 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression.ipynb +148 -0
- noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/house_rate.csv +22 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression New- sklearn.ipynb +128 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression.ipynb +145 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/default.csv +1001 -0
- noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/hours_scores_records.csv +101 -0
- noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(A) Astar.ipynb +256 -0
- noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(B) IDAstar.ipynb +157 -0
- noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(C) SMAstar.ipynb +178 -0
- noshot/data/AIDS CN NLP/AIDS/3. Genetic Algorithm/Genetic.ipynb +95 -0
- noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Simulated Annealing.ipynb +74 -0
- noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Sudoku Simulated Annealing.ipynb +103 -0
- noshot/data/AIDS CN NLP/AIDS/5. Alpha Beta Pruning/AlphaBetaPruning.ipynb +182 -0
- noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(A) CSP House Allocation.ipynb +120 -0
- noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(B) CSP Map Coloring.ipynb +125 -0
- noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/Random Sampling.ipynb +73 -0
- noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/height_weight_bmi.csv +8389 -0
- noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test Hash Function.ipynb +141 -0
- noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test.ipynb +151 -0
- noshot/data/AIDS CN NLP/AIDS/8. Z Test/height_weight_bmi.csv +8389 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/1_heart.csv +304 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/Independent T Test.ipynb +119 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/Paired T Test.ipynb +118 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test Hash Function.ipynb +142 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test.ipynb +158 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/height_weight_bmi.csv +8389 -0
- noshot/data/AIDS CN NLP/AIDS/9. T Test/iq_test.csv +0 -0
- noshot/data/AIDS CN NLP/AIDS/Others (AllinOne)/All In One.ipynb +4581 -0
- noshot/data/AIDS CN NLP/CN/1. Chat Application/chat.java +81 -0
- noshot/data/AIDS CN NLP/CN/1. Chat Application/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/1. Chat Application/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/LAN.tcl +65 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/analysis.awk +44 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/complexdcf.tcl +229 -0
- noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/file_to_send.txt +2 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/filetransfer.java +119 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/2. File Transfer/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/rmi.java +56 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.awk +25 -0
- noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.tcl +81 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.awk +27 -0
- noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.tcl +153 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/analysis.awk +27 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/sack.tcl +86 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/vegas.tcl +86 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/analysis.awk +28 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/reno.tcl +78 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/tahoe.tcl +79 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/analysis.awk +27 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/flow.tcl +163 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/DV.tcl +111 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/LS.tcl +106 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/analysis.awk +36 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/analysis.awk +20 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/broadcast.tcl +76 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/multicast.tcl +103 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/procedure.png +0 -0
- noshot/data/AIDS CN NLP/CN/9. DHCP/DHCP.java +125 -0
- noshot/data/AIDS CN NLP/CN/9. DHCP/output.png +0 -0
- noshot/data/AIDS CN NLP/CN/9. DHCP/procedure.png +0 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/1-Prereqs.py +18 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/2-Chi2test.py +83 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/2-T-test.py +79 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/3-WSD-nb.py +53 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/4-Hindle-Rooth.py +53 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/5-HMM-Trellis.py +82 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/6-HMM-Viterbi.py +16 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/7-PCFG-parsetree.py +15 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Chi2test.ipynb +285 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Hindle-Rooth.ipynb +179 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 10 - Text generator using LSTM.ipynb +1461 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 11 NMT.ipynb +2307 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/PCFG.ipynb +134 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Prereqs.ipynb +131 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/T test.ipynb +252 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/TFIDF BOW.ipynb +171 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Trellis.ipynb +244 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/WSD.ipynb +645 -0
- noshot/data/AIDS CN NLP/NLP/NLP 1/Word2Vec.ipynb +93 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/tokenizer.ipynb +370 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/training_tokenizer.txt +6 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/exp0.ipynb +274 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/lab2.ipynb +905 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/test.txt +1 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/tokenizing.ipynb +272 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/collocation.ipynb +332 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/lab3.ipynb +549 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/nlp.txt +1 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/Lab4-NLP-Exp-2.ipynb +817 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/collocation.ipynb +332 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/NLP-Lab-5-Exp3.ipynb +231 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/word-sense-disambiguation.ipynb +507 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab06(additional-exercise)/lab6.ipynb +134 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP Exp 4.ipynb +255 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP_Exp_5.ipynb +159 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab08(PCFG)/PCFG.ipynb +282 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/Lab 9 - MLP classifier.ipynb +670 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/MLP-alternative-code.ipynb +613 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/hindle-rooth-algorithm.ipynb +74 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab10(LSTM)/Lab_10_Text_generator_using_LSTM.ipynb +480 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Machine-translation.ipynb +445 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Viterbi-PCFG.ipynb +105 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/corpora_tools.py +87 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/data_utils.py +11 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/train_translator.py +83 -0
- noshot/data/AIDS CN NLP/NLP/NLP 2/Lab12(Information-Extraction)/Information_Extraction.ipynb +201 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Backtrack-without-Verbitri.ipynb +185 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Backward-Procedure.ipynb +597 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Bag_of.ipynb +1422 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/CYK-algorithm.ipynb +1067 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Forward-Procedure.ipynb +477 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/LSTM.ipynb +1290 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 10 - Text generator using LSTM.ipynb +1461 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 11 NMT.ipynb +2307 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-4.ipynb +216 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-5.ipynb +216 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/abc.txt +6 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/ex-1-nltk.ipynb +711 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/ex-2-nlp.ipynb +267 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/exp8&9.ipynb +305 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/hind.ipynb +287 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/lab66.ipynb +752 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/leb_3.ipynb +612 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/naive_bayes_classifier.pkl +0 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_1.ipynb +3008 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_2.ipynb +3095 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nlplab-9.ipynb +295 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/nltk-ex-4.ipynb +506 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/text1.txt +48 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/text2.txt +8 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/text3.txt +48 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/translation-rnn.ipynb +812 -0
- noshot/data/AIDS CN NLP/NLP/NLP 3/word2vector.ipynb +173 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Backward Procedure Algorithm.ipynb +179 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Chi Square Collocation.ipynb +208 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Collocation (T test).ipynb +188 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Experiment 1.ipynb +437 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Forward Procedure Algorithm.ipynb +132 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Hindle Rooth.ipynb +414 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/MachineTranslation.ipynb +368 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using MLPClassifier.ipynb +86 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using Tensorflow.ipynb +112 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/PCFG Inside Probability.ipynb +451 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Text Generation using LSTM.ipynb +297 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Viterbi.ipynb +310 -0
- noshot/data/AIDS CN NLP/NLP/NLP 4/Word Sense Disambiguation.ipynb +335 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/10.Text Generation using LSTM.ipynb +316 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/11.Machine Translation.ipynb +868 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/2.T and Chi2 Test.ipynb +204 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/3.Word Sense Diambiguation.ipynb +234 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/4.Hinddle and Rooth.ipynb +128 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/5.Forward and Backward.ipynb +149 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/6.Viterbi.ipynb +111 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG Parse Tree.ipynb +134 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG using cyk.ipynb +101 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/8.Bag of words and TF-IDF.ipynb +310 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/9.Word2Vector.ipynb +78 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/NLP ALL In One.ipynb +2619 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/sample1.txt +15 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/sample2.txt +4 -0
- noshot/data/AIDS CN NLP/NLP/NLP 5/word2vec_model.bin +0 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/1. Tokenize, Tagging, NER, Parse Tree.ipynb +312 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/2. T Test and Chi2 Test.ipynb +185 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/3. Naive Bayes WSD.ipynb +199 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/4. Hinddle and Rooth.ipynb +151 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/5 and 6 FWD, BWD, Viterbi.ipynb +164 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/7. PCFG using CYK.ipynb +383 -0
- noshot/data/AIDS CN NLP/NLP/NLP 6/8. BOW and TF-IDF.ipynb +252 -0
- noshot/data/AIDS CN NLP/Ubuntu CN Lab.iso +0 -0
- noshot/main.py +47 -0
- noshot-0.1.0.dist-info/LICENSE.txt +21 -0
- noshot-0.1.0.dist-info/METADATA +65 -0
- noshot-0.1.0.dist-info/RECORD +210 -0
- noshot-0.1.0.dist-info/WHEEL +5 -0
- noshot-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,199 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"id": "26e01d66-ef30-485e-9881-6d81cfba8004",
|
6
|
+
"metadata": {},
|
7
|
+
"source": [
|
8
|
+
"# Experiment 3 :\n",
|
9
|
+
"<b>Implement decision rule-based Naïve Bayes disambiguation method to find the sense of an\r\n",
|
10
|
+
"ambiguous word with the given training set.</b>"
|
11
|
+
]
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"cell_type": "code",
|
15
|
+
"execution_count": 58,
|
16
|
+
"id": "81e97c34-fe56-467e-b7f0-a49732847a35",
|
17
|
+
"metadata": {},
|
18
|
+
"outputs": [],
|
19
|
+
"source": [
|
20
|
+
"import nltk\n",
|
21
|
+
"from nltk import word_tokenize\n",
|
22
|
+
"from nltk.corpus import stopwords\n",
|
23
|
+
"import string\n",
|
24
|
+
"import math\n",
|
25
|
+
"\n",
|
26
|
+
"#PRE-PROCESS THE SENTENCE by tokenizing and removing stopwords\n",
|
27
|
+
"def process(sentence) :\n",
|
28
|
+
" sentence = sentence.translate(str.maketrans('', '', string.punctuation))\n",
|
29
|
+
" word_tokens = word_tokenize(sentence)\n",
|
30
|
+
" stops = set(stopwords.words('english'))\n",
|
31
|
+
" return [word for word in word_tokens if word.lower() not in stops]\n",
|
32
|
+
"\n",
|
33
|
+
"with open('lab3.txt', 'r') as f :\n",
|
34
|
+
" text = f.read()\n",
|
35
|
+
"dataset = {}\n",
|
36
|
+
"for data in text.split('\\n') :\n",
|
37
|
+
" sentence, sense = data.split(':')\n",
|
38
|
+
" if sense in dataset :\n",
|
39
|
+
" dataset[sense].append(sentence)\n",
|
40
|
+
" else :\n",
|
41
|
+
" dataset[sense] = [sentence]\n",
|
42
|
+
"\n"
|
43
|
+
]
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"cell_type": "code",
|
47
|
+
"execution_count": 59,
|
48
|
+
"id": "f76f3399-bb88-4dac-896d-b971756b9954",
|
49
|
+
"metadata": {},
|
50
|
+
"outputs": [],
|
51
|
+
"source": [
|
52
|
+
"formatted_dataset = {sense : [] for sense in dataset}\n",
|
53
|
+
"for sense, sentences in dataset.items() :\n",
|
54
|
+
" for sentence in sentences :\n",
|
55
|
+
" formatted_dataset[sense] += process(sentence)"
|
56
|
+
]
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"cell_type": "code",
|
60
|
+
"execution_count": 60,
|
61
|
+
"id": "0286919d-2ef3-4b85-a3ff-9f4485976b77",
|
62
|
+
"metadata": {},
|
63
|
+
"outputs": [],
|
64
|
+
"source": [
|
65
|
+
"vocabulary = {}\n",
|
66
|
+
"for words in formatted_dataset.values() :\n",
|
67
|
+
" for word in words :\n",
|
68
|
+
" if word in vocabulary :\n",
|
69
|
+
" vocabulary[word] += 1\n",
|
70
|
+
" else :\n",
|
71
|
+
" vocabulary[word] = 1\n",
|
72
|
+
" \n",
|
73
|
+
"priors = {sense : len(dataset[sense])/len(dataset) for sense in dataset}\n",
|
74
|
+
"\n",
|
75
|
+
"conditionals = {}\n",
|
76
|
+
"for word in vocabulary :\n",
|
77
|
+
" conditionals[word] = dict()\n",
|
78
|
+
" for sense in dataset :\n",
|
79
|
+
" count_wc = formatted_dataset[sense].count(word)\n",
|
80
|
+
" count_c = len(dataset[sense])\n",
|
81
|
+
" prop = (count_wc + 1) / (count_c + len(vocabulary))\n",
|
82
|
+
" conditionals[word][sense] = prop\n",
|
83
|
+
" "
|
84
|
+
]
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"cell_type": "code",
|
88
|
+
"execution_count": 61,
|
89
|
+
"id": "4f5d059c-4fde-4655-b8d5-680132870a06",
|
90
|
+
"metadata": {},
|
91
|
+
"outputs": [],
|
92
|
+
"source": [
|
93
|
+
"def naive_bayes(sentence, priors, conditionals) :\n",
|
94
|
+
" words = process(sentence)\n",
|
95
|
+
" scores = {}\n",
|
96
|
+
" for sense in priors :\n",
|
97
|
+
" value = math.log(priors[sense])\n",
|
98
|
+
" for word in words :\n",
|
99
|
+
" if word in conditionals :\n",
|
100
|
+
" value += math.log(conditionals[word][sense])\n",
|
101
|
+
" else :\n",
|
102
|
+
" value += math.log(1e-10)\n",
|
103
|
+
" scores[sense] = value\n",
|
104
|
+
"\n",
|
105
|
+
" sense_predicted = max(scores, key = scores.get)\n",
|
106
|
+
" print(f\"{sentence}\\nSENSE : {sense_predicted}\\nSCORE : {scores[sense_predicted]}\")\n",
|
107
|
+
" \n"
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"cell_type": "code",
|
112
|
+
"execution_count": 62,
|
113
|
+
"id": "adb227ad-78bb-454d-b0a4-5764014f2ed9",
|
114
|
+
"metadata": {},
|
115
|
+
"outputs": [
|
116
|
+
{
|
117
|
+
"name": "stdout",
|
118
|
+
"output_type": "stream",
|
119
|
+
"text": [
|
120
|
+
"The light breeze was refreshing on a warm summer day.\n",
|
121
|
+
"SENSE : Light (not intense)\n",
|
122
|
+
"SCORE : -25.59000306801089\n",
|
123
|
+
"She preferred light exercise, like walking and yoga.\n",
|
124
|
+
"SENSE : Light (not intense)\n",
|
125
|
+
"SCORE : -26.113251211775438\n",
|
126
|
+
"This box is so light I can carry it with one hand.\n",
|
127
|
+
"SENSE : Light (not heavy)\n",
|
128
|
+
"SCORE : -20.61710810189748\n",
|
129
|
+
"The light from the lamp was too bright for my eyes.\n",
|
130
|
+
"SENSE : Light (brightness)\n",
|
131
|
+
"SCORE : -16.37372796051489\n",
|
132
|
+
"The light jacket was just perfect for the cool evening air.\n",
|
133
|
+
"SENSE : Light (not heavy)\n",
|
134
|
+
"SCORE : -26.40093328422722\n",
|
135
|
+
"The light color of the walls made the room look bigger.\n",
|
136
|
+
"SENSE : Light (color/appearance)\n",
|
137
|
+
"SCORE : -29.476708265454747\n",
|
138
|
+
"He gave a light chuckle when he heard the funny joke.\n",
|
139
|
+
"SENSE : Light (mood/atmosphere)\n",
|
140
|
+
"SCORE : -27.078332107819023\n",
|
141
|
+
"I ordered a light meal because I wasn’t very hungry.\n",
|
142
|
+
"SENSE : Light (not intense)\n",
|
143
|
+
"SCORE : -39.65089331873625\n",
|
144
|
+
"She wore a light dress for the summer party.\n",
|
145
|
+
"SENSE : Light (color/appearance)\n",
|
146
|
+
"SCORE : -20.61710810189748\n",
|
147
|
+
"The light from the fireworks illuminated the night sky.\n",
|
148
|
+
"SENSE : Light (brightness)\n",
|
149
|
+
"SCORE : -20.653475746068356\n"
|
150
|
+
]
|
151
|
+
}
|
152
|
+
],
|
153
|
+
"source": [
|
154
|
+
"test_data = ['The light breeze was refreshing on a warm summer day.',\n",
|
155
|
+
" 'She preferred light exercise, like walking and yoga.',\n",
|
156
|
+
" 'This box is so light I can carry it with one hand.',\n",
|
157
|
+
" 'The light from the lamp was too bright for my eyes.',\n",
|
158
|
+
" 'The light jacket was just perfect for the cool evening air.',\n",
|
159
|
+
" 'The light color of the walls made the room look bigger.',\n",
|
160
|
+
" 'He gave a light chuckle when he heard the funny joke.',\n",
|
161
|
+
" 'I ordered a light meal because I wasn’t very hungry.',\n",
|
162
|
+
" 'She wore a light dress for the summer party.',\n",
|
163
|
+
" 'The light from the fireworks illuminated the night sky.']\n",
|
164
|
+
"\n",
|
165
|
+
"for data in test_data :\n",
|
166
|
+
" naive_bayes(data, priors, conditionals)"
|
167
|
+
]
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"cell_type": "code",
|
171
|
+
"execution_count": null,
|
172
|
+
"id": "c0e4a3b9-458b-47f0-9c39-c324116f24b3",
|
173
|
+
"metadata": {},
|
174
|
+
"outputs": [],
|
175
|
+
"source": []
|
176
|
+
}
|
177
|
+
],
|
178
|
+
"metadata": {
|
179
|
+
"kernelspec": {
|
180
|
+
"display_name": "Python 3 (ipykernel)",
|
181
|
+
"language": "python",
|
182
|
+
"name": "python3"
|
183
|
+
},
|
184
|
+
"language_info": {
|
185
|
+
"codemirror_mode": {
|
186
|
+
"name": "ipython",
|
187
|
+
"version": 3
|
188
|
+
},
|
189
|
+
"file_extension": ".py",
|
190
|
+
"mimetype": "text/x-python",
|
191
|
+
"name": "python",
|
192
|
+
"nbconvert_exporter": "python",
|
193
|
+
"pygments_lexer": "ipython3",
|
194
|
+
"version": "3.11.5"
|
195
|
+
}
|
196
|
+
},
|
197
|
+
"nbformat": 4,
|
198
|
+
"nbformat_minor": 5
|
199
|
+
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"id": "8b4fc6c3-60e4-4125-b0a0-64d3b83a7a85",
|
6
|
+
"metadata": {},
|
7
|
+
"source": [
|
8
|
+
"# Experiment 4 :\n",
|
9
|
+
"<b>Implement the Hindle and Rooth algorithm for solving the attachment ambiguity problem.</b>"
|
10
|
+
]
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"cell_type": "code",
|
14
|
+
"execution_count": 68,
|
15
|
+
"id": "1a6a36a7-daba-4c9f-8067-8262c924558c",
|
16
|
+
"metadata": {},
|
17
|
+
"outputs": [],
|
18
|
+
"source": [
|
19
|
+
"import nltk\n",
|
20
|
+
"from nltk import word_tokenize, sent_tokenize, pos_tag\n",
|
21
|
+
"from nltk.corpus import stopwords\n",
|
22
|
+
"import string\n",
|
23
|
+
"import math\n",
|
24
|
+
"\n",
|
25
|
+
"with open('lab4.txt', 'r') as f :\n",
|
26
|
+
" text = f.read()\n",
|
27
|
+
"text = text.translate(str.maketrans('', '', string.punctuation))\n",
|
28
|
+
"text.replace('\\n', '')\n",
|
29
|
+
"tokens = word_tokenize(text)\n",
|
30
|
+
"tokens = [word for word in tokens if word.lower() not in ['a', 'an', 'the']]\n",
|
31
|
+
"bigrams = {}\n",
|
32
|
+
"for bigram in zip(tokens[:-1], tokens[1:]) :\n",
|
33
|
+
" bigrams[bigram] = bigrams.get(bigram,0) + 1\n",
|
34
|
+
"\n",
|
35
|
+
"frequency = {}\n",
|
36
|
+
"for word in tokens :\n",
|
37
|
+
" frequency[word] = frequency.get(word,0) + 1"
|
38
|
+
]
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"cell_type": "code",
|
42
|
+
"execution_count": 61,
|
43
|
+
"id": "fc5414ff-9e7b-43b2-bc54-a7c564ffc3d4",
|
44
|
+
"metadata": {},
|
45
|
+
"outputs": [],
|
46
|
+
"source": [
|
47
|
+
"# use this to get a list of available text files\n",
|
48
|
+
"#print(gutenberg.fileids())"
|
49
|
+
]
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"cell_type": "code",
|
53
|
+
"execution_count": 77,
|
54
|
+
"id": "2a46a595-3c13-4d70-96a3-578ed19be1bc",
|
55
|
+
"metadata": {},
|
56
|
+
"outputs": [],
|
57
|
+
"source": [
|
58
|
+
"def hindle_and_rooth(verb, prop, noun, frequency, bigrams) :\n",
|
59
|
+
" nc = frequency.get(noun, 0)\n",
|
60
|
+
" vc = frequency.get(verb, 0)\n",
|
61
|
+
" pvc = bigrams.get((verb, prop), 0)\n",
|
62
|
+
" pnc = bigrams.get((prop, noun), 0)\n",
|
63
|
+
" P_VA = pvc/vc if vc > 0 else 0\n",
|
64
|
+
" P_NA = pnc/nc if nc > 0 else 0\n",
|
65
|
+
" print(P_VA, P_NA)\n",
|
66
|
+
"\n",
|
67
|
+
" if not P_VA :\n",
|
68
|
+
" print(f\"No occuurance of {prop} with {verb}\")\n",
|
69
|
+
" print(f\"{prop} is attached with {noun} : Noun Attachment\")\n",
|
70
|
+
" return\n",
|
71
|
+
" if not P_NA :\n",
|
72
|
+
" print(f\"No occuurance of {prop} with {noun}\")\n",
|
73
|
+
" print(f\"{prop} is attached with {verb} : Verb Attachment\")\n",
|
74
|
+
" return\n",
|
75
|
+
"\n",
|
76
|
+
" try :\n",
|
77
|
+
" x = (P_VA * (1 - P_NA))/P_NA\n",
|
78
|
+
" lam = math.log2(x)\n",
|
79
|
+
" if lam > 0 :\n",
|
80
|
+
" print(f\"{prop} is attached with {verb} : Verb Attachment\")\n",
|
81
|
+
" else :\n",
|
82
|
+
" print(f\"{prop} is attached with {noun} : Noun Attachment\")\n",
|
83
|
+
" except :\n",
|
84
|
+
" print(f\"DATA INSUFFUCIENCY TO ARRIVE AT THE CONCLUSION\")\n",
|
85
|
+
" finally :\n",
|
86
|
+
" print(f\"occurance of noun in corpus : {nc}\")\n",
|
87
|
+
" print(f\"occurance of verb in corpus : {vc}\")\n",
|
88
|
+
" print(f\"occurance of verb and prop : {pvc}\")\n",
|
89
|
+
" print(f\"occurance of noun and prop : {pnc}\")\n",
|
90
|
+
" print(f\"Propability of noun attachment : {P_NA}\")\n",
|
91
|
+
" print(f\"Propability of verb attachment : {P_VA}\")\n",
|
92
|
+
" \n",
|
93
|
+
" "
|
94
|
+
]
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"cell_type": "code",
|
98
|
+
"execution_count": 78,
|
99
|
+
"id": "af0598a4-dfad-4c05-b575-3a1e1d74c5b0",
|
100
|
+
"metadata": {},
|
101
|
+
"outputs": [
|
102
|
+
{
|
103
|
+
"name": "stdout",
|
104
|
+
"output_type": "stream",
|
105
|
+
"text": [
|
106
|
+
"0.3333333333333333 1.0\n",
|
107
|
+
"DATA INSUFFUCIENCY TO ARRIVE AT THE CONCLUSION\n",
|
108
|
+
"occurance of noun in corpus : 2\n",
|
109
|
+
"occurance of verb in corpus : 6\n",
|
110
|
+
"occurance of verb and prop : 2\n",
|
111
|
+
"occurance of noun and prop : 2\n",
|
112
|
+
"Propability of noun attachment : 1.0\n",
|
113
|
+
"Propability of verb attachment : 0.3333333333333333\n"
|
114
|
+
]
|
115
|
+
}
|
116
|
+
],
|
117
|
+
"source": [
|
118
|
+
"hindle_and_rooth('sat', 'on', 'bench', frequency, bigrams)"
|
119
|
+
]
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"cell_type": "code",
|
123
|
+
"execution_count": null,
|
124
|
+
"id": "dd37851f-b4e9-4a99-9d2e-8b909db292a2",
|
125
|
+
"metadata": {},
|
126
|
+
"outputs": [],
|
127
|
+
"source": []
|
128
|
+
}
|
129
|
+
],
|
130
|
+
"metadata": {
|
131
|
+
"kernelspec": {
|
132
|
+
"display_name": "Python 3 (ipykernel)",
|
133
|
+
"language": "python",
|
134
|
+
"name": "python3"
|
135
|
+
},
|
136
|
+
"language_info": {
|
137
|
+
"codemirror_mode": {
|
138
|
+
"name": "ipython",
|
139
|
+
"version": 3
|
140
|
+
},
|
141
|
+
"file_extension": ".py",
|
142
|
+
"mimetype": "text/x-python",
|
143
|
+
"name": "python",
|
144
|
+
"nbconvert_exporter": "python",
|
145
|
+
"pygments_lexer": "ipython3",
|
146
|
+
"version": "3.11.5"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"nbformat": 4,
|
150
|
+
"nbformat_minor": 5
|
151
|
+
}
|
@@ -0,0 +1,164 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"id": "8bc54aa3-b46b-4077-983b-6420776ec43f",
|
6
|
+
"metadata": {},
|
7
|
+
"source": [
|
8
|
+
"# Experiment 5 & 6 :\n",
|
9
|
+
"\n",
|
10
|
+
"<b>Implement forward and backward procedures using Hidden Markov Model to find the\n",
|
11
|
+
"probability of a word sequence given a hidden Markov model.</b>\n",
|
12
|
+
"\n",
|
13
|
+
"<b>Implement Viterbi algorithm to find the probability of a word sequence, and the best tag\n",
|
14
|
+
"sequence using Hidden Markov Model.</b>"
|
15
|
+
]
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"cell_type": "code",
|
19
|
+
"execution_count": 31,
|
20
|
+
"id": "b340e65d-d96d-49a1-bf9b-417eb908ad8a",
|
21
|
+
"metadata": {},
|
22
|
+
"outputs": [
|
23
|
+
{
|
24
|
+
"name": "stdout",
|
25
|
+
"output_type": "stream",
|
26
|
+
"text": [
|
27
|
+
"[0.3, 0.4, 0.3]\n",
|
28
|
+
"[0.095, 0.175, 0.08000000000000002]\n",
|
29
|
+
"[0.021249999999999998, 0.06045, 0.0728]\n",
|
30
|
+
"[0.008334999999999999, 0.020425, 0.01209]\n",
|
31
|
+
"propability : 0.04085\n",
|
32
|
+
"[1, 1, 1]\n",
|
33
|
+
"[0.5, 0.5, 0.0]\n",
|
34
|
+
"[0.15, 0.12000000000000001, 0.06999999999999999]\n",
|
35
|
+
"[0.0675, 0.051500000000000004, 0.0]\n",
|
36
|
+
"propability : 0.040850000000000004\n"
|
37
|
+
]
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"source": [
|
41
|
+
"states = ['CIA1', 'CIA2', 'CIA3']\n",
|
42
|
+
"prior = [0.3, 0.4, 0.3]\n",
|
43
|
+
"outputs = ['Good', 'Moderate', 'Poor']\n",
|
44
|
+
"emission = [\n",
|
45
|
+
" [0.5, 0.3, 0.2],\n",
|
46
|
+
" [0.5, 0.4, 0.1],\n",
|
47
|
+
" [0.0, 0.7, 0.3]\n",
|
48
|
+
"]\n",
|
49
|
+
"transition = [\n",
|
50
|
+
" [0.5, 0.5, 0.0],\n",
|
51
|
+
" [0.1, 0.5, 0.4],\n",
|
52
|
+
" [0.0, 0.2, 0.8]\n",
|
53
|
+
"]\n",
|
54
|
+
"seq = \"Good Moderate Good\"\n",
|
55
|
+
"seq = [outputs.index(x) for x in seq.split()]\n",
|
56
|
+
"\n",
|
57
|
+
"def HMMF(transition, emission, prior, seq) :\n",
|
58
|
+
" alpha = prior\n",
|
59
|
+
" states = len(alpha)\n",
|
60
|
+
" for i in range(len(seq)) :\n",
|
61
|
+
" print(alpha)\n",
|
62
|
+
" new_alpha = [sum(transition[s1][s2]*emission[s1][seq[i]]*alpha[s1] for s1 in range(states)) for s2 in range(states)]\n",
|
63
|
+
" alpha = new_alpha\n",
|
64
|
+
" print(alpha)\n",
|
65
|
+
" print(f\"propability : {sum(alpha)}\")\n",
|
66
|
+
"\n",
|
67
|
+
"def HMMB(transition, emission, prior, seq) :\n",
|
68
|
+
" states = len(prior)\n",
|
69
|
+
" beta = [1 for _ in range(states)]\n",
|
70
|
+
" for i in range(len(seq)-1, -1, -1) :\n",
|
71
|
+
" print(beta)\n",
|
72
|
+
" new_beta = [sum(transition[s1][s2]*emission[s1][seq[i]]*beta[s2] for s2 in range(states)) for s1 in range(states)]\n",
|
73
|
+
" beta = new_beta\n",
|
74
|
+
" print(beta)\n",
|
75
|
+
" print(f\"propability : {sum(beta[i]*prior[i] for i in range(states))}\")\n",
|
76
|
+
"\n",
|
77
|
+
"HMMF(transition, emission, prior, seq)\n",
|
78
|
+
"HMMB(transition, emission, prior, seq)\n",
|
79
|
+
" "
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"cell_type": "code",
|
84
|
+
"execution_count": 47,
|
85
|
+
"id": "ab7154e2-7a14-438f-b6f3-dbd256d6fe9d",
|
86
|
+
"metadata": {},
|
87
|
+
"outputs": [],
|
88
|
+
"source": [
|
89
|
+
"def viterbi(transition, emission, prior, seq, states) :\n",
|
90
|
+
" delta = prior\n",
|
91
|
+
" n = len(prior)\n",
|
92
|
+
" psi = []\n",
|
93
|
+
" for i in range(len(seq)) :\n",
|
94
|
+
" print(delta)\n",
|
95
|
+
" values = [\n",
|
96
|
+
" [delta[s1]*transition[s1][s2]*emission[s1][seq[i]]for s1 in range(n)]\n",
|
97
|
+
" for s2 in range(n)]\n",
|
98
|
+
" new_delta = [max(value) for value in values]\n",
|
99
|
+
" psi.append([values[i].index(new_delta[i]) for i in range(n)])\n",
|
100
|
+
" delta = new_delta\n",
|
101
|
+
" print(delta)\n",
|
102
|
+
" bseq = []\n",
|
103
|
+
" bseq.append(delta.index(max(delta)))\n",
|
104
|
+
" for i in range(len(seq)-1, -1, -1) :\n",
|
105
|
+
" val = psi[i][bseq[-1]]\n",
|
106
|
+
" bseq.append(val)\n",
|
107
|
+
"\n",
|
108
|
+
" print([states[i] for i in bseq[::-1]])\n",
|
109
|
+
" "
|
110
|
+
]
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"cell_type": "code",
|
114
|
+
"execution_count": 48,
|
115
|
+
"id": "aefd1ab7-cf20-4874-bad5-4dc61322a899",
|
116
|
+
"metadata": {},
|
117
|
+
"outputs": [
|
118
|
+
{
|
119
|
+
"name": "stdout",
|
120
|
+
"output_type": "stream",
|
121
|
+
"text": [
|
122
|
+
"[0.3, 0.4, 0.3]\n",
|
123
|
+
"[0.075, 0.1, 0.08000000000000002]\n",
|
124
|
+
"[0.01125, 0.020000000000000004, 0.044800000000000006]\n",
|
125
|
+
"[0.0028125, 0.005000000000000001, 0.004000000000000001]\n",
|
126
|
+
"['CIA2', 'CIA2', 'CIA2', 'CIA2']\n"
|
127
|
+
]
|
128
|
+
}
|
129
|
+
],
|
130
|
+
"source": [
|
131
|
+
"viterbi(transition, emission, prior, seq, states)"
|
132
|
+
]
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"cell_type": "code",
|
136
|
+
"execution_count": null,
|
137
|
+
"id": "fd92c7ae-6d8f-42a7-a95d-5b4a4b4dda9c",
|
138
|
+
"metadata": {},
|
139
|
+
"outputs": [],
|
140
|
+
"source": []
|
141
|
+
}
|
142
|
+
],
|
143
|
+
"metadata": {
|
144
|
+
"kernelspec": {
|
145
|
+
"display_name": "Python 3 (ipykernel)",
|
146
|
+
"language": "python",
|
147
|
+
"name": "python3"
|
148
|
+
},
|
149
|
+
"language_info": {
|
150
|
+
"codemirror_mode": {
|
151
|
+
"name": "ipython",
|
152
|
+
"version": 3
|
153
|
+
},
|
154
|
+
"file_extension": ".py",
|
155
|
+
"mimetype": "text/x-python",
|
156
|
+
"name": "python",
|
157
|
+
"nbconvert_exporter": "python",
|
158
|
+
"pygments_lexer": "ipython3",
|
159
|
+
"version": "3.11.5"
|
160
|
+
}
|
161
|
+
},
|
162
|
+
"nbformat": 4,
|
163
|
+
"nbformat_minor": 5
|
164
|
+
}
|