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.
Files changed (210) hide show
  1. noshot/__init__.py +1 -0
  2. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(A) Breadth First Search.ipynb +112 -0
  3. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(B) Depth First Search.ipynb +111 -0
  4. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(C) Uniform Cost Search.ipynb +134 -0
  5. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(D) Depth Limites Search.ipynb +115 -0
  6. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(E) Iterative Deepening DFS.ipynb +123 -0
  7. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/2_ANOVA.csv +769 -0
  8. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA (Repeated Measure).ipynb +126 -0
  9. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA.ipynb +134 -0
  10. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Sample 1 Way ANOVA Test.ipynb +119 -0
  11. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Two Way ANOVA.ipynb +138 -0
  12. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/reaction_time.csv +5 -0
  13. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sample_data.csv +16 -0
  14. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sleep_deprivation.csv +4 -0
  15. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/3_Linear.csv +4802 -0
  16. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression LAB.ipynb +113 -0
  17. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression New- sklearn.ipynb +118 -0
  18. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression.ipynb +148 -0
  19. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/house_rate.csv +22 -0
  20. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression New- sklearn.ipynb +128 -0
  21. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression.ipynb +145 -0
  22. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/default.csv +1001 -0
  23. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/hours_scores_records.csv +101 -0
  24. noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(A) Astar.ipynb +256 -0
  25. noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(B) IDAstar.ipynb +157 -0
  26. noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(C) SMAstar.ipynb +178 -0
  27. noshot/data/AIDS CN NLP/AIDS/3. Genetic Algorithm/Genetic.ipynb +95 -0
  28. noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Simulated Annealing.ipynb +74 -0
  29. noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Sudoku Simulated Annealing.ipynb +103 -0
  30. noshot/data/AIDS CN NLP/AIDS/5. Alpha Beta Pruning/AlphaBetaPruning.ipynb +182 -0
  31. noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(A) CSP House Allocation.ipynb +120 -0
  32. noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(B) CSP Map Coloring.ipynb +125 -0
  33. noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/Random Sampling.ipynb +73 -0
  34. noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/height_weight_bmi.csv +8389 -0
  35. noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test Hash Function.ipynb +141 -0
  36. noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test.ipynb +151 -0
  37. noshot/data/AIDS CN NLP/AIDS/8. Z Test/height_weight_bmi.csv +8389 -0
  38. noshot/data/AIDS CN NLP/AIDS/9. T Test/1_heart.csv +304 -0
  39. noshot/data/AIDS CN NLP/AIDS/9. T Test/Independent T Test.ipynb +119 -0
  40. noshot/data/AIDS CN NLP/AIDS/9. T Test/Paired T Test.ipynb +118 -0
  41. noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test Hash Function.ipynb +142 -0
  42. noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test.ipynb +158 -0
  43. noshot/data/AIDS CN NLP/AIDS/9. T Test/height_weight_bmi.csv +8389 -0
  44. noshot/data/AIDS CN NLP/AIDS/9. T Test/iq_test.csv +0 -0
  45. noshot/data/AIDS CN NLP/AIDS/Others (AllinOne)/All In One.ipynb +4581 -0
  46. noshot/data/AIDS CN NLP/CN/1. Chat Application/chat.java +81 -0
  47. noshot/data/AIDS CN NLP/CN/1. Chat Application/output.png +0 -0
  48. noshot/data/AIDS CN NLP/CN/1. Chat Application/procedure.png +0 -0
  49. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/LAN.tcl +65 -0
  50. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/analysis.awk +44 -0
  51. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/output.png +0 -0
  52. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/procedure.png +0 -0
  53. noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/complexdcf.tcl +229 -0
  54. noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/output.png +0 -0
  55. noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/procedure.png +0 -0
  56. noshot/data/AIDS CN NLP/CN/2. File Transfer/file_to_send.txt +2 -0
  57. noshot/data/AIDS CN NLP/CN/2. File Transfer/filetransfer.java +119 -0
  58. noshot/data/AIDS CN NLP/CN/2. File Transfer/output.png +0 -0
  59. noshot/data/AIDS CN NLP/CN/2. File Transfer/procedure.png +0 -0
  60. noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/output.png +0 -0
  61. noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/procedure.png +0 -0
  62. noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/rmi.java +56 -0
  63. noshot/data/AIDS CN NLP/CN/4. Wired Network/output.png +0 -0
  64. noshot/data/AIDS CN NLP/CN/4. Wired Network/procedure.png +0 -0
  65. noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.awk +25 -0
  66. noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.tcl +81 -0
  67. noshot/data/AIDS CN NLP/CN/5. Wireless Network/output.png +0 -0
  68. noshot/data/AIDS CN NLP/CN/5. Wireless Network/procedure.png +0 -0
  69. noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.awk +27 -0
  70. noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.tcl +153 -0
  71. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/analysis.awk +27 -0
  72. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/output.png +0 -0
  73. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/sack.tcl +86 -0
  74. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/vegas.tcl +86 -0
  75. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/analysis.awk +28 -0
  76. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/output.png +0 -0
  77. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/reno.tcl +78 -0
  78. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/tahoe.tcl +79 -0
  79. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/analysis.awk +27 -0
  80. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/flow.tcl +163 -0
  81. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/output.png +0 -0
  82. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/procedure.png +0 -0
  83. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/DV.tcl +111 -0
  84. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/LS.tcl +106 -0
  85. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/analysis.awk +36 -0
  86. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/output.png +0 -0
  87. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/procedure.png +0 -0
  88. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/analysis.awk +20 -0
  89. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/broadcast.tcl +76 -0
  90. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/multicast.tcl +103 -0
  91. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/output.png +0 -0
  92. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/procedure.png +0 -0
  93. noshot/data/AIDS CN NLP/CN/9. DHCP/DHCP.java +125 -0
  94. noshot/data/AIDS CN NLP/CN/9. DHCP/output.png +0 -0
  95. noshot/data/AIDS CN NLP/CN/9. DHCP/procedure.png +0 -0
  96. noshot/data/AIDS CN NLP/NLP/NLP 1/1-Prereqs.py +18 -0
  97. noshot/data/AIDS CN NLP/NLP/NLP 1/2-Chi2test.py +83 -0
  98. noshot/data/AIDS CN NLP/NLP/NLP 1/2-T-test.py +79 -0
  99. noshot/data/AIDS CN NLP/NLP/NLP 1/3-WSD-nb.py +53 -0
  100. noshot/data/AIDS CN NLP/NLP/NLP 1/4-Hindle-Rooth.py +53 -0
  101. noshot/data/AIDS CN NLP/NLP/NLP 1/5-HMM-Trellis.py +82 -0
  102. noshot/data/AIDS CN NLP/NLP/NLP 1/6-HMM-Viterbi.py +16 -0
  103. noshot/data/AIDS CN NLP/NLP/NLP 1/7-PCFG-parsetree.py +15 -0
  104. noshot/data/AIDS CN NLP/NLP/NLP 1/Chi2test.ipynb +285 -0
  105. noshot/data/AIDS CN NLP/NLP/NLP 1/Hindle-Rooth.ipynb +179 -0
  106. noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 10 - Text generator using LSTM.ipynb +1461 -0
  107. noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 11 NMT.ipynb +2307 -0
  108. noshot/data/AIDS CN NLP/NLP/NLP 1/PCFG.ipynb +134 -0
  109. noshot/data/AIDS CN NLP/NLP/NLP 1/Prereqs.ipynb +131 -0
  110. noshot/data/AIDS CN NLP/NLP/NLP 1/T test.ipynb +252 -0
  111. noshot/data/AIDS CN NLP/NLP/NLP 1/TFIDF BOW.ipynb +171 -0
  112. noshot/data/AIDS CN NLP/NLP/NLP 1/Trellis.ipynb +244 -0
  113. noshot/data/AIDS CN NLP/NLP/NLP 1/WSD.ipynb +645 -0
  114. noshot/data/AIDS CN NLP/NLP/NLP 1/Word2Vec.ipynb +93 -0
  115. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/tokenizer.ipynb +370 -0
  116. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/training_tokenizer.txt +6 -0
  117. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/exp0.ipynb +274 -0
  118. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/lab2.ipynb +905 -0
  119. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/test.txt +1 -0
  120. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/tokenizing.ipynb +272 -0
  121. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/collocation.ipynb +332 -0
  122. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/lab3.ipynb +549 -0
  123. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/nlp.txt +1 -0
  124. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/Lab4-NLP-Exp-2.ipynb +817 -0
  125. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/collocation.ipynb +332 -0
  126. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/NLP-Lab-5-Exp3.ipynb +231 -0
  127. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/word-sense-disambiguation.ipynb +507 -0
  128. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab06(additional-exercise)/lab6.ipynb +134 -0
  129. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP Exp 4.ipynb +255 -0
  130. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP_Exp_5.ipynb +159 -0
  131. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab08(PCFG)/PCFG.ipynb +282 -0
  132. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/Lab 9 - MLP classifier.ipynb +670 -0
  133. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/MLP-alternative-code.ipynb +613 -0
  134. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/hindle-rooth-algorithm.ipynb +74 -0
  135. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab10(LSTM)/Lab_10_Text_generator_using_LSTM.ipynb +480 -0
  136. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Machine-translation.ipynb +445 -0
  137. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Viterbi-PCFG.ipynb +105 -0
  138. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/corpora_tools.py +87 -0
  139. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/data_utils.py +11 -0
  140. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/train_translator.py +83 -0
  141. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab12(Information-Extraction)/Information_Extraction.ipynb +201 -0
  142. noshot/data/AIDS CN NLP/NLP/NLP 3/Backtrack-without-Verbitri.ipynb +185 -0
  143. noshot/data/AIDS CN NLP/NLP/NLP 3/Backward-Procedure.ipynb +597 -0
  144. noshot/data/AIDS CN NLP/NLP/NLP 3/Bag_of.ipynb +1422 -0
  145. noshot/data/AIDS CN NLP/NLP/NLP 3/CYK-algorithm.ipynb +1067 -0
  146. noshot/data/AIDS CN NLP/NLP/NLP 3/Forward-Procedure.ipynb +477 -0
  147. noshot/data/AIDS CN NLP/NLP/NLP 3/LSTM.ipynb +1290 -0
  148. noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 10 - Text generator using LSTM.ipynb +1461 -0
  149. noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 11 NMT.ipynb +2307 -0
  150. noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-4.ipynb +216 -0
  151. noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-5.ipynb +216 -0
  152. noshot/data/AIDS CN NLP/NLP/NLP 3/abc.txt +6 -0
  153. noshot/data/AIDS CN NLP/NLP/NLP 3/ex-1-nltk.ipynb +711 -0
  154. noshot/data/AIDS CN NLP/NLP/NLP 3/ex-2-nlp.ipynb +267 -0
  155. noshot/data/AIDS CN NLP/NLP/NLP 3/exp8&9.ipynb +305 -0
  156. noshot/data/AIDS CN NLP/NLP/NLP 3/hind.ipynb +287 -0
  157. noshot/data/AIDS CN NLP/NLP/NLP 3/lab66.ipynb +752 -0
  158. noshot/data/AIDS CN NLP/NLP/NLP 3/leb_3.ipynb +612 -0
  159. noshot/data/AIDS CN NLP/NLP/NLP 3/naive_bayes_classifier.pkl +0 -0
  160. noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_1.ipynb +3008 -0
  161. noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_2.ipynb +3095 -0
  162. noshot/data/AIDS CN NLP/NLP/NLP 3/nlplab-9.ipynb +295 -0
  163. noshot/data/AIDS CN NLP/NLP/NLP 3/nltk-ex-4.ipynb +506 -0
  164. noshot/data/AIDS CN NLP/NLP/NLP 3/text1.txt +48 -0
  165. noshot/data/AIDS CN NLP/NLP/NLP 3/text2.txt +8 -0
  166. noshot/data/AIDS CN NLP/NLP/NLP 3/text3.txt +48 -0
  167. noshot/data/AIDS CN NLP/NLP/NLP 3/translation-rnn.ipynb +812 -0
  168. noshot/data/AIDS CN NLP/NLP/NLP 3/word2vector.ipynb +173 -0
  169. noshot/data/AIDS CN NLP/NLP/NLP 4/Backward Procedure Algorithm.ipynb +179 -0
  170. noshot/data/AIDS CN NLP/NLP/NLP 4/Chi Square Collocation.ipynb +208 -0
  171. noshot/data/AIDS CN NLP/NLP/NLP 4/Collocation (T test).ipynb +188 -0
  172. noshot/data/AIDS CN NLP/NLP/NLP 4/Experiment 1.ipynb +437 -0
  173. noshot/data/AIDS CN NLP/NLP/NLP 4/Forward Procedure Algorithm.ipynb +132 -0
  174. noshot/data/AIDS CN NLP/NLP/NLP 4/Hindle Rooth.ipynb +414 -0
  175. noshot/data/AIDS CN NLP/NLP/NLP 4/MachineTranslation.ipynb +368 -0
  176. noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using MLPClassifier.ipynb +86 -0
  177. noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using Tensorflow.ipynb +112 -0
  178. noshot/data/AIDS CN NLP/NLP/NLP 4/PCFG Inside Probability.ipynb +451 -0
  179. noshot/data/AIDS CN NLP/NLP/NLP 4/Text Generation using LSTM.ipynb +297 -0
  180. noshot/data/AIDS CN NLP/NLP/NLP 4/Viterbi.ipynb +310 -0
  181. noshot/data/AIDS CN NLP/NLP/NLP 4/Word Sense Disambiguation.ipynb +335 -0
  182. noshot/data/AIDS CN NLP/NLP/NLP 5/10.Text Generation using LSTM.ipynb +316 -0
  183. noshot/data/AIDS CN NLP/NLP/NLP 5/11.Machine Translation.ipynb +868 -0
  184. noshot/data/AIDS CN NLP/NLP/NLP 5/2.T and Chi2 Test.ipynb +204 -0
  185. noshot/data/AIDS CN NLP/NLP/NLP 5/3.Word Sense Diambiguation.ipynb +234 -0
  186. noshot/data/AIDS CN NLP/NLP/NLP 5/4.Hinddle and Rooth.ipynb +128 -0
  187. noshot/data/AIDS CN NLP/NLP/NLP 5/5.Forward and Backward.ipynb +149 -0
  188. noshot/data/AIDS CN NLP/NLP/NLP 5/6.Viterbi.ipynb +111 -0
  189. noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG Parse Tree.ipynb +134 -0
  190. noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG using cyk.ipynb +101 -0
  191. noshot/data/AIDS CN NLP/NLP/NLP 5/8.Bag of words and TF-IDF.ipynb +310 -0
  192. noshot/data/AIDS CN NLP/NLP/NLP 5/9.Word2Vector.ipynb +78 -0
  193. noshot/data/AIDS CN NLP/NLP/NLP 5/NLP ALL In One.ipynb +2619 -0
  194. noshot/data/AIDS CN NLP/NLP/NLP 5/sample1.txt +15 -0
  195. noshot/data/AIDS CN NLP/NLP/NLP 5/sample2.txt +4 -0
  196. noshot/data/AIDS CN NLP/NLP/NLP 5/word2vec_model.bin +0 -0
  197. noshot/data/AIDS CN NLP/NLP/NLP 6/1. Tokenize, Tagging, NER, Parse Tree.ipynb +312 -0
  198. noshot/data/AIDS CN NLP/NLP/NLP 6/2. T Test and Chi2 Test.ipynb +185 -0
  199. noshot/data/AIDS CN NLP/NLP/NLP 6/3. Naive Bayes WSD.ipynb +199 -0
  200. noshot/data/AIDS CN NLP/NLP/NLP 6/4. Hinddle and Rooth.ipynb +151 -0
  201. noshot/data/AIDS CN NLP/NLP/NLP 6/5 and 6 FWD, BWD, Viterbi.ipynb +164 -0
  202. noshot/data/AIDS CN NLP/NLP/NLP 6/7. PCFG using CYK.ipynb +383 -0
  203. noshot/data/AIDS CN NLP/NLP/NLP 6/8. BOW and TF-IDF.ipynb +252 -0
  204. noshot/data/AIDS CN NLP/Ubuntu CN Lab.iso +0 -0
  205. noshot/main.py +47 -0
  206. noshot-0.1.0.dist-info/LICENSE.txt +21 -0
  207. noshot-0.1.0.dist-info/METADATA +65 -0
  208. noshot-0.1.0.dist-info/RECORD +210 -0
  209. noshot-0.1.0.dist-info/WHEEL +5 -0
  210. noshot-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,125 @@
1
+ /*
2
+ How to run
3
+ ==========
4
+ save the file as DHCP.java (filename can be anything)
5
+ Command Prompt 1 (go to the location the file is saved)
6
+ javac *.java
7
+ java Server
8
+
9
+ Command Prompt 2 (go to the location the file is saved)
10
+ java Client
11
+ */
12
+
13
+ import java.io.*;
14
+ import java.net.*;
15
+ import java.util.*;
16
+
17
+ class Server{
18
+ static int SERVER_PORT = 4900;
19
+ static String SERVER_IP = "127.0.0.1"; // Change to your server's IP
20
+ static String IP_ALLOCATIONS_FILE = "ip_allocations.txt";
21
+ static List<String> availableIpAddresses = new ArrayList<>();
22
+ static Map<String, String> ipAllocations = new HashMap<>();
23
+
24
+ public static void main(String[] args){
25
+ loadIpAllocations(); // Load IP allocations from file (if available)
26
+ initializeIpAddresses();
27
+
28
+ try{
29
+ DatagramSocket socket = new DatagramSocket(SERVER_PORT);
30
+ while(true){
31
+ byte[] receiveData = new byte[1024];
32
+ DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
33
+ socket.receive(receivePacket);
34
+
35
+ InetAddress clientAddress = receivePacket.getAddress();
36
+ String macAddress = extractMacAddress(receiveData);
37
+ String allocatedIp = allocateIpAddress(macAddress);
38
+
39
+ byte[] responseData = createDHCPResponse(macAddress, allocatedIp);
40
+ DatagramPacket responsePacket = new DatagramPacket(responseData, responseData.length, clientAddress, receivePacket.getPort());
41
+ socket.send(responsePacket);
42
+
43
+ System.out.println("Allocated IP " + allocatedIp + " to client with MAC " + macAddress);
44
+ saveIpAllocations();
45
+ }
46
+ }catch(Exception e){
47
+ e.printStackTrace();}
48
+ }
49
+
50
+ private static void initializeIpAddresses(){
51
+ for(int i = 2; i <= 254; i++)
52
+ availableIpAddresses.add("192.168.1." + i);
53
+ }
54
+
55
+ private static String extractMacAddress(byte[] data){
56
+ return "00:11:22:33:44:55";
57
+ }
58
+
59
+ private static String allocateIpAddress(String macAddress){
60
+ if(availableIpAddresses.isEmpty())
61
+ return "No available IP addresses";
62
+ Random random = new Random();
63
+ int index = random.nextInt(availableIpAddresses.size());
64
+ String allocatedIp = availableIpAddresses.remove(index);
65
+ ipAllocations.put(macAddress, allocatedIp);
66
+ return allocatedIp;
67
+ }
68
+
69
+ private static byte[] createDHCPResponse(String macAddress, String allocatedIp) {
70
+ // Simulate creating a DHCP response with the allocated IP address
71
+ // In a real implementation, you'd construct a proper DHCP packet
72
+ return ("Allocated IP: " + allocatedIp).getBytes();
73
+ }
74
+
75
+ private static void saveIpAllocations() {
76
+ try(ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(IP_ALLOCATIONS_FILE))){
77
+ outputStream.writeObject(ipAllocations);
78
+ System.out.println("Saved IP allocations to " + IP_ALLOCATIONS_FILE);
79
+ }catch (IOException e){
80
+ e.printStackTrace();
81
+ }
82
+ }
83
+
84
+ private static void loadIpAllocations() {
85
+ try(ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(IP_ALLOCATIONS_FILE))){
86
+ ipAllocations = (HashMap<String, String>) inputStream.readObject();
87
+ System.out.println("Loaded IP allocations from " + IP_ALLOCATIONS_FILE);
88
+ }catch(FileNotFoundException e){
89
+ System.out.println(IP_ALLOCATIONS_FILE + " not found. Starting with an empty IP allocations map.");
90
+ }catch(IOException | ClassNotFoundException e){
91
+ e.printStackTrace();
92
+ }
93
+ }
94
+ }
95
+
96
+
97
+ class Client{
98
+ static int SERVER_PORT = 4900;
99
+ static String SERVER_IP = "127.0.0.1"; // Change to your server's IP
100
+
101
+ public static void main(String[] args) {
102
+ try{
103
+ DatagramSocket socket = new DatagramSocket();
104
+ InetAddress serverAddress = InetAddress.getByName(SERVER_IP);
105
+
106
+ byte[] requestData = createDHCPRequest("00:11:22:33:44:55"); // Replace with your MAC address
107
+ DatagramPacket requestPacket = new DatagramPacket(requestData, requestData.length, serverAddress, SERVER_PORT);
108
+ socket.send(requestPacket);
109
+
110
+ byte[] receiveData = new byte[1024];
111
+ DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
112
+ socket.receive(receivePacket);
113
+
114
+ String response = new String(receivePacket.getData()).trim();
115
+ System.out.println("Received DHCP Response: " + response);
116
+ }catch(Exception e){
117
+ e.printStackTrace();
118
+ }
119
+ }
120
+
121
+ private static byte[] createDHCPRequest(String macAddress) {
122
+ String request = "DHCP Request with MAC: " + macAddress;
123
+ return request.getBytes();
124
+ }
125
+ }
@@ -0,0 +1,18 @@
1
+ import nltk
2
+ import string
3
+ from nltk.tokenize import word_tokenize
4
+ from nltk.corpus import stopwords
5
+
6
+ #tokenize
7
+ sentence = "SASTRA University is a great place. It has amazing facilities!"
8
+ words=nltk.word_tokenize(sentence)
9
+ print(words)
10
+
11
+ #stopwords removal
12
+ stop_words = set(stopwords.words('english'))
13
+ words_1=[word for word in words if word not in stop_words]
14
+ print(words_1)
15
+
16
+ #punctuation removal
17
+ words_2= [word for word in words_1 if word not in string.punctuation]
18
+ print(words_2)
@@ -0,0 +1,83 @@
1
+ import nltk
2
+ from collections import Counter
3
+ from nltk.tokenize import word_tokenize
4
+ from nltk.util import bigrams
5
+ from nltk.corpus import stopwords
6
+ import string
7
+ stop_words=set(stopwords.words('english'))
8
+
9
+ def bigram_fun(bigram_count,sentence):
10
+ sentence=sentence.lower()
11
+ tokens=word_tokenize(sentence)
12
+ tokens_new=[token for token in tokens if token not in stop_words and token not in string.punctuation]
13
+ bigram_list=list(bigrams(tokens_new))
14
+ for bigram in bigram_list:
15
+ bigram_count[bigram]=bigram_count.get(bigram,0)+1
16
+
17
+ sentences = [
18
+ "I love studying data science.",
19
+ "Data science is an interesting field.",
20
+ "Science requires data for analysis.",
21
+ "Data is key in modern science.",
22
+ "Data science helps in business decision-making."
23
+ ]
24
+
25
+ bigram_count={}
26
+ for sentence in sentences:
27
+ bigram_fun(bigram_count,sentence)
28
+
29
+ word1=input("Enter the word1:")
30
+ word2=input("Enter the word2:")
31
+ # contingency matrix
32
+ C = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
33
+
34
+ # Updating contingency matrix based on word1 and word2
35
+ for units in bigram_count:
36
+ if units[0] == word1 and units[1] == word2:
37
+ C[0][0] += bigram_count[units] # word1 and word2
38
+ elif units[0] == word1 and units[1] != word2:
39
+ C[0][1] += bigram_count[units] # word1 and not word2
40
+ elif units[0] != word1 and units[1] == word2:
41
+ C[1][0] += bigram_count[units] # not word1 and word2
42
+ else:
43
+ C[1][1] += bigram_count[units] # not word1 and not word2
44
+
45
+ # total matrix
46
+ # Updating contingency matrix based on word1 and word2
47
+ C[0][2] = C[0][0] + C[0][1]
48
+ C[1][2] = C[1][0] + C[1][1]
49
+ C[2][0] = C[0][0] + C[1][0]
50
+ C[2][1] = C[0][1] + C[1][1]
51
+ tot = C[2][0] + C[2][1]
52
+
53
+ print("Contingency matrix:")
54
+ for row in C:
55
+ print(" ".join(str(val) for val in row))
56
+
57
+ # expected matrix
58
+ E = [[0, 0], [0, 0]]
59
+
60
+ # Calculate expected values based on contingency matrix and total occurrences
61
+ E[0][0] = (C[0][2] * C[2][0]) / tot # expected occurrences of word1 and word2
62
+ E[0][1] = (C[0][2] * C[2][1]) / tot # expected occurrences of word1 and not word2
63
+ E[1][0] = (C[1][2] * C[2][0]) / tot # expected occurrences of not word1 and word2
64
+ E[1][1] = (C[1][2] * C[2][1]) / tot # expected occurrences of neither word1 nor word2
65
+
66
+ print("Expected matrix:")
67
+ for row in E:
68
+ print(" ".join(f"{val:.2f}" for val in row))
69
+
70
+ obs_mat = [C[0][0], C[0][1], C[1][0], C[1][1]]
71
+ exp_mat = [E[0][0], E[0][1], E[1][0], E[1][1]]
72
+
73
+ chi2test=0
74
+ for i in range(4):
75
+ chi2test+=(obs_mat[i]-exp_mat[i])**2/exp_mat[i] #summation of O-E whole square by E
76
+
77
+ cric_val=float(input("Enter critical value:"))
78
+
79
+ if(chi2test>cric_val):
80
+ print("Reject H0")
81
+ else:
82
+ print("Accept H0")
83
+
@@ -0,0 +1,79 @@
1
+ import pandas as pd
2
+ import string
3
+ import numpy as np
4
+ from nltk.corpus import stopwords
5
+ from nltk.tokenize import word_tokenize
6
+ from nltk.util import bigrams
7
+
8
+
9
+ def unigram_fun(sentence):
10
+ sentence=sentence.lower()
11
+ tokens=word_tokenize(sentence)
12
+ token_1=[token for token in tokens if token not in string.punctuation and token not in stop_words]
13
+ return token_1
14
+
15
+ def bigram_fun(sentence):
16
+ sentence=sentence.lower()
17
+ tokens=word_tokenize(sentence)
18
+ token_1=[token for token in tokens if token not in string.punctuation and token not in stop_words]
19
+ bigram_list=list(bigrams(token_1))
20
+ return bigram_list
21
+
22
+
23
+ df=pd.read_csv('sastralines.csv')
24
+ df_new = df.iloc[:,0]
25
+ df_new_list = df_new.tolist()
26
+ stop_words=set(stopwords.words('english'))
27
+ unigrams=[unigram_fun(sentence) for sentence in df_new_list]
28
+ bigrams=[bigram_fun(sentence) for sentence in df_new_list]
29
+ print(df_new_list)
30
+
31
+ #Calculaing the length of the corpus
32
+ N=0
33
+ for line in df_new_list:
34
+ N=N+len(line)
35
+
36
+ print("The length of the corpus is:",N)
37
+
38
+
39
+ #unigram_dict
40
+ unigram_dict={}
41
+ for line in unigrams:
42
+ for word in line:
43
+ unigram_dict[word]=0
44
+ for line in unigrams:
45
+ for word in line:
46
+ unigram_dict[word]=unigram_dict[word]+1
47
+
48
+ #bigram_dict
49
+ bigram_dict={}
50
+ for line in bigrams:
51
+ for word in line:
52
+ bigram_dict[word]=0
53
+ for line in bigrams:
54
+ for word in line:
55
+ bigram_dict[word]=bigram_dict[word]+1
56
+
57
+
58
+ a=input("Enter the 1st word:")
59
+ b=input("Enter the 2nd word:")
60
+ cv=float(input("Enter the critical value:"))
61
+
62
+ #observerd mean
63
+ O=(bigram_dict[(a,b)]/N)
64
+
65
+ #Expected mean
66
+ E=((unigram_dict[a]/N)*(unigram_dict[b]/N))
67
+
68
+ #variance
69
+ variance=E
70
+
71
+ ttest = (O-E)/np.sqrt((variance/N))
72
+ print(ttest)
73
+
74
+ if(ttest<cv):
75
+ print("Accept H0")
76
+ else:
77
+ print("Reject H0")
78
+
79
+ # Credit: Raghavender
@@ -0,0 +1,53 @@
1
+ import pandas as pd
2
+ import string
3
+ import nltk
4
+ import math
5
+ from nltk.corpus import stopwords
6
+ from nltk.tokenize import word_tokenize
7
+ from collections import defaultdict
8
+
9
+ # Load data
10
+ df = pd.read_csv("Bank.csv")
11
+ train_data = df.iloc[0:93, :]
12
+ test_data = df.iloc[94:, :]
13
+ stop_words = set(stopwords.words('english'))
14
+
15
+ # Initialize counters
16
+ fin_class = riv_class = 0
17
+ fin_word_freq = defaultdict(int)
18
+ riv_word_freq = defaultdict(int)
19
+
20
+ # Preprocess and count word occurrences per class
21
+ for _, row in train_data.iterrows():
22
+ tokens = [word for word in word_tokenize(row['Sentence']) if word not in stop_words and word not in string.punctuation]
23
+
24
+ if row['Class'] == 'Financial Institution':
25
+ fin_class += 1
26
+ for word in tokens:
27
+ fin_word_freq[word] += 1
28
+ elif row['Class'] == 'River Border':
29
+ riv_class += 1
30
+ for word in tokens:
31
+ riv_word_freq[word] += 1
32
+
33
+ # Calculate prior probabilities
34
+ tot_class = fin_class + riv_class
35
+ prior_fin_class = math.log2(fin_class / tot_class)
36
+ prior_riv_class = math.log2(riv_class / tot_class)
37
+
38
+ # Vocabulary size
39
+ vocab = set(list(fin_word_freq.keys()) + list(riv_word_freq.keys()))
40
+ V = len(vocab)
41
+
42
+ # Test phase
43
+ for _, row in test_data.iterrows():
44
+ tokens = [word for word in word_tokenize(row['Sentence']) if word not in stop_words and word not in string.punctuation]
45
+
46
+ score_fin = prior_fin_class
47
+ score_riv = prior_riv_class
48
+
49
+ for word in tokens:
50
+ score_fin += math.log2(fin_word_freq[word] + 1) - math.log2(fin_class + V)
51
+ score_riv += math.log2(riv_word_freq[word] + 1) - math.log2(riv_class + V)
52
+
53
+ print("Sense is Financial Institution" if score_fin > score_riv else "Sense is River Border")
@@ -0,0 +1,53 @@
1
+ import nltk
2
+ import math
3
+ import string
4
+ from collections import defaultdict
5
+ from nltk.tokenize import word_tokenize
6
+ from nltk.corpus import stopwords
7
+ from nltk import bigrams
8
+
9
+ # Input for preposition, noun, and verb
10
+ prep = input("Enter the preposition: ").lower()
11
+ noun = input("Enter the noun: ").lower()
12
+ verb = input("Enter the verb: ").lower()
13
+
14
+ # Stopwords and punctuation setup
15
+ stop_words = set(stopwords.words('english'))
16
+
17
+ # Using defaultdict to avoid manual key checking
18
+ unigram_dict = defaultdict(int)
19
+ bigram_dict = defaultdict(int)
20
+
21
+ # List of sentences to analyze
22
+ sentences = [
23
+ "Saw the phone with me.",
24
+ "Went to the meeting yesterday.",
25
+ "Told the man to wait.",
26
+ "Gave the book to her.",
27
+ "Saw the cat with her."
28
+ ]
29
+
30
+ # Processing each sentence
31
+ for sentence in sentences:
32
+ tokens = word_tokenize(sentence)
33
+ tokens_cleaned = [token.lower() for token in tokens if token.lower() not in stop_words and token not in string.punctuation]
34
+
35
+ # Counting unigrams
36
+ for word in tokens_cleaned:
37
+ unigram_dict[word] += 1
38
+
39
+ # Counting bigrams
40
+ for bg in bigrams(tokens_cleaned):
41
+ bigram_dict[bg] += 1
42
+
43
+ # Default values for unseen bigrams/unigrams
44
+ p_noun_prep = bigram_dict[(noun, prep)] / unigram_dict[noun] if unigram_dict[noun] != 0 else 0
45
+ p_verb_prep = bigram_dict[(verb, prep)] / unigram_dict[verb] if unigram_dict[verb] != 0 else 0
46
+ p_0_n = 1 - p_noun_prep
47
+
48
+ # Ensure that the log argument is valid
49
+ if p_noun_prep > 0 and p_verb_prep * p_0_n > 0:
50
+ lammbda = math.log2((p_verb_prep * p_0_n) / p_noun_prep)
51
+ print("Attached with Verb." if lammbda >= 0 else "Attached with Noun.")
52
+ else:
53
+ print("No valid attachments.")
@@ -0,0 +1,82 @@
1
+ emission_probs = {'A': {'K': 0.4, 'T': 0.5}, 'B': {'K': 0.3, 'T': 0.3}}
2
+ alpha_a = 1
3
+ alpha_b = 0
4
+ alpha_A = [alpha_a]
5
+ alpha_B = [alpha_b]
6
+
7
+ visible_states = ['K', 'T','K'] # Update with the actual visible states
8
+
9
+ for state in visible_states:
10
+ old_alpha = alpha_a
11
+ alpha_a = (alpha_a * 0.2 * emission_probs["A"][state]) + (alpha_b * 0.6 * emission_probs["B"][state])
12
+ alpha_b = (old_alpha * 0.8 * emission_probs["A"][state]) + (alpha_b * 0.4 * emission_probs["B"][state])
13
+ alpha_A.append(alpha_a)
14
+ alpha_B.append(alpha_b)
15
+
16
+ print(alpha_A)
17
+ print(alpha_B)
18
+
19
+ # B. BACKWARD PROCEDURE
20
+ # Credit: Ahmed Baari
21
+ # Backward
22
+ emission_probs = {
23
+ 'A': {'K': 0.4, 'T': 0.5},
24
+ 'B': {'K': 0.3, 'T': 0.3}
25
+ }
26
+
27
+ b_A = 1
28
+ b_B = 1
29
+ beta_A = [b_A]
30
+ beta_B = [b_B]
31
+
32
+ for state in reversed(visible_states):
33
+ old_bA = b_A
34
+ old_bB = b_B
35
+
36
+ b_A = (
37
+ b_A * 0.2 * emission_probs["A"][state]
38
+ ) + (
39
+ b_B * 0.8 * emission_probs["A"][state]
40
+ )
41
+
42
+ b_B = (
43
+ old_bA * 0.6 * emission_probs["B"][state]
44
+ ) + (
45
+ old_bB * 0.4 * emission_probs["B"][state]
46
+ )
47
+
48
+ beta_A.append(b_A)
49
+ beta_B.append(b_B)
50
+
51
+ beta_A, beta_B
52
+
53
+
54
+ # C. BEST STATE SEQUENCE
55
+ # Credit: Ahmed Baari
56
+ gamma_A = []
57
+ gamma_B = []
58
+
59
+ # alpha * beta of A / that of A + that of B
60
+
61
+ for i in range(3):
62
+ g_A = (
63
+ alpha_A[i] * beta_A[i]
64
+ ) / (
65
+ alpha_A[i]*beta_A[i] + alpha_B[i]*beta_B[i]
66
+ )
67
+ g_B = (
68
+ alpha_B[i] * beta_B[i]
69
+ ) / (
70
+ alpha_B[i] * beta_B[i] + alpha_A[i] + beta_A[i]
71
+ )
72
+
73
+ gamma_A.append(g_A)
74
+ gamma_B.append(g_B)
75
+
76
+ for i in range(3):
77
+ print(
78
+ "A" if gamma_A[i] > gamma_B[i] else "B",
79
+ end=" "
80
+ )
81
+
82
+ #
@@ -0,0 +1,16 @@
1
+ emission_probs = {
2
+ "CP": {"cola": 0.6, "ice_tea": 0.1, "lem": 0.3},
3
+ "IP": {"cola": 0.1, "ice_tea": 0.7, "lem": 0.2}
4
+ }
5
+ alpha_a = 1
6
+ alpha_b = 0
7
+
8
+ for _ in range(3):
9
+ state = input("Enter the state:")
10
+ alpha_a = max(alpha_a * 0.7 * emission_probs["CP"][state],
11
+ alpha_b * 0.5 * emission_probs["IP"][state])
12
+
13
+ alpha_b = max(alpha_a * 0.3 * emission_probs["CP"][state],
14
+ alpha_b * 0.5 * emission_probs["IP"][state])
15
+ print(alpha_a, alpha_b)
16
+ print("CP" if alpha_a > alpha_b else "IP")
@@ -0,0 +1,15 @@
1
+ from nltk import PCFG, InsideChartParser
2
+ grammar = PCFG.fromstring("""
3
+ S -> NP VP [1.0]
4
+ NP -> NP PP [0.4] | 'he' [0.1] | 'dessert' [0.3] | 'lunch' [0.1] | 'saw' [0.1]
5
+ PP -> Pre NP [1.0]
6
+ VP -> Verb NP [0.3] | VP PP [0.7]
7
+ Pre -> 'with' [0.6] | 'in' [0.4]
8
+ Verb -> 'ate' [0.7] | 'saw' [0.3]
9
+ """)
10
+ parser = InsideChartParser(grammar)
11
+ tokens = "he saw lunch with dessert".split()
12
+ for tree in parser.parse(tokens):
13
+ tree.pretty_print()
14
+ print("PROBABILITY: ",tree.prob())
15
+ #tree.draw()