You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
7.3 KiB

4 years ago
4 years ago
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "from FremdWB import *\n",
  10. "\n",
  11. "\n",
  12. "\n",
  13. "fwb = FremdWB(None,None)"
  14. ]
  15. },
  16. {
  17. "cell_type": "code",
  18. "execution_count": 2,
  19. "metadata": {},
  20. "outputs": [
  21. {
  22. "name": "stdout",
  23. "output_type": "stream",
  24. "text": [
  25. "1000\n",
  26. "2000\n",
  27. "creating the hkl dump of Fremd_WBDBAll\n",
  28. "done..\n",
  29. "Creating the hkl dump of Fremd_WBDB 1\n",
  30. "Creating the hkl dump of Fremd_WBDB 2\n"
  31. ]
  32. },
  33. {
  34. "data": {
  35. "text/plain": [
  36. "'done'"
  37. ]
  38. },
  39. "execution_count": 2,
  40. "metadata": {},
  41. "output_type": "execute_result"
  42. }
  43. ],
  44. "source": [
  45. "fwb.create_hklDB_from_csv('HurrakiWoerterbuch_nodoubles.txt', 'None')"
  46. ]
  47. },
  48. {
  49. "cell_type": "code",
  50. "execution_count": 3,
  51. "metadata": {},
  52. "outputs": [
  53. {
  54. "name": "stdout",
  55. "output_type": "stream",
  56. "text": [
  57. "Creating the bag of words...\n",
  58. "\n",
  59. "dumping the data to hkl format..\n",
  60. "done\n",
  61. "Creating the bag of words...\n",
  62. "\n",
  63. "dumping the data to hkl format..\n",
  64. "done\n"
  65. ]
  66. }
  67. ],
  68. "source": [
  69. "fwb.load_DB_into_FASTsearch()"
  70. ]
  71. },
  72. {
  73. "cell_type": "code",
  74. "execution_count": 4,
  75. "metadata": {},
  76. "outputs": [],
  77. "source": [
  78. "sentences = [['das', 'ist', 'Abfall'],['er', 'ging', 'über', 'die', 'Straße'], ['halt', 'ab', 'hier']]\n",
  79. "punctuations = ['.', '!', '.']"
  80. ]
  81. },
  82. {
  83. "cell_type": "code",
  84. "execution_count": 5,
  85. "metadata": {},
  86. "outputs": [],
  87. "source": [
  88. "outsentences, punctuations = fwb.fremdEintragAppend(sentences, punctuations)"
  89. ]
  90. },
  91. {
  92. "cell_type": "code",
  93. "execution_count": 6,
  94. "metadata": {},
  95. "outputs": [
  96. {
  97. "name": "stdout",
  98. "output_type": "stream",
  99. "text": [
  100. "[['das', 'ist', 'Abfall'], ['Abfall', 'sind', 'Sachen', 'die', 'wir', 'nicht', 'mehr', 'brauchen'], ['er', 'ging', 'über', 'die', 'Straße'], ['halt', 'ab', 'hier']] ['.', '.', '!', '.']\n"
  101. ]
  102. }
  103. ],
  104. "source": [
  105. "print(outsentences, punctuations)"
  106. ]
  107. },
  108. {
  109. "cell_type": "code",
  110. "execution_count": 1,
  111. "metadata": {},
  112. "outputs": [
  113. {
  114. "name": "stdout",
  115. "output_type": "stream",
  116. "text": [
  117. "oi\n"
  118. ]
  119. }
  120. ],
  121. "source": [
  122. "print('oi')\n"
  123. ]
  124. },
  125. {
  126. "cell_type": "code",
  127. "execution_count": 2,
  128. "metadata": {},
  129. "outputs": [
  130. {
  131. "name": "stdout",
  132. "output_type": "stream",
  133. "text": [
  134. "Aktiv.txt hkldb_AllAktiv_old.hkl\r\n",
  135. "atest1 hkldb_AllVorgangspassiv.hkl\r\n",
  136. "atest1out hkldb_AllVorgangspassiv_old.hkl\r\n",
  137. "Babelfish.jpg hkldb_AllZustandspassiv.hkl\r\n",
  138. "Babelfish.png hkldb_AllZustandspassiv_old.hkl\r\n",
  139. "bagofwordshkldb1Aktiv.pkl hkldbFremd_WB1.hkl\r\n",
  140. "bagofwordshkldb1Vorgangspassiv.pkl hkldbFremd_WB2.hkl\r\n",
  141. "bagofwordshkldb1Zustandspassiv.pkl hkldbFremd_WB_All.hkl\r\n",
  142. "bagofwordshkldb2Aktiv.pkl hkldbIndi_Conju1.hkl\r\n",
  143. "bagofwordshkldb2Vorgangspassiv.pkl hkldbIndi_Conju2.hkl\r\n",
  144. "bagofwordshkldb2Zustandspassiv.pkl hkldbIndi_Conju_All.hkl\r\n",
  145. "bagofwordshkldbFremd_WB1.pkl hkldbMedio1.hkl\r\n",
  146. "bagofwordshkldbFremd_WB2.pkl hkldbMedio2.hkl\r\n",
  147. "bagofwordshkldbIndi_Conju1.pkl hkldbMedio_All.hkl\r\n",
  148. "bagofwordshkldbIndi_Conju2.pkl hkldbOpposites1.hkl\r\n",
  149. "bagofwordshkldbMedio1.pkl hkldbOpposites2.hkl\r\n",
  150. "bagofwordshkldbMedio2.pkl hkldbOpposites_All.hkl\r\n",
  151. "bagofwordshkldbOpposites1.pkl hkldbShorts_All.hkl\r\n",
  152. "bagofwordshkldbOpposites2.pkl hkldbShorts.hkl\r\n",
  153. "bagofwordshkldbShorts.pkl \u001b[0m\u001b[01;34mhtml\u001b[0m/\r\n",
  154. "bagofwords.pkl HurrakiWoerterbuch_nodoubles.txt\r\n",
  155. "bagofwordstwolabel.pkl Indikativ_Conjunktiv.txt\r\n",
  156. "brainBasaBuuka5.png Medio.py\r\n",
  157. "ConjunctSolve.py mediowords.txt\r\n",
  158. "DataBaseOneZeroshkldb1Aktiv.hkl oi.py\r\n",
  159. "DataBaseOneZeroshkldb1Vorgangspassiv.hkl Passiv2Aktiv.py\r\n",
  160. "DataBaseOneZeroshkldb1Zustandspassiv.hkl Prototype.ipynb\r\n",
  161. "DataBaseOneZeroshkldb2Aktiv.hkl \u001b[01;34m__pycache__\u001b[0m/\r\n",
  162. "DataBaseOneZeroshkldb2Vorgangspassiv.hkl requirements.txt\r\n",
  163. "DataBaseOneZeroshkldb2Zustandspassiv.hkl SayYes.py\r\n",
  164. "DataBaseOneZeroshkldbFremd_WB1.hkl SentGlue.py\r\n",
  165. "DataBaseOneZeroshkldbFremd_WB2.hkl SentSeg.py\r\n",
  166. "DataBaseOneZeroshkldbIndi_Conju1.hkl SolveShorts.py\r\n",
  167. "DataBaseOneZeroshkldbIndi_Conju2.hkl svg.py\r\n",
  168. "DataBaseOneZeroshkldbMedio1.hkl test1out\r\n",
  169. "DataBaseOneZeroshkldbMedio2.hkl trainedSGD.pkl\r\n",
  170. "DataBaseOneZeroshkldbOpposites1.hkl trainedSGD_twolabel.pkl\r\n",
  171. "DataBaseOneZeroshkldbOpposites2.hkl untitled.txt\r\n",
  172. "DataBaseOneZeroshkldbShorts.hkl UseConjunctiveSolve.ipynb\r\n",
  173. "FASTsearch.py Use_ConjunctSolve.py\r\n",
  174. "FremdWB.py Use_Fremd_WB.ipynb\r\n",
  175. "Gegenwoerter.csv UseGenitivSolve.ipynb\r\n",
  176. "GenitivSolve.py Use_GenitivSolve.py\r\n",
  177. "GS_Utils.py Use_Medio.ipynb\r\n",
  178. "hkldb1Aktiv.hkl UsePassiv2Aktiv.ipynb\r\n",
  179. "hkldb1Aktiv_old.hkl Use_Passiv2Aktiv.py\r\n",
  180. "hkldb1Vorgangspassiv.hkl UseSayYes.ipynb\r\n",
  181. "hkldb1Vorgangspassiv_old.hkl Use_SayYes.py\r\n",
  182. "hkldb1Zustandspassiv.hkl UseSentSeg.ipynb\r\n",
  183. "hkldb1Zustandspassiv_old.hkl Use_SentSeg.py\r\n",
  184. "hkldb2Aktiv.hkl UseSolveShorts.ipynb\r\n",
  185. "hkldb2Aktiv_old.hkl Use_SolveShorts.py\r\n",
  186. "hkldb2Vorgangspassiv.hkl \u001b[01;34mVerbesserungen\u001b[0m/\r\n",
  187. "hkldb2Vorgangspassiv_old.hkl voilastate.db\r\n",
  188. "hkldb2Zustandspassiv.hkl Vorgangspassiv.txt\r\n",
  189. "hkldb2Zustandspassiv_old.hkl Zustandspassiv.txt\r\n",
  190. "hkldb_AllAktiv.hkl\r\n"
  191. ]
  192. }
  193. ],
  194. "source": [
  195. "ls\n"
  196. ]
  197. },
  198. {
  199. "cell_type": "code",
  200. "execution_count": null,
  201. "metadata": {},
  202. "outputs": [],
  203. "source": []
  204. }
  205. ],
  206. "metadata": {
  207. "kernelspec": {
  208. "display_name": "Python 3",
  209. "language": "python",
  210. "name": "python3"
  211. },
  212. "language_info": {
  213. "codemirror_mode": {
  214. "name": "ipython",
  215. "version": 3
  216. },
  217. "file_extension": ".py",
  218. "mimetype": "text/x-python",
  219. "name": "python",
  220. "nbconvert_exporter": "python",
  221. "pygments_lexer": "ipython3",
  222. "version": "3.5.3"
  223. }
  224. },
  225. "nbformat": 4,
  226. "nbformat_minor": 2
  227. }