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

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from FremdWB import *\n",
"\n",
"\n",
"\n",
"fwb = FremdWB(None,None)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1000\n",
"2000\n",
"creating the hkl dump of Fremd_WBDBAll\n",
"done..\n",
"Creating the hkl dump of Fremd_WBDB 1\n",
"Creating the hkl dump of Fremd_WBDB 2\n"
]
},
{
"data": {
"text/plain": [
"'done'"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fwb.create_hklDB_from_csv('HurrakiWoerterbuch_nodoubles.txt', 'None')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Creating the bag of words...\n",
"\n",
"dumping the data to hkl format..\n",
"done\n",
"Creating the bag of words...\n",
"\n",
"dumping the data to hkl format..\n",
"done\n"
]
}
],
"source": [
"fwb.load_DB_into_FASTsearch()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"sentences = [['das', 'ist', 'Abfall'],['er', 'ging', 'über', 'die', 'Straße'], ['halt', 'ab', 'hier']]\n",
"punctuations = ['.', '!', '.']"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"outsentences, punctuations = fwb.fremdEintragAppend(sentences, punctuations)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[['das', 'ist', 'Abfall'], ['Abfall', 'sind', 'Sachen', 'die', 'wir', 'nicht', 'mehr', 'brauchen'], ['er', 'ging', 'über', 'die', 'Straße'], ['halt', 'ab', 'hier']] ['.', '.', '!', '.']\n"
]
}
],
"source": [
"print(outsentences, punctuations)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"oi\n"
]
}
],
"source": [
"print('oi')\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Aktiv.txt hkldb_AllAktiv_old.hkl\r\n",
"atest1 hkldb_AllVorgangspassiv.hkl\r\n",
"atest1out hkldb_AllVorgangspassiv_old.hkl\r\n",
"Babelfish.jpg hkldb_AllZustandspassiv.hkl\r\n",
"Babelfish.png hkldb_AllZustandspassiv_old.hkl\r\n",
"bagofwordshkldb1Aktiv.pkl hkldbFremd_WB1.hkl\r\n",
"bagofwordshkldb1Vorgangspassiv.pkl hkldbFremd_WB2.hkl\r\n",
"bagofwordshkldb1Zustandspassiv.pkl hkldbFremd_WB_All.hkl\r\n",
"bagofwordshkldb2Aktiv.pkl hkldbIndi_Conju1.hkl\r\n",
"bagofwordshkldb2Vorgangspassiv.pkl hkldbIndi_Conju2.hkl\r\n",
"bagofwordshkldb2Zustandspassiv.pkl hkldbIndi_Conju_All.hkl\r\n",
"bagofwordshkldbFremd_WB1.pkl hkldbMedio1.hkl\r\n",
"bagofwordshkldbFremd_WB2.pkl hkldbMedio2.hkl\r\n",
"bagofwordshkldbIndi_Conju1.pkl hkldbMedio_All.hkl\r\n",
"bagofwordshkldbIndi_Conju2.pkl hkldbOpposites1.hkl\r\n",
"bagofwordshkldbMedio1.pkl hkldbOpposites2.hkl\r\n",
"bagofwordshkldbMedio2.pkl hkldbOpposites_All.hkl\r\n",
"bagofwordshkldbOpposites1.pkl hkldbShorts_All.hkl\r\n",
"bagofwordshkldbOpposites2.pkl hkldbShorts.hkl\r\n",
"bagofwordshkldbShorts.pkl \u001b[0m\u001b[01;34mhtml\u001b[0m/\r\n",
"bagofwords.pkl HurrakiWoerterbuch_nodoubles.txt\r\n",
"bagofwordstwolabel.pkl Indikativ_Conjunktiv.txt\r\n",
"brainBasaBuuka5.png Medio.py\r\n",
"ConjunctSolve.py mediowords.txt\r\n",
"DataBaseOneZeroshkldb1Aktiv.hkl oi.py\r\n",
"DataBaseOneZeroshkldb1Vorgangspassiv.hkl Passiv2Aktiv.py\r\n",
"DataBaseOneZeroshkldb1Zustandspassiv.hkl Prototype.ipynb\r\n",
"DataBaseOneZeroshkldb2Aktiv.hkl \u001b[01;34m__pycache__\u001b[0m/\r\n",
"DataBaseOneZeroshkldb2Vorgangspassiv.hkl requirements.txt\r\n",
"DataBaseOneZeroshkldb2Zustandspassiv.hkl SayYes.py\r\n",
"DataBaseOneZeroshkldbFremd_WB1.hkl SentGlue.py\r\n",
"DataBaseOneZeroshkldbFremd_WB2.hkl SentSeg.py\r\n",
"DataBaseOneZeroshkldbIndi_Conju1.hkl SolveShorts.py\r\n",
"DataBaseOneZeroshkldbIndi_Conju2.hkl svg.py\r\n",
"DataBaseOneZeroshkldbMedio1.hkl test1out\r\n",
"DataBaseOneZeroshkldbMedio2.hkl trainedSGD.pkl\r\n",
"DataBaseOneZeroshkldbOpposites1.hkl trainedSGD_twolabel.pkl\r\n",
"DataBaseOneZeroshkldbOpposites2.hkl untitled.txt\r\n",
"DataBaseOneZeroshkldbShorts.hkl UseConjunctiveSolve.ipynb\r\n",
"FASTsearch.py Use_ConjunctSolve.py\r\n",
"FremdWB.py Use_Fremd_WB.ipynb\r\n",
"Gegenwoerter.csv UseGenitivSolve.ipynb\r\n",
"GenitivSolve.py Use_GenitivSolve.py\r\n",
"GS_Utils.py Use_Medio.ipynb\r\n",
"hkldb1Aktiv.hkl UsePassiv2Aktiv.ipynb\r\n",
"hkldb1Aktiv_old.hkl Use_Passiv2Aktiv.py\r\n",
"hkldb1Vorgangspassiv.hkl UseSayYes.ipynb\r\n",
"hkldb1Vorgangspassiv_old.hkl Use_SayYes.py\r\n",
"hkldb1Zustandspassiv.hkl UseSentSeg.ipynb\r\n",
"hkldb1Zustandspassiv_old.hkl Use_SentSeg.py\r\n",
"hkldb2Aktiv.hkl UseSolveShorts.ipynb\r\n",
"hkldb2Aktiv_old.hkl Use_SolveShorts.py\r\n",
"hkldb2Vorgangspassiv.hkl \u001b[01;34mVerbesserungen\u001b[0m/\r\n",
"hkldb2Vorgangspassiv_old.hkl voilastate.db\r\n",
"hkldb2Zustandspassiv.hkl Vorgangspassiv.txt\r\n",
"hkldb2Zustandspassiv_old.hkl Zustandspassiv.txt\r\n",
"hkldb_AllAktiv.hkl\r\n"
]
}
],
"source": [
"ls\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}