From 924781e2f9dbf77d7ec839263a514fb6f58f9b08 Mon Sep 17 00:00:00 2001 From: alpcentaur Date: Tue, 27 Aug 2024 17:18:01 +0200 Subject: [PATCH] further cleaning of repo --- .../Prototyp/.Prototype-0.ipynb | 2373 ------------ .../Prototyp/.Prototype-1.ipynb | 2373 ------------ .../Prototyp/.Prototype-10.ipynb | 2313 ------------ .../Prototyp/.Prototype-11.ipynb | 2313 ------------ .../Prototyp/.Prototype-12.ipynb | 2313 ------------ .../Prototyp/.Prototype-13.ipynb | 2313 ------------ .../Prototyp/.Prototype-14.ipynb | 2313 ------------ .../Prototyp/.Prototype-2.ipynb | 2373 ------------ .../Prototyp/.Prototype-3.ipynb | 2373 ------------ .../Prototyp/.Prototype-4.ipynb | 2373 ------------ .../Prototyp/.Prototype-5.ipynb | 2313 ------------ .../Prototyp/.Prototype-6.ipynb | 2313 ------------ .../Prototyp/.Prototype-7.ipynb | 2313 ------------ .../Prototyp/.Prototype-8.ipynb | 2313 ------------ .../Prototyp/.Prototype-9.ipynb | 2313 ------------ .../Prototyp/.aye.py.swp | 0 .../.Prototype-0-checkpoint.ipynb | 2373 ------------ .../.Prototype-1-checkpoint.ipynb | 2373 ------------ .../.Prototype-10-checkpoint.ipynb | 2313 ------------ .../.Prototype-11-checkpoint.ipynb | 2313 ------------ .../.Prototype-12-checkpoint.ipynb | 2313 ------------ .../.Prototype-13-checkpoint.ipynb | 2313 ------------ .../.Prototype-14-checkpoint.ipynb | 2313 ------------ .../.Prototype-2-checkpoint.ipynb | 2373 ------------ .../.Prototype-3-checkpoint.ipynb | 2373 ------------ .../.Prototype-4-checkpoint.ipynb | 2373 ------------ .../.Prototype-5-checkpoint.ipynb | 2313 ------------ .../.Prototype-6-checkpoint.ipynb | 2313 ------------ .../.Prototype-7-checkpoint.ipynb | 2313 ------------ .../.Prototype-8-checkpoint.ipynb | 2313 ------------ .../.Prototype-9-checkpoint.ipynb | 2313 ------------ .../Prototype-checkpoint.ipynb | 2312 ------------ .../UseConjunctiveSolve-checkpoint.ipynb | 306 -- .../UseGenitivSolve-checkpoint.ipynb | 128 - .../UsePassiv2Aktiv-checkpoint.ipynb | 325 -- .../UseSayYes-checkpoint.ipynb | 251 -- .../UseSentSeg-checkpoint.ipynb | 264 -- .../UseSolveShorts-checkpoint.ipynb | 104 - .../Use_Fremd_WB-checkpoint.ipynb | 154 - .../Use_Medio-checkpoint.ipynb | 3326 ----------------- .../Prototyp/run.bash | 4 - 41 files changed, 77164 deletions(-) delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-0.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-1.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-10.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-11.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-12.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-13.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-14.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-2.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-3.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-4.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-5.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-6.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-7.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-8.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.Prototype-9.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.aye.py.swp delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-0-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-1-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-10-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-11-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-12-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-13-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-14-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-2-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-3-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-4-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-5-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-6-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-7-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-8-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-9-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Prototype-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseConjunctiveSolve-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseGenitivSolve-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UsePassiv2Aktiv-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSayYes-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSentSeg-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSolveShorts-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Fremd_WB-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Medio-checkpoint.ipynb delete mode 100644 build/rust-proto-fastapi-server/Prototyp/run.bash diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-0.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-0.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-0.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-1.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-1.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-1.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-10.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-10.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-10.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-11.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-11.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-11.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-12.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-12.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-12.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-13.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-13.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-13.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-14.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-14.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-14.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-2.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-2.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-2.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-3.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-3.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-3.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-4.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-4.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-4.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-5.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-5.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-5.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-6.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-6.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-6.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-7.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-7.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-7.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-8.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-8.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-8.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.Prototype-9.ipynb b/build/rust-proto-fastapi-server/Prototyp/.Prototype-9.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.Prototype-9.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.aye.py.swp b/build/rust-proto-fastapi-server/Prototyp/.aye.py.swp deleted file mode 100644 index e69de29..0000000 diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-0-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-0-checkpoint.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-0-checkpoint.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-1-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-1-checkpoint.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-1-checkpoint.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-10-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-10-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-10-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-11-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-11-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-11-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-12-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-12-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-12-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-13-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-13-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-13-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-14-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-14-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-14-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-2-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-2-checkpoint.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-2-checkpoint.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-3-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-3-checkpoint.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-3-checkpoint.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-4-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-4-checkpoint.ipynb deleted file mode 100644 index 37cbca2..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-4-checkpoint.ipynb +++ /dev/null @@ -1,2373 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "6a24b25b44a846aea1b396e744d222e4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2bfcacdb87c640bb93cde56d3dd5aeaf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2da49b6bc0c64b468368c639db95a1a6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "16d4e37ff391417f8844c35944a3f1af", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dd913832ab444630a3842fcf7fd8609b", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "79ed4f2f30324ca582faa59671224d92", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-5-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-5-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-5-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-6-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-6-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-6-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-7-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-7-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-7-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-8-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-8-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-8-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-9-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-9-checkpoint.ipynb deleted file mode 100644 index 50a76c0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/.Prototype-9-checkpoint.ipynb +++ /dev/null @@ -1,2313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Prototype-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Prototype-checkpoint.ipynb deleted file mode 100644 index 00f9af0..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Prototype-checkpoint.ipynb +++ /dev/null @@ -1,2312 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#from oi import *\n", - "\n", - "#oi = oi()\n", - "\n", - "#import ipyvuetify as v\n", - "\n", - "#state = False\n", - "#oi.toggle_code(state)\n", - "\n", - "#button = widgets.ToggleButton(state, description = button_descriptions[state])\n", - "\n", - "\n", - "#button.observe(oi.button_action, \"value\")\n", - "\n", - "#button.layout.height = '50px'\n", - "#button.layout.width = '100%'\n", - "#button.add_class(\"thobutton\")\n", - "\n", - "#display(button)\n", - "#button.button_style = 'danger'\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - "

Ein Klick auf das Logo - und es geht zum Code

\n", - "\n", - "\n", - " \n", - "\n", - " \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#\n", - "#

Ein Klick auf das Logo - und es geht zum Code

\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "#%%html\n", - "#" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "#from ipywidgets import widgets\n", - "#button = widgets.Button(description='Click me')\n", - "#display(button)\n", - "\n", - "#def on_button_clicked(b):\n", - "# print('button clicked')\n", - "\n", - "#button.on_click(on_button_clicked)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "\n", - "# importing the libraries\n", - "#print('importing libraries')\n", - "#from SolveShorts import *\n", - "#import SentSeg\n", - "#from SayYes import *\n", - "#from Passiv2Aktiv import *\n", - "#from GenitivSolve import *\n", - "#from ConjunctSolve import *\n", - "#from FremdWB import *\n", - "#from Medio import *\n", - "#from oi import *\n", - "#print('done')\n", - "\n", - "\n", - "# Initializing the libraries\n", - "#print('initializing the libraries')\n", - "#print('1')\n", - "#solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "#print('2')\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('3')\n", - "#sy = SayYes(None, None)\n", - "#print('4')\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#print('5')\n", - "#gs = GenitivSolve()\n", - "#print('6')\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('7')\n", - "#oi = oi()\n", - "#print('8')\n", - "#fwb = FremdWB(None,None)\n", - "#print('9')\n", - "#medi = Medio(None,None)\n", - "#print('done')\n", - "\n", - "\n", - "# loading the databases and models\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "#print('loading passiv2active Databases')\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('loading the fremdwb Databases')\n", - "#fwb.load_DB_into_FASTsearch()\n", - "#print('loading the mediodot Databases')\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "#print('done')\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "106e70dd208f4de29ae10874823d30a8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier den Text eingeben, darunter k…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "#print('done')\n", - "\n", - "#print('loading passiv2active Databases')\n", - "#from Passiv2Aktiv import *\n", - "#p2a = Passiv2Aktiv(None, None, None)\n", - "#p2a.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#print('loading genitiv solve')\n", - "#from GenitivSolve import *\n", - "#gs = GenitivSolve()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#from SayYes import *\n", - "#sy = SayYes(None, None)\n", - "#print('loading SayYes Databases')\n", - "#sy.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "#print('loading conjunctsolve')\n", - "#from ConjunctSolve import *\n", - "#cs = ConjunctSolve(None,None)\n", - "#print('done')\n", - "#print('loading conjunctivesolve Databases')\n", - "#cs.load_DB_into_FASTsearch()\n", - "#print('done')\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "#print('loading session..')\n", - "\n", - "#print('done')\n", - "import dill\n", - "dill.load_session('voilastate.db')\n", - "\n", - "#from SolveShorts import *\n", - "#print('loading SolveShorts Databases')\n", - "#solSh.load_DB_into_FASTsearch()\n", - "\n", - "#import SentSeg\n", - "#sent_seg = SentSeg.SentSeg('de')\n", - "#print('loading SentSeg Databases')\n", - "#sent_seg.LoadSentGlueSGDandGSUtils()\n", - "\n", - "#from FremdWB import *\n", - "#fwb = FremdWB(None,None)\n", - "#fwb.load_DB_into_FASTsearch()\n", - "\n", - "#from Medio import *\n", - "#medi = Medio(None,None)\n", - "#medi.load_DB_into_FASTsearch()\n", - "\n", - "\n", - "#import dill\n", - "#print('dumping the session')\n", - "#dill.dump_session('voilastate.db')\n", - "#print('done')\n", - "\n", - "#from oi import *\n", - "#oi = oi()\n", - "\n", - "import ipywidgets as widgets\n", - "\n", - "TextFeld = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFeld.layout.height = '180px'\n", - "TextFeld.layout.width = '99%'\n", - "\n", - "TextFelddouble = widgets.Textarea(placeholder='Hier den Text eingeben, darunter können die Module aktiviert(grün) oder deaktiviert(pink) werden', disabled=False)\n", - "#print(TextFeld.layout.height)\n", - "TextFelddouble.layout.height = '180px'\n", - "TextFelddouble.layout.width = '99%'\n", - "TextFelddouble.disabled=True\n", - "\n", - "display(TextFeld)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "dawidth = '100%'\n", - "daheight = '100%'\n", - "KonjunktiveErsetzen = widgets.ToggleButton(\n", - " value=False,\n", - " description='Konjunktive ersetzen',\n", - " disabled=False,\n", - ")\n", - "KonjunktiveErsetzen.layout.width = dawidth\n", - "KonjunktiveErsetzen.layout.height = '80%'\n", - "\n", - "GenitiveErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Genitiv ersetzen',\n", - " disabled=False\n", - ")\n", - "GenitiveErsetzen.layout.width = '60%'\n", - "GenitiveErsetzen.layout.height = daheight\n", - "\n", - "PassivErsetzen = widgets.ToggleButton(\n", - " value=True,\n", - " description='Passiv ersetzen',\n", - " disabled=False\n", - ")\n", - "PassivErsetzen.layout.width = '70%'\n", - "PassivErsetzen.layout.height = '90%'\n", - "\n", - "SayYes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Verneinungen ersetzen',\n", - " disabled=False\n", - ")\n", - "SayYes.layout.width = '80%'\n", - "SayYes.layout.height = '80%'\n", - "SentSeg = widgets.ToggleButton(\n", - " value=True,\n", - " description='Eine Aussage pro Satz',\n", - " disabled=False\n", - ")\n", - "SentSeg.layout.width = '60%'\n", - "SentSeg.layout.height = daheight\n", - "SolveShorts = widgets.ToggleButton(\n", - " value=False,\n", - " description='Abkürzungen erklären',\n", - " disabled=False\n", - ")\n", - "SolveShorts.layout.width = '80%'\n", - "SolveShorts.layout.height = '90%'\n", - "FremdWB = widgets.ToggleButton(\n", - " value=True,\n", - " description='FremdWoerterbuch',\n", - " disabled=False\n", - ")\n", - "FremdWB.layout.width = '90%'\n", - "FremdWB.layout.height = '90%'\n", - "\n", - "Appendixes = widgets.ToggleButton(\n", - " value=True,\n", - " description='Charakterisierung pro Satz',\n", - " disabled=False\n", - ")\n", - "Appendixes.layout.width = '120%'\n", - "Appendixes.layout.height = '80%'\n", - "\n", - "Medio = widgets.ToggleButton(\n", - " value=True,\n", - " description='Mediopunkte',\n", - " disabled=False\n", - ")\n", - "Medio.layout.width = '50%'\n", - "Medio.layout.height = '90%'\n", - "\n", - "#items1 = [SentSeg, SolveShorts]\n", - "#items2 = [SayYes, PassivErsetzen]\n", - "#items3 = [GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#items = [Textfeld, SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen]\n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "#widgets.GridBox(items, layout=widgets.Layout(grid_template_columns=\"repeat(3, 100px)\"))\n", - "\n", - "\n", - "\n", - "#widgets.HBox(items1)\n", - "#widgets.HBox(items2)\n", - "#widgets.HBox(items3)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets\n", - "out = 'Hier kommt der übersetzte Text heraus.'\n", - "\n", - "TextFeld.add_class(\"thotext\")\n", - "TextFelddouble.add_class(\"thotext\")\n", - "#display(OutTextFeld)\n", - "items = [SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen, FremdWB, Appendixes, Medio] \n", - "#display(SentSeg, SolveShorts, SayYes, PassivErsetzen, GenitiveErsetzen, KonjunktiveErsetzen)\n", - "Grid = widgets.GridBox(items, layout=widgets.Layout(justify_items=\"center\", grid_template_columns=\"repeat(3, 30%)\", grid_gap=\"4.5%\", height=\"320px\"))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "c08292c98ddf447ca1c19117241980b8", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "GridBox(children=(ToggleButton(value=True, description='Eine Aussage pro Satz', layout=Layout(height='100%', w…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "\n", - "display(HTML('
'))\n", - "display(Grid)\n", - "\n", - "\n", - "\n", - "\n", - "def function():\n", - " out = 'Wählen Sie ein Kästchen aus!'\n", - " try:\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " except:\n", - " OutTextFeld.placeholder = 'Bitte auf die Zeichensetzung achten! '\n", - " return\n", - " \n", - " check = 0\n", - " #print('insentences',insentences)\n", - " #print(punctuations)\n", - " if SayYes.value == True:\n", - " \n", - " print('ersetze Gegenteile..')\n", - " outsentences = sy.replaceOpposites(insentences)\n", - " check = 1\n", - " \n", - " \n", - " \n", - " \n", - " if Appendixes.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('generiere ist-Aussagen..')\n", - " outsentences, punctuations = sent_seg.putAppendixesIntoOwnSentences(insentences, punctuations)\n", - " \n", - " if SentSeg.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('forme zu einem Satz pro Aussage um..')\n", - " sentsegformattedsentences = []\n", - " for sentence in insentences:\n", - " \n", - " sentsegformattedsentences.append([sentence])\n", - " \n", - " #print(sentsegformattedsentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentsegformattedsentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.AndOrSolver(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after AndOrSolver', sentences, punctuations)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " sentences, punctuations = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('sentences after split haupt neben', sentences)\n", - " sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetUtteranceNumber(sentences)\n", - " #print(sentences)\n", - " sentences = sent_seg.GetQuestionOrNot(sentences)\n", - " #print(sentences)\n", - " outsentences, punctuations = sent_seg.SplitCommatas(sentences, punctuations)\n", - " #print(len(punctuations))\n", - " #print('out',outsentences)\n", - " #print('out', punctuations)\n", - " check = 1\n", - " \n", - " \n", - " if SolveShorts.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('erklaere Abkuerzungen..')\n", - " outsentences = solSh.ExplainShortsInSentencesWithBrackets(insentences)\n", - " check = 1\n", - " #print(len(punctuations)) \n", - " #print('sentences after solveshorts', outsentences)\n", - " \n", - " if PassivErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Passiv Formen..')\n", - " outsentences = p2a.replacePassivForms(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after p2a', outsentences)\n", - " \n", - " if GenitiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " #print('replacing genitiv forms with dativ..')\n", - " outsentences = gs.ReplaceGenitivWithDativ(insentences)\n", - " check = 1\n", - " #print(len(punctuations))\n", - " #print('sentences after gs', outsentences)\n", - " \n", - " if check == 1:\n", - " newinsentences = []\n", - " for sentence in outsentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " outsentences =newinsentences\n", - " if check != 1:\n", - " newinsentences = []\n", - " for sentence in insentences: \n", - " newinsentences.append([word.replace('ö','oe').replace('ü','ue').replace('ä','ae').replace('ß','ss') for word in sentence])\n", - " \n", - " insentences =newinsentences\n", - " #print()\n", - " if KonjunktiveErsetzen.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('ersetze Konjunktive..')\n", - " \n", - " outsentences = cs.replaceConjunctives(insentences)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " #print('sentences after cs', outsentences)\n", - " print(len(punctuations))\n", - " \n", - " if FremdWB.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Suche Woerterbucheintraege..')\n", - " \n", - " outsentences, punctuations = fwb.fremdEintragAppend(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " \n", - " if Medio.value == True:\n", - " if check == 1:\n", - " insentences = outsentences\n", - " print('Ersetze lange Woerter mit Mediopunkten..')\n", - " \n", - " outsentences, punctuations = medi.Medioreplace(insentences, punctuations)\n", - " #print('outsentences')\n", - " check = 1\n", - " #print('sentences after medios', outsentences)\n", - " \n", - " \n", - " #print('sentences after fwb', outsentences)\n", - " \n", - " print(len(punctuations))\n", - " \n", - " if check == 1:\n", - " out = ''\n", - " #print('just before looking if the lenght is the same')\n", - " #print(len(outsentences), len(punctuations))\n", - " if len(outsentences) == len(punctuations):\n", - " #print('the length is the same')\n", - " for n in range(len(outsentences)):\n", - " outsentence = outsentences[n]\n", - " outsentence[0] = outsentence[0].title()\n", - " out += ' '.join(outsentence) + punctuations[n] + '\\n'\n", - " \n", - " \n", - " OutTextFeld.value = out\n", - " TextFelddouble.value = TextFeld.value\n", - " display(TextFelddouble)\n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3ca86c6e7e39437eafa36439e3337b42", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Übersetzen in Leichte Sprache', style=ButtonStyle()), Output()), _do…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "#from IPython.display import Image\n", - "#i = Image(filename='Babelfish.png')\n", - "\n", - "#i.width = '60%'\n", - "#display(i)\n", - "\n", - "#print(widgets.interact_manual.opts)\n", - "\n", - "widgets.interact_manual.opts['manual_name']= 'Übersetzen in Leichte Sprache'\n", - "ola = widgets.interact_manual(function)\n", - "ola.widget.children[0].style.button_color = 'lightgreen'\n", - "ola.widget.children[0].layout.height = '60px'\n", - "ola.widget.children[0].layout.width = '99%'\n", - "\n", - "#widgets.GridBox([ola], layout=widgets.Layout(grid_template_columns=\"repeat(2, 300px)\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0d6f03c93f0147cd9f33d2a053672b0c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder='Hier kommt der übersetzte Text her…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "OutTextFeld = ipywidgets.Textarea(placeholder=out, disabled=False)\n", - "OutTextFeld.layout.height = '180px'\n", - "OutTextFeld.layout.width = '99%'\n", - "OutTextFeld.add_class(\"thetext\")\n", - "display(OutTextFeld)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "beschreibung = 'Textfeld für die verbesserte Übersetzung. Satzzeichen bitte nicht vergessen! \\nFalls ein neuer Eintrag ins Fremdwörterbuch vorgenommen werden soll, schreibe einfach unter die Verbesserungen einen Eintrag der Form: [\\'Abfall\\', \\'Abfall sind Sachen die wir nicht mehr brauchen\\'] \\nFalls ein neuer Eintrag in die Mediopunkte-Datenbank vorgenommen werden soll, bitte schreibe unter die Verbesserungen einen Eintrag der Form: [\\'Mediopunkt\\', \\'Medio·punkt\\']' \n", - "VerbeTextFeld = ipywidgets.Textarea(placeholder=beschreibung, disabled=False)\n", - "VerbeTextFeld.layout.height = '180px'\n", - "VerbeTextFeld.layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "def Absendefunction():\n", - " \n", - " \n", - "\n", - " \n", - " #print(VerbeTextFeld.value)\n", - " #print(TextFeld.value)\n", - " #print(OutTextFeld.value)\n", - " \n", - " try:\n", - "\n", - " insentences, punctuations = oi.CellInputText2SplitsentencesWithspacy(VerbeTextFeld.value)\n", - " insentences1, punctuations1 = oi.CellInputText2SplitsentencesWithspacy(TextFeld.value)\n", - " insentences2, punctuations2 = oi.CellInputText2SplitsentencesWithspacy(OutTextFeld.value)\n", - "\n", - " #print(insentences2)\n", - "\n", - " #print(insentences, punctuations)\n", - " indexDerVerbesserungen = 0\n", - " number = 0\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'r') as dok:\n", - " for number in dok:\n", - " number = int(number)\n", - " if number >= 0:\n", - " indexDerVerbesserungen = number\n", - " number += 1\n", - "\n", - " with open('Verbesserungen/indexDerVerbesserungen.txt', 'w') as dokk:\n", - " dokk.write(str(number))\n", - "\n", - "\n", - " with open('Verbesserungen/Verbesserungen' + str(number) + '.txt','w+') as doc:\n", - " for n in range(len(insentences)):\n", - " npunct = punctuations[n]\n", - " writeline = insentences[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " doc.write(writestring + '\\n')\n", - "\n", - " with open('Verbesserungen/Input' + str(number) + '.txt','w+') as docc:\n", - " for n in range(len(insentences1)):\n", - " npunct = punctuations1[n]\n", - " writeline = insentences1[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " docc.write(writestring + '\\n')\n", - " with open('Verbesserungen/Output' + str(number) + '.txt','w+') as dock:\n", - " #print(insentences2)\n", - " for n in range(len(insentences2)):\n", - " #print(len(insentences2))\n", - "\n", - " #print(punctuations2)\n", - " npunct = punctuations2[n]\n", - " writeline = insentences2[n]+ [npunct]\n", - "\n", - " writestring = ' '.join(writeline)\n", - "\n", - " dock.write(writestring + '\\n')\n", - "\n", - " VerbeTextFeld.value = ''\n", - " OutTextFeld.value = ''\n", - " VerbeTextFeld.placeholder = beschreibung\n", - " OutTextFeld.placeholder = 'Hier kommt der übersetzte Text raus.'\n", - " except:\n", - " VerbeTextFeld.placeholder = 'Es gab einen Fehler. Eventuell ist die Zeichensetzung nicht ok. \\n \\n' + beschreibung\n", - " \n", - " \n", - " return \n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "1713cde35a884104b20056d5694d168a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Textarea(value='', layout=Layout(height='180px', width='99%'), placeholder=\"Textfeld für die verbesserte Übers…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4100a2d84d34630acf974f78d316abc", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Button(description='Absenden', style=ButtonStyle()), Output()), _dom_classes=('widget-in…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "VerbeTextFeld.add_class(\"thetext3\")\n", - "display(VerbeTextFeld)\n", - "display(HTML('
'))\n", - "widgets.interact_manual.opts['manual_name']= 'Absenden'\n", - "AbsendenUndSchreiben = widgets.interact_manual(Absendefunction)\n", - "AbsendenUndSchreiben.widget.children[0].style.button_color = 'lightblue'\n", - "AbsendenUndSchreiben.widget.children[0].layout.height = '60px'\n", - "AbsendenUndSchreiben.widget.children[0].layout.width = '99%'\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "%%html\n", - "" - ] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseConjunctiveSolve-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseConjunctiveSolve-checkpoint.ipynb deleted file mode 100644 index 62e5ce1..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseConjunctiveSolve-checkpoint.ipynb +++ /dev/null @@ -1,306 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Hier wird die Bibliothek ConjunctSolve und deren Funktionen importiert. Anschließend wird die Klasse initialisiert." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from ConjunctSolve import *\n", - "\n", - "\n", - "\n", - "cs = ConjunctSolve(None,None)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1000\n", - "2000\n", - "3000\n", - "4000\n", - "5000\n", - "6000\n", - "7000\n", - "8000\n", - "9000\n", - "10000\n", - "11000\n", - "12000\n", - "13000\n", - "14000\n", - "15000\n", - "16000\n", - "17000\n", - "18000\n", - "19000\n", - "20000\n", - "21000\n", - "22000\n", - "23000\n", - "24000\n", - "25000\n", - "26000\n", - "27000\n", - "28000\n", - "29000\n", - "30000\n", - "31000\n", - "32000\n", - "33000\n", - "34000\n", - "35000\n", - "36000\n", - "37000\n", - "38000\n", - "39000\n", - "40000\n", - "41000\n", - "42000\n", - "43000\n", - "44000\n", - "45000\n", - "46000\n", - "47000\n", - "48000\n", - "49000\n", - "50000\n", - "51000\n", - "52000\n", - "53000\n", - "54000\n", - "55000\n", - "56000\n", - "57000\n", - "58000\n", - "59000\n", - "60000\n", - "61000\n", - "62000\n", - "63000\n", - "64000\n", - "65000\n", - "66000\n", - "67000\n", - "68000\n", - "69000\n", - "70000\n", - "71000\n", - "72000\n", - "73000\n", - "74000\n", - "75000\n", - "76000\n", - "77000\n", - "78000\n", - "79000\n", - "80000\n", - "81000\n", - "82000\n", - "83000\n", - "84000\n", - "85000\n", - "86000\n", - "87000\n", - "88000\n", - "89000\n", - "90000\n", - "91000\n", - "92000\n", - "93000\n", - "94000\n", - "95000\n", - "96000\n", - "97000\n", - "98000\n", - "99000\n", - "100000\n", - "101000\n", - "102000\n", - "103000\n", - "104000\n", - "105000\n", - "106000\n", - "107000\n", - "108000\n", - "109000\n", - "110000\n", - "111000\n", - "112000\n", - "113000\n", - "114000\n", - "115000\n", - "116000\n", - "117000\n", - "118000\n", - "119000\n", - "120000\n", - "121000\n", - "122000\n", - "123000\n", - "124000\n", - "125000\n", - "126000\n", - "127000\n", - "128000\n", - "creating the hkl dump of Indi_ConjuDBAll\n", - "done..\n", - "Creating the hkl dump of Indi_ConjuDB 1\n", - "Creating the hkl dump of Indi_ConjuDB 2\n" - ] - }, - { - "data": { - "text/plain": [ - "'done'" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cs.create_hklDB_from_csv('Indikativ_Conjunktiv.txt', 'None')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Nun werden die Datenbanken in den Arbeitsspeicher geladen" - ] - }, - { - "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": [ - "cs.load_DB_into_FASTsearch()" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "oi ist eine Klasse mit nur zwei Funktionen. Das Einlesen und schreiben von Textdateien. Die Funktion ReadDoc2Sent liest ein Textdokument ein. Der Output sind die Sätze in Listen geschrieben \n", - "( eine Liste in python hat die Form [ 'Das', 'ist', 'ein', 'Satz.' ] )." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "from oi import *\n", - "oi = oi()\n", - "\n", - "sentences, punctuations = oi.ReadDoc2Sent('atest1')\n", - "print(sentences, punctuations)" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Die Funktion replaceConjunctives wird nun auf die Liste aus Satzlisten angewendet. Die Variable outsentences ist auch wieder eine Liste." - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "replaceConjunctives() takes 2 positional arguments but 3 were given", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0moutsentences\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreplaceConjunctives\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msentences\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpunctuations\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m: replaceConjunctives() takes 2 positional arguments but 3 were given" - ] - } - ], - "source": [ - "outsentences = cs.replaceConjunctives(sentences, punctuations)" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Abschließend wird nun die Satzliste mit den ausgetauschten Konjunktiven in die Datei 'atest1out' geschrieben." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'atest1out')" - ] - }, - { - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseGenitivSolve-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseGenitivSolve-checkpoint.ipynb deleted file mode 100644 index 35ec170..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseGenitivSolve-checkpoint.ipynb +++ /dev/null @@ -1,128 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "from GenitivSolve import *\n", - "\n", - "from oi import *\n", - "\n", - "oi = oi()\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "loading the german spacy model..\n", - "done\n" - ] - } - ], - "source": [ - "gs = GenitivSolve()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "sentences, punctuations = oi.ReadDoc2Sent('test1')" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "processing sentence 1\n", - "processing sentence 2\n", - "processing sentence 3\n", - "processing sentence 4\n", - "processing sentence 5\n", - "processing sentence 6\n", - "processing sentence 7\n", - "processing sentence 8\n", - "processing sentence 9\n" - ] - } - ], - "source": [ - "outsentences = gs.ReplaceGenitivWithDativ(sentences)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['Hallo', 'was', 'geht', 'denn', 'hier', 'so']\n" - ] - }, - { - "ename": "TypeError", - "evalue": "Can't convert 'list' object to str implicitly", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0moi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPrintSplitSentencesToTextFile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutsentences\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpunctuations\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'test1out'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/ProjektA/LeichteSprache/code200110/Prototyp/oi.py\u001b[0m in \u001b[0;36mPrintSplitSentencesToTextFile\u001b[0;34m(self, punctuations, sentences, document)\u001b[0m\n\u001b[1;32m 60\u001b[0m \u001b[0mpunctuation\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpunctuations\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mn\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 61\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 62\u001b[0;31m \u001b[0mdoc\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwrite\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtowrite\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mpunctuation\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m'\\n'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 63\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 64\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: Can't convert 'list' object to str implicitly" - ] - } - ], - "source": [ - "oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'test1out')" - ] - }, - { - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UsePassiv2Aktiv-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UsePassiv2Aktiv-checkpoint.ipynb deleted file mode 100644 index c60439e..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UsePassiv2Aktiv-checkpoint.ipynb +++ /dev/null @@ -1,325 +0,0 @@ -{ - "cells": [ - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Alle Funktionen der Klasse Passiv2Aktiv werden importiert" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from Passiv2Aktiv import *\n", - "\n" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Nun wird die Klasse initialisiert" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "p2a = Passiv2Aktiv(None, None, None)" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Die nötigen Datenbanken werden in den Arbeitsspeicher der Session geladen. Hier zeigt sich auch die Stärke des Jupyter Notebooks, da der code einmal ausgeführt werden muss, und dann die folgenden Codezeilen neuausgeführt werden können, ohne das die Datenbanken neu eingeladen werden müssen. Das heißt, die Datenbanken können die ganze Zeit im Arbeitsspeicher ruhen, und trotzdem kann neuer Text atest1 geschrieben werden. Dieser wird dann neu eingeladen mit der oi Klasse und anschließend werden die Passivformen der neuen Sätze ausgetauscht." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "p2a.create_hklDB_from_csv('Aktiv.txt', 'None')\n", - "p2a.create_hklDB_from_csv('Vorgangspassiv.txt', 'None')\n", - "p2a.create_hklDB_from_csv('Zustandspassiv.txt', 'None')" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/alpcentaur/ProjektA/LeichteSprache/code200110/SentSeg/venv/lib/python3.5/site-packages/sklearn/base.py:251: UserWarning: Trying to unpickle estimator CountVectorizer from version 0.22.2 when using version 0.20.0. This might lead to breaking code or invalid results. Use at your own risk.\n", - " UserWarning)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "loading spacy..\n", - "done\n", - "loading vectorizer..\n", - "done\n", - "loading the SGD model..\n", - "done\n", - "loading spacy..\n", - "done\n" - ] - } - ], - "source": [ - "p2a.load_DB_into_FASTsearch()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "from oi import *\n", - "oi = oi()\n", - "\n", - "sentences, punctuations = oi.ReadDoc2Sent('atest1')" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "verbs of sentence string gehe 4\n", - "1\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string habe verdammt 13\n", - "2\n", - "[39974, 1.0]\n", - "[39913, 1.0]\n", - "[['platztest rein 14'], ['2. Person Singular Präteritum reinplatzen']]\n", - "[['reinplatztest 13'], ['2. Person Singular Präteritum reinplatzen']]\n", - "[['waren verhext 13'], ['3. Person Plural Präteritum verhexen']]\n", - "verbs of sentence string gibt 4\n", - "1\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string wird 4\n", - "1\n", - "[40069, 1.0]\n", - "[40069, 1.0]\n", - "[['wird verheddert haben 21'], ['3. Person Singular Futur II verheddern']]\n", - "[['wird verheddert worden sein 27'], ['3. Person Singular Futur II verheddern']]\n", - "[['wird verheddert gewesen sein 28'], ['3. Person Singular Futur II verheddern']]\n", - "verbs of sentence string gingen regnete 14\n", - "2\n", - "[39913, 1.0]\n", - "[40045, 1.0]\n", - "[['verhexten 9'], ['3. Person Plural Präteritum verhexen']]\n", - "[['wurden verhext 14'], ['3. Person Plural Präteritum verhexen']]\n", - "[['war verheddert 14'], ['3. Person Singular Präteritum verheddern']]\n", - "verbs of sentence string war angemalt funktionierte 26\n", - "3\n", - "[37394, 2.0]\n", - "[38744, 2.0]\n", - "[['hatte dahingeschleppt 21'], ['3. Person Singular Plusquamperfekt dahinschleppen']]\n", - "[['war dahingeschleppt worden 26'], ['3. Person Singular Plusquamperfekt dahinschleppen']]\n", - "[['war inventarisiert gewesen 26'], ['3. Person Singular Plusquamperfekt inventarisieren']]\n", - "verbs of sentence string wurde geliebt 13\n", - "2\n", - "[2, 3.0]\n", - "[39975, 1.0]\n", - "[['liebte 6'], ['3. Person Singular Präteritum lieben']]\n", - "[['wurde geliebt 13'], ['3. Person Singular Präteritum lieben']]\n", - "[['wurde reingeplatzt 18'], ['3. Person Singular Präteritum reinplatzen']]\n", - "subjectofsentence ['Er']\n", - "there is a subjecter 1\n", - "get the tuples and triples to check..\n", - "done\n", - "['ihn', 'liebte', 'jemand']\n", - "genrating the permutations\n", - "done\n", - "classifying the probability for right grammar in the filtered permutations..\n", - "jemand liebte ihn\n", - "done\n", - "verbs of sentence string habe 4\n", - "1\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string war 3\n", - "1\n", - "[40057, 1.0]\n", - "[40057, 1.0]\n", - "[['hatte verheddert 16'], ['3. Person Singular Plusquamperfekt verheddern']]\n", - "[['war verheddert worden 21'], ['3. Person Singular Plusquamperfekt verheddern']]\n", - "[['war verheddert gewesen 22'], ['3. Person Singular Plusquamperfekt verheddern']]\n", - "verbs of sentence string 0\n", - "0\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string ist 3\n", - "1\n", - "[40051, 1.0]\n", - "[40051, 1.0]\n", - "[['hat verheddert 14'], ['3. Person Singular Perfekt verheddern']]\n", - "[['ist verheddert worden 21'], ['3. Person Singular Perfekt verheddern']]\n", - "[['ist verheddert gewesen 22'], ['3. Person Singular Perfekt verheddern']]\n", - "verbs of sentence string 0\n", - "0\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string 0\n", - "0\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string ginge 5\n", - "1\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n", - "verbs of sentence string lieben 6\n", - "1\n", - "[40072, 0.0]\n", - "[40072, 0.0]\n", - "[['werden verheddert haben 23'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert worden sein 29'], ['3. Person Plural Futur II verheddern']]\n", - "[['werden verheddert gewesen sein 30'], ['3. Person Plural Futur II verheddern']]\n" - ] - } - ], - "source": [ - "outsentences = p2a.replacePassivForms(sentences)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[['Hallo', 'was', 'gehe', 'denn', 'hier', 'so'], ['Ich', 'habe', 'echt', 'keine', 'Ahnung', 'verdammt'], ['I.', 'd.', 'R.', 'gibt', 'es', 'keine', 'Abschiebungen'], ['Ende', 'd.', 'J.', 'wird', 'alles', 'problematisch'], ['Sie', 'gingen', 'nach', 'Hause,', 'weil', 'es', 'in', 'Strömen', 'regnete'], ['Heute', 'war', 'die', 'Straße', 'blau', 'angemalt,', 'damit', 'der', 'Marathon', 'funktionierte'], ['ihn', 'liebte', 'jemand'], ['Er', 'habe', 'es', 'sehr', 'schwer'], ['Es', 'war', 'die', 'Hose', 'des', 'Gauners'], ['Bliblablub'], ['Sie', 'ist', 'nicht', 'schön', 'heute'], ['Oleoleole'], ['Mannoman'], ['Er', 'ginge', 'nicht', 'schnell'], ['Die', 'Hühner', 'lieben', 'sich', 'nicht']]\n" - ] - } - ], - "source": [ - "print(outsentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n" - ] - }, - { - "data": { - "text/plain": [ - "'OK'" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - " oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'atest1out')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSayYes-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSayYes-checkpoint.ipynb deleted file mode 100644 index 1adaba1..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSayYes-checkpoint.ipynb +++ /dev/null @@ -1,251 +0,0 @@ -{ - "cells": [ - { - "cell_type": "raw", - "metadata": {}, - "source": [ - " Zuerst wird die Klasse SayYes importiert und initialisiert" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "loading the german spacy model..\n", - "done\n", - "loading the stemmer..\n", - "done\n" - ] - } - ], - "source": [ - "from SayYes import *\n", - "\n", - "sy = SayYes(None, None)" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Nun werden die Datenbanken in den Arbeitsspeicher geladen." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Loading the hklDB1..\n", - "done\n", - "Loading the hklDB2\n", - "done\n", - "loading hkldbOpposites 1..\n", - "done\n", - "loading hkldbOpposites 2..\n", - "done\n", - "loading the bow model 1\n", - "done\n", - "loading the bow model 2\n", - "done\n" - ] - } - ], - "source": [ - "\n", - "\n", - "#sy.create_hklDB_from_csv('Gegenwoerter.csv')\n", - "\n", - "#print(sy.hkldbOpposites1)\n", - "\n", - "sy.load_DB_into_FASTsearch()\n" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Hier wird die Datei atest1 eingeladen, Output der Funktion ReadDoc2Sent sind die Sätze in Listen. " - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "from oi import *\n", - "oi = oi()\n", - "sentences, punctuations = oi.ReadDoc2Sent('atest1')" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Hier werden nun die Sätze nach den Wörtern 'nicht' oder 'kein/keine' durchsucht, diesess dann entfernt und das entsprechende Wort durch dessen Gegenteil ersetzt." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "wenigstens etwas\n", - "oloa\n", - "processing sentence 1\n", - "ola\n", - "oloa\n", - "processing sentence 2\n", - "ola\n", - "thetheone\n", - "oloa\n", - "processing sentence 3\n", - "ola\n", - "thetheone\n", - "oloa\n", - "processing sentence 4\n", - "ola\n", - "oloa\n", - "processing sentence 5\n", - "ola\n", - "oloa\n", - "processing sentence 6\n", - "ola\n", - "oloa\n", - "processing sentence 7\n", - "ola\n", - "oloa\n", - "processing sentence 8\n", - "ola\n", - "oloa\n", - "processing sentence 9\n", - "ola\n", - "oloa\n", - "processing sentence 10\n", - "ola\n", - "thetheone\n", - "theone\n", - "1\n", - "2\n", - "2\n", - "oloa\n", - "processing sentence 11\n", - "ola\n", - "oloa\n", - "processing sentence 12\n", - "ola\n", - "oloa\n", - "processing sentence 13\n", - "ola\n", - "thetheone\n", - "theone\n", - "1\n", - "2\n", - "2\n", - "oloa\n", - "processing sentence 14\n", - "ola\n", - "thetheone\n", - "theone\n", - "1\n", - "4\n", - "2\n" - ] - } - ], - "source": [ - "outsentences = sy.replaceOpposites(sentences)" - ] - }, - { - "cell_type": "raw", - "metadata": {}, - "source": [ - "Das Ergebnis der vorherigen Funktion wird in der folgenden Zeile in das Dokument atest1out geschrieben." - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n" - ] - }, - { - "data": { - "text/plain": [ - "'OK'" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "\n", - "oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'atest1out')" - ] - }, - { - "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": 4 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSentSeg-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSentSeg-checkpoint.ipynb deleted file mode 100644 index 662f242..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSentSeg-checkpoint.ipynb +++ /dev/null @@ -1,264 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import SentSeg\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[['Hallo', 'was', 'gehe', 'denn', 'hier', 'so.']], [['Ich', 'habe', 'echt', 'keine', 'Ahnung', 'verdammt.']], [['I.', 'd.', 'R.', 'gibt', 'es', 'keine', 'Abschiebungen.']], [['Ende', 'd.', 'J.', 'wird', 'alles', 'problematisch.']], [['Sie', 'gingen', 'nach', 'Hause,', 'weil', 'es', 'in', 'Strömen', 'regnete.']], [['Heute', 'war', 'die', 'Straße', 'blau', 'angemalt,', 'damit', 'der', 'Marathon', 'funktionierte.']], [['Er', 'habe', 'es', 'sehr', 'schwer.']], [['Es', 'war', 'die', 'Hose', 'des', 'Gauners.']], [['Bliblablub.']], [['Sie', 'ist', 'nicht', 'schön', 'heute.']], [['Oleoleole.']], [['Mannoman.']], [['Er', 'ginge', 'nicht', 'schnell.']], [['Die', 'Hühner', 'lieben', 'sich', 'nicht.']]]\n" - ] - } - ], - "source": [ - "sent_seg = SentSeg.SentSeg('de')\n", - "\n", - " \n", - "sentences = sent_seg.ReadDoc2Sent('atest1')\n", - "print(sentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "initializing the gs utils..\n", - "loading spacy..\n", - "done\n", - "done\n", - "loading the Stochastic Gradient models..\n", - "done\n", - "initializing the SGM..\n", - "loading vectorizer..\n", - "done\n", - "loading the SGD model..\n", - "done\n", - "loading spacy..\n", - "done\n", - "done\n", - "importing spacy..\n", - "done\n", - "importing german model..\n", - "done\n" - ] - }, - { - "data": { - "text/plain": [ - "'done'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "sent_seg.LoadSentGlueSGDandGSUtils()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "creating array of comma or not..\n", - "done\n" - ] - } - ], - "source": [ - "sentences = sent_seg.CommaSentenceOrNot(sentences)\n", - "print(sentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "sentences = sent_seg.GetUtteranceNumber(sentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "sentences = sent_seg.GetQuestionOrNot(sentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "importing spacy..\n", - "done\n" - ] - } - ], - "source": [ - "sentences1 = sent_seg.SplitSentencesIntoHauptNebenTuple(sentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['es', 'regnete', 'in Strömen']\n", - "['deswegen', 'Sie', 'gingen', 'nach Hause']\n", - "['Heute', 'war', 'blau', 'angemalt', 'die Straße']\n", - "100\n", - "['dann', 'funktionierte', 'der Marathon']\n" - ] - } - ], - "source": [ - "outsentences = sent_seg.SplitCommatas(sentences1)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[['Hallo', 'was', 'gehe', 'denn', 'hier', 'so'], ['Ich', 'habe', 'echt', 'keine', 'Ahnung', 'verdammt'], ['I.', 'd.', 'R.', 'gibt', 'es', 'keine', 'Abschiebungen'], ['Ende', 'd.', 'J.', 'wird', 'alles', 'problematisch'], ['in', 'Strömen', 'regnete', 'e'], ['deswegen', 'gingen', 'Sie', 'nach', 'Haus'], ['angemalt', 'war', 'die', 'Straße', 'blau', 'Heut'], ['dann', 'der', 'Marathon', 'funktioniert'], ['Er', 'habe', 'es', 'sehr', 'schwer'], ['Es', 'war', 'die', 'Hose', 'des', 'Gauners'], ['Bliblablub'], ['Oleoleole'], ['Mannoman'], ['Er', 'ginge', 'nicht', 'schnell'], ['Der', 'Satz', 'davor', 'funktioniert', 'nicht', 'im', 'Modul', 'Konjunktsolve'], ['Weil', 'er', 'zu', 'viele', 'verben', 'hat']]\n" - ] - } - ], - "source": [ - "print(outsentences)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [], - "source": [ - "punctuations = []\n", - "for n in range(len(outsentences)):\n", - " punctuations.append('.')\n", - " if outsentences[n][-1][-1] == '.':\n", - " outsentences[n][-1] = outsentences[n][-1][:-1]" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [], - "source": [ - "from oi import *\n", - "oi = oi()" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n", - ".\n" - ] - }, - { - "data": { - "text/plain": [ - "'OK'" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'test1out')\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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSolveShorts-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSolveShorts-checkpoint.ipynb deleted file mode 100644 index e290136..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/UseSolveShorts-checkpoint.ipynb +++ /dev/null @@ -1,104 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "from SolveShorts import *\n", - "\n", - "from oi import *\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "solSh = SolveShorts('hkldbShorts.hkl', 'hkldbShorts_All.hkl')\n", - "\n", - "#solSh.create_hklDB_from_csv('Abkuerzungen.txt')\n", - "\n", - "oi = oi()\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "sentences, punctuations = oi.ReadDoc2Sent('test1')" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "loading hkldbShorts ..\n", - "done\n", - "loading the bow model\n", - "done\n" - ] - } - ], - "source": [ - "solSh.load_DB_into_FASTsearch()\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[['Hallo', 'was', 'geht', 'denn', 'hier', 'so', '(sonntag)'], ['Ich', 'habe', 'echt', 'keine', 'Ahnung', 'verdammt'], ['I.', 'd.', 'R.', '(in der regel)', '(rechts rot)', 'gibt', 'es', 'keine', 'Abschiebungen'], ['Ende', 'd.', 'J.', '(juristisch)', 'wird', 'alles', 'problematisch'], ['Er', '(Europarekord Einfuhrerklärung Empfangsrelais Entschädigungsrente Ergänzungsrichtlinie Europarat endoplasmatisches Retikulum)', 'habe', 'es', 'sehr', 'schwer'], ['Es', 'war', 'die', 'Hose', 'des', 'Gauners'], ['Bliblablub'], ['Er', '(Europarekord Einfuhrerklärung Empfangsrelais Entschädigungsrente Ergänzungsrichtlinie Europarat endoplasmatisches Retikulum)', 'ging', 'nicht', 'schnell'], ['Er', '(Europarekord Einfuhrerklärung Empfangsrelais Entschädigungsrente Ergänzungsrichtlinie Europarat endoplasmatisches Retikulum)', 'geht', 'davon', 'aus,', 'dass', 'es', 'schnell', 'zu', 'Ende', 'sein', 'wird']]\n" - ] - } - ], - "source": [ - "outsentences = solSh.ExplainShortsInSentencesWithBrackets(sentences)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'test1out')" - ] - } - ], - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Fremd_WB-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Fremd_WB-checkpoint.ipynb deleted file mode 100644 index 6b63188..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Fremd_WB-checkpoint.ipynb +++ /dev/null @@ -1,154 +0,0 @@ -{ - "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": [], - "source": [ - "#fwb.create_hklDB_from_csv('HurrakiWoerterbuch_nodoubles.txt', 'None')" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "generating BoW Model 1..\n", - "Creating the bag of words...\n", - "\n", - "dumping the data to hkl format..\n", - "done\n", - "generating BoW Model 2..\n", - "Creating the bag of words...\n", - "\n", - "dumping the data to hkl format..\n", - "done\n", - "loading the bow model 1\n", - "loading the bow model 2\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": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "something\n", - "sentence ['das', 'ist', 'Abfall']\n", - "['ist', 'Abfall']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "['Abfall']\n", - "fremdeintrag ['Abfall', 'sind', 'Sachen', 'die', 'wir', 'nicht', 'mehr', 'brauchen.']\n", - "fremdeintraege [['Abfall', 'sind', 'Sachen', 'die', 'wir', 'nicht', 'mehr', 'brauchen.']]\n", - "sentence ['er', 'ging', 'über', 'die', 'Straße']\n", - "['ging', 'über', 'die', 'Straße']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "['Enzyklopädie']\n", - "fremdeintrag ['Enzyklopädie', 'ist', 'ein', 'anderes', 'Wort', 'für', 'Lexikon.', 'In', 'einer', 'Enzyklopädie', 'findet', 'man', 'Informationen.']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "fremdeintraege []\n", - "sentence ['halt', 'ab', 'hier']\n", - "['halt', 'ab', 'hier']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "['Zyprer']\n", - "fremdeintrag ['Ein', 'Zyprer', 'oder', 'eine', 'Zyprerin', 'ist', 'ein', 'Mensch.', 'Dieser', 'Mensch', 'lebt', 'auf', 'der', 'Insel', 'Zypern.']\n", - "fremdeintraege []\n" - ] - } - ], - "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": 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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Medio-checkpoint.ipynb b/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Medio-checkpoint.ipynb deleted file mode 100644 index 5b4e9a4..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/.ipynb_checkpoints/Use_Medio-checkpoint.ipynb +++ /dev/null @@ -1,3326 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from Medio import *\n", - "\n", - "\n", - "\n", - "medi = Medio(None,None)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "mediowords.txt\n", - "oi\n", - "[['Einwohnermeldeamt'],['Einwohner·melde·amt']]\n", - "\n", - "[['Einwohnermeldeamt'], ['Einwohner·melde·amt']]\n", - "oi\n", - "[['Arbeitsauftrag'],['Arbeits·auftrag']]\n", - "\n", - "[['Arbeitsauftrag'], ['Arbeits·auftrag']]\n", - "oi\n", - "[['Phantomdiskussion'],['Phantom·diskussion']]\n", - "\n", - "[['Phantomdiskussion'], ['Phantom·diskussion']]\n", - "oi\n", - "[['Strassenbahn'],['Strassen·bahn']]\n", - "\n", - "[['Strassenbahn'], ['Strassen·bahn']]\n", - "oi\n", - "[['Zusatzsatz'],['Zusatz·satz']]\n", - "\n", - "[['Zusatzsatz'], ['Zusatz·satz']]\n", - "oi\n", - "[['Buestenhalter'],['Buesten·halter']]\n", - "\n", - "[['Buestenhalter'], ['Buesten·halter']]\n", - "oi\n", - "[['Kindersprache'],['Kinder·sprache']]\n", - "\n", - "[['Kindersprache'], ['Kinder·sprache']]\n", - "oi\n", - "[['Buergertum'],['Buerger·tum']]\n", - "\n", - "[['Buergertum'], ['Buerger·tum']]\n", - "oi\n", - "[['Parteigruendung'],['Partei·gruendung']]\n", - "\n", - "[['Parteigruendung'], ['Partei·gruendung']]\n", - "oi\n", - "[['Kampfsport'],['Kampf·sport']]\n", - "\n", - "[['Kampfsport'], ['Kampf·sport']]\n", - "oi\n", - "[['Bankautomaten'],['Bank·automaten']]\n", - "\n", - "[['Bankautomaten'], ['Bank·automaten']]\n", - "oi\n", - "[['Kreistag'],['Kreis·tag']]\n", - "\n", - "[['Kreistag'], ['Kreis·tag']]\n", - "oi\n", - "[['Bundesnachrichtendienst'],['Bundes·nachrichten·dienst']]\n", - "\n", - "[['Bundesnachrichtendienst'], ['Bundes·nachrichten·dienst']]\n", - "oi\n", - "[['Nationalpark'],['National·park']]\n", - "\n", - "[['Nationalpark'], ['National·park']]\n", - "oi\n", - "[['Cocktailkleid'],['Cocktail·kleid']]\n", - "\n", - "[['Cocktailkleid'], ['Cocktail·kleid']]\n", - "oi\n", - "[['Schuhboden'],['Schuh·boden']]\n", - "\n", - "[['Schuhboden'], ['Schuh·boden']]\n", - "oi\n", - "[['Kabelanschluss'],['Kabel·anschluss']]\n", - "\n", - "[['Kabelanschluss'], ['Kabel·anschluss']]\n", - "oi\n", - "[['mitgegruendet'],['mit·ge·gruendet']]\n", - "\n", - "[['mitgegruendet'], ['mit·ge·gruendet']]\n", - "oi\n", - "[['Papiertiger'],['Papier·tiger']]\n", - "\n", - "[['Papiertiger'], ['Papier·tiger']]\n", - "oi\n", - "[['Öffnungszeiten'],['Öffnungs·zeiten']]\n", - "\n", - "[['Ã\\x96ffnungszeiten'], ['Ã\\x96ffnungs·zeiten']]\n", - "oi\n", - "[['Erstsprache'],['Erst·sprache']]\n", - "\n", - "[['Erstsprache'], ['Erst·sprache']]\n", - "oi\n", - "[['Buergerversicherung'],['Buerger·versicherung']]\n", - "\n", - "[['Buergerversicherung'], ['Buerger·versicherung']]\n", - "oi\n", - "[['Rollsstuhl'],['Rolls·stuhl']]\n", - "\n", - "[['Rollsstuhl'], ['Rolls·stuhl']]\n", - "oi\n", - "[['Hosenguertel'],['Hosen·guertel']]\n", - "\n", - "[['Hosenguertel'], ['Hosen·guertel']]\n", - "oi\n", - "[['Bundestagswahl'],['Bundes·tags·wahl']]\n", - "\n", - "[['Bundestagswahl'], ['Bundes·tags·wahl']]\n", - "oi\n", - "[['Aluminiumhut'],['Aluminium·hut']]\n", - "\n", - "[['Aluminiumhut'], ['Aluminium·hut']]\n", - "oi\n", - "[['Videothek'],['Video·thek']]\n", - "\n", - "[['Videothek'], ['Video·thek']]\n", - "oi\n", - "[['Rohstoffe'],['Roh·stoffe']]\n", - "\n", - "[['Rohstoffe'], ['Roh·stoffe']]\n", - "oi\n", - "[['Gebuehreneinzugszentrale'],['Gebuehren·einzugs·zentrale']]\n", - "\n", - "[['Gebuehreneinzugszentrale'], ['Gebuehren·einzugs·zentrale']]\n", - "oi\n", - "[['Videoueberwachung'],['Video·ueberwachung']]\n", - "\n", - "[['Videoueberwachung'], ['Video·ueberwachung']]\n", - "oi\n", - "[['Autofahrer:'],['Auto·fahrer:']]\n", - "\n", - "[['Autofahrer:'], ['Auto·fahrer:']]\n", - "oi\n", - "[['verkleinert'],['ver·kleinert']]\n", - "\n", - "[['verkleinert'], ['ver·kleinert']]\n", - "oi\n", - "[['Massenvernichtung'],['Massen·vernichtung']]\n", - "\n", - "[['Massenvernichtung'], ['Massen·vernichtung']]\n", - "oi\n", - "[['Lebensgemeinschaft'],['Lebens·gemeinschaft']]\n", - "\n", - "[['Lebensgemeinschaft'], ['Lebens·gemeinschaft']]\n", - "oi\n", - "[['Fronleichnam'],['Fron·leichnam']]\n", - "\n", - "[['Fronleichnam'], ['Fron·leichnam']]\n", - "oi\n", - "[['Modellregionen'],['Modell·regionen']]\n", - "\n", - "[['Modellregionen'], ['Modell·regionen']]\n", - "oi\n", - "[['Musiklieder'],['Musik·lieder']]\n", - "\n", - "[['Musiklieder'], ['Musik·lieder']]\n", - "oi\n", - "[['wegzunehmen'],['weg·zu·nehmen']]\n", - "\n", - "[['wegzunehmen'], ['weg·zu·nehmen']]\n", - "oi\n", - "[['Theaterstuecken'],['Theater·stuecken']]\n", - "\n", - "[['Theaterstuecken'], ['Theater·stuecken']]\n", - "oi\n", - "[['Streitgespraech'],['Streit·gespraech']]\n", - "\n", - "[['Streitgespraech'], ['Streit·gespraech']]\n", - "oi\n", - "[['Koerperhaltung'],['Koerper·haltung']]\n", - "\n", - "[['Koerperhaltung'], ['Koerper·haltung']]\n", - "oi\n", - "[['Motorradfahrer'],['Motor·rad·fahrer']]\n", - "\n", - "[['Motorradfahrer'], ['Motor·rad·fahrer']]\n", - "oi\n", - "[['Weitsprung'],['Weit·sprung']]\n", - "\n", - "[['Weitsprung'], ['Weit·sprung']]\n", - "oi\n", - "[['Deutschland'],['Deutsch·land']]\n", - "\n", - "[['Deutschland'], ['Deutsch·land']]\n", - "oi\n", - "[['Torlinie'],['Tor·linie']]\n", - "\n", - "[['Torlinie'], ['Tor·linie']]\n", - "oi\n", - "[['Fussball'],['Fuss·ball']]\n", - "\n", - "[['Fussball'], ['Fuss·ball']]\n", - "oi\n", - "[['wegwerfen,'],['weg·werfen,']]\n", - "\n", - "[['wegwerfen,'], ['weg·werfen,']]\n", - "oi\n", - "[['Bewusstsein'],['Bewusst·sein']]\n", - "\n", - "[['Bewusstsein'], ['Bewusst·sein']]\n", - "oi\n", - "[['Jahreszeiten'],['Jahres·zeiten']]\n", - "\n", - "[['Jahreszeiten'], ['Jahres·zeiten']]\n", - "oi\n", - "[['Bildschirmleseprogramm'],['Bildschirm·lese·programm']]\n", - "\n", - "[['Bildschirmleseprogramm'], ['Bildschirm·lese·programm']]\n", - "oi\n", - "[['Fahreignungsregister'],['Fahr·eignungs·register']]\n", - "\n", - "[['Fahreignungsregister'], ['Fahr·eignungs·register']]\n", - "oi\n", - "[['Schuh­platt­ler'],['Schuh·­platt­ler']]\n", - "\n", - "[['Schuh\\xadplatt\\xadler'], ['Schuh·\\xadplatt\\xadler']]\n", - "oi\n", - "[['Oberschicht'],['Ober·schicht']]\n", - "\n", - "[['Oberschicht'], ['Ober·schicht']]\n", - "oi\n", - "[['Linkshaender'],['Links·haender']]\n", - "\n", - "[['Linkshaender'], ['Links·haender']]\n", - "oi\n", - "[['Bundeswahlleiter'],['Bundes·wahl·leiter']]\n", - "\n", - "[['Bundeswahlleiter'], ['Bundes·wahl·leiter']]\n", - "oi\n", - "[['Musikinstrument'],['Musik·instrument']]\n", - "\n", - "[['Musikinstrument'], ['Musik·instrument']]\n", - "oi\n", - "[['Pflanzenoel'],['Pflanzen·oel']]\n", - "\n", - "[['Pflanzenoel'], ['Pflanzen·oel']]\n", - "oi\n", - "[['Antagonistinnen'],['Anta·gonistinnen']]\n", - "\n", - "[['Antagonistinnen'], ['Anta·gonistinnen']]\n", - "oi\n", - "[['Busfahrt'],['Bus·fahrt']]\n", - "\n", - "[['Busfahrt'], ['Bus·fahrt']]\n", - "oi\n", - "[['Schauspielern'],['Schau·spielern']]\n", - "\n", - "[['Schauspielern'], ['Schau·spielern']]\n", - "oi\n", - "[['Behindertengleichstellungsgesetz'],['Behinderten·gleichstellungs·gesetz']]\n", - "\n", - "[['Behindertengleichstellungsgesetz'], ['Behinderten·gleichstellungs·gesetz']]\n", - "oi\n", - "[['Buchstaben'],['Buch·staben']]\n", - "\n", - "[['Buchstaben'], ['Buch·staben']]\n", - "oi\n", - "[['Krankenversicherung'],['Kranken·versicherung']]\n", - "\n", - "[['Krankenversicherung'], ['Kranken·versicherung']]\n", - "oi\n", - "[['anschauen'],['an·schauen']]\n", - "\n", - "[['anschauen'], ['an·schauen']]\n", - "oi\n", - "[['Uhrzeiten'],['Uhr·zeiten']]\n", - "\n", - "[['Uhrzeiten'], ['Uhr·zeiten']]\n", - "oi\n", - "[['Laufbaendern'],['Lauf·baendern']]\n", - "\n", - "[['Laufbaendern'], ['Lauf·baendern']]\n", - "oi\n", - "[['Restaurationsbrot'],['Restaurations·brot']]\n", - "\n", - "[['Restaurationsbrot'], ['Restaurations·brot']]\n", - "oi\n", - "[['Weltalphabetisierungstag'],['Welt·alphabetisierungs·tag']]\n", - "\n", - "[['Weltalphabetisierungstag'], ['Welt·alphabetisierungs·tag']]\n", - "oi\n", - "[['Hilfsmittel'],['Hilfs·mittel']]\n", - "\n", - "[['Hilfsmittel'], ['Hilfs·mittel']]\n", - "oi\n", - "[['Europatag'],['Europa·tag']]\n", - "\n", - "[['Europatag'], ['Europa·tag']]\n", - "oi\n", - "[['Weichtiere'],['Weich·tiere']]\n", - "\n", - "[['Weichtiere'], ['Weich·tiere']]\n", - "oi\n", - "[['Antisemit'],['Anti·semit']]\n", - "\n", - "[['Antisemit'], ['Anti·semit']]\n", - "oi\n", - "[['Fernsehsender'],['Fernseh·sender']]\n", - "\n", - "[['Fernsehsender'], ['Fernseh·sender']]\n", - "oi\n", - "[['Arschfax'],['Arsch·fax']]\n", - "\n", - "[['Arschfax'], ['Arsch·fax']]\n", - "oi\n", - "[['Fernesehsendungen'],['Ferneseh·sendungen']]\n", - "\n", - "[['Fernesehsendungen'], ['Ferneseh·sendungen']]\n", - "oi\n", - "[['Warentauschtag'],['Waren·tausch·tag']]\n", - "\n", - "[['Warentauschtag'], ['Waren·tausch·tag']]\n", - "oi\n", - "[['Reihenfolge'],['Reihen·folge']]\n", - "\n", - "[['Reihenfolge'], ['Reihen·folge']]\n", - "oi\n", - "[['Rueckfahrkarten'],['Rueck·fahr·karten']]\n", - "\n", - "[['Rueckfahrkarten'], ['Rueck·fahr·karten']]\n", - "oi\n", - "[['Treffpunkte'],['Treff·punkte']]\n", - "\n", - "[['Treffpunkte'], ['Treff·punkte']]\n", - "oi\n", - "[['Newsletter'],['News·letter']]\n", - "\n", - "[['Newsletter'], ['News·letter']]\n", - "oi\n", - "[['Austauschen'],['Aus·tauschen']]\n", - "\n", - "[['Austauschen'], ['Aus·tauschen']]\n", - "oi\n", - "[['Polterabend'],['Polter·abend']]\n", - "\n", - "[['Polterabend'], ['Polter·abend']]\n", - "oi\n", - "[['Wettkampfspiele'],['Wett·kampf·spiele']]\n", - "\n", - "[['Wettkampfspiele'], ['Wett·kampf·spiele']]\n", - "oi\n", - "[['Pflegenotstand'],['Pflege·notstand']]\n", - "\n", - "[['Pflegenotstand'], ['Pflege·notstand']]\n", - "oi\n", - "[['Alufolie'],['Alu·folie']]\n", - "\n", - "[['Alufolie'], ['Alu·folie']]\n", - "oi\n", - "[['Arbeitslohn'],['Arbeits·lohn']]\n", - "\n", - "[['Arbeitslohn'], ['Arbeits·lohn']]\n", - "oi\n", - "[['Wohngeld'],['Wohn·geld']]\n", - "\n", - "[['Wohngeld'], ['Wohn·geld']]\n", - "oi\n", - "[['nacheinander:'],['nach·einander:']]\n", - "\n", - "[['nacheinander:'], ['nach·einander:']]\n", - "oi\n", - "[['Autokorso'],['Auto·korso']]\n", - "\n", - "[['Autokorso'], ['Auto·korso']]\n", - "oi\n", - "[['Sportart'],['Sport·art']]\n", - "\n", - "[['Sportart'], ['Sport·art']]\n", - "oi\n", - "[['Wochenende'],['Wochen·ende']]\n", - "\n", - "[['Wochenende'], ['Wochen·ende']]\n", - "oi\n", - "[['Armutsgrenze'],['Armuts·grenze']]\n", - "\n", - "[['Armutsgrenze'], ['Armuts·grenze']]\n", - "oi\n", - "[['Aschermittwoch'],['Ascher·mittwoch']]\n", - "\n", - "[['Aschermittwoch'], ['Ascher·mittwoch']]\n", - "oi\n", - "[['Fremdwort'],['Fremd·wort']]\n", - "\n", - "[['Fremdwort'], ['Fremd·wort']]\n", - "oi\n", - "[['Soerwis'],['Soer·wis']]\n", - "\n", - "[['Soerwis'], ['Soer·wis']]\n", - "oi\n", - "[['Grossbritannien'],['Gross·britannien']]\n", - "\n", - "[['Grossbritannien'], ['Gross·britannien']]\n", - "oi\n", - "[['Stromspar'],['Strom·spar']]\n", - "\n", - "[['Stromspar'], ['Strom·spar']]\n", - "oi\n", - "[['Fastnacht'],['Fast·nacht']]\n", - "\n", - "[['Fastnacht'], ['Fast·nacht']]\n", - "oi\n", - "[['Begleitagentur'],['Begleit·agentur']]\n", - "\n", - "[['Begleitagentur'], ['Begleit·agentur']]\n", - "oi\n", - "[['Buergerinitiative'],['Buerger·initiative']]\n", - "\n", - "[['Buergerinitiative'], ['Buerger·initiative']]\n", - "oi\n", - "[['Knotenschrift'],['Knoten·schrift']]\n", - "\n", - "[['Knotenschrift'], ['Knoten·schrift']]\n", - "oi\n", - "[['Leserlichkeit'],['Leser·lich·keit']]\n", - "\n", - "[['Leserlichkeit'], ['Leser·lich·keit']]\n", - "oi\n", - "[['Immobilienmakler'],['Immobilien·makler']]\n", - "\n", - "[['Immobilienmakler'], ['Immobilien·makler']]\n", - "oi\n", - "[['Landkreis'],['Land·kreis']]\n", - "\n", - "[['Landkreis'], ['Land·kreis']]\n", - "oi\n", - "[['Tischvorlage'],['Tisch·vorlage']]\n", - "\n", - "[['Tischvorlage'], ['Tisch·vorlage']]\n", - "oi\n", - "[['Blutdruck'],['Blut·druck']]\n", - "\n", - "[['Blutdruck'], ['Blut·druck']]\n", - "oi\n", - "[['Datenverarbeitungsanlagen'],['Daten·verarbeitungs·anlagen']]\n", - "\n", - "[['Datenverarbeitungsanlagen'], ['Daten·verarbeitungs·anlagen']]\n", - "oi\n", - "[['Staatsbuergerschaft'],['Staats·buergerschaft']]\n", - "\n", - "[['Staatsbuergerschaft'], ['Staats·buergerschaft']]\n", - "oi\n", - "[['Putzlappen'],['Putz·lappen']]\n", - "\n", - "[['Putzlappen'], ['Putz·lappen']]\n", - "oi\n", - "[['Schimpfwoerter'],['Schimpf·woerter']]\n", - "\n", - "[['Schimpfwoerter'], ['Schimpf·woerter']]\n", - "oi\n", - "[['Siegermaechte'],['Sieger·maechte']]\n", - "\n", - "[['Siegermaechte'], ['Sieger·maechte']]\n", - "oi\n", - "[['Fahrzeuge'],['Fahr·zeuge']]\n", - "\n", - "[['Fahrzeuge'], ['Fahr·zeuge']]\n", - "oi\n", - "[['Unterhose'],['Unter·hose']]\n", - "\n", - "[['Unterhose'], ['Unter·hose']]\n", - "oi\n", - "[['Steckdose'],['Steck·dose']]\n", - "\n", - "[['Steckdose'], ['Steck·dose']]\n", - "oi\n", - "[['Bundesland'],['Bundes·land']]\n", - "\n", - "[['Bundesland'], ['Bundes·land']]\n", - "oi\n", - "[['Arbeitnehmer'],['Arbeit·nehmer']]\n", - "\n", - "[['Arbeitnehmer'], ['Arbeit·nehmer']]\n", - "oi\n", - "[['Fernseher'],['Fern·seher']]\n", - "\n", - "[['Fernseher'], ['Fern·seher']]\n", - "oi\n", - "[['Smartphone'],['Smart·phone']]\n", - "\n", - "[['Smartphone'], ['Smart·phone']]\n", - "oi\n", - "[['Zeitkarten'],['Zeit·karten']]\n", - "\n", - "[['Zeitkarten'], ['Zeit·karten']]\n", - "oi\n", - "[['Hundekommandos'],['Hunde·kommandos']]\n", - "\n", - "[['Hundekommandos'], ['Hunde·kommandos']]\n", - "oi\n", - "[['Mindestpreis'],['Mindest·preis']]\n", - "\n", - "[['Mindestpreis'], ['Mindest·preis']]\n", - "oi\n", - "[['umwandeln'],['um·wandeln']]\n", - "\n", - "[['umwandeln'], ['um·wandeln']]\n", - "oi\n", - "[['Erkennungszeichen'],['Erkennungs·zeichen']]\n", - "\n", - "[['Erkennungszeichen'], ['Erkennungs·zeichen']]\n", - "oi\n", - "[['Karfreitag'],['Kar·freitag']]\n", - "\n", - "[['Karfreitag'], ['Kar·freitag']]\n", - "oi\n", - "[['Bundeswehr'],['Bundes·wehr']]\n", - "\n", - "[['Bundeswehr'], ['Bundes·wehr']]\n", - "oi\n", - "[['PussySlap'],['Pussy·Slap']]\n", - "\n", - "[['PussySlap'], ['Pussy·Slap']]\n", - "oi\n", - "[['Schulfach'],['Schul·fach']]\n", - "\n", - "[['Schulfach'], ['Schul·fach']]\n", - "oi\n", - "[['Erdgas'],['Erd·gas']]\n", - "\n", - "[['Erdgas'], ['Erd·gas']]\n", - "oi\n", - "[['Landrat'],['Land·rat']]\n", - "\n", - "[['Landrat'], ['Land·rat']]\n", - "oi\n", - "[['Videokamera'],['Video·kamera']]\n", - "\n", - "[['Videokamera'], ['Video·kamera']]\n", - "oi\n", - "[['Antischall'],['Anti·schall']]\n", - "\n", - "[['Antischall'], ['Anti·schall']]\n", - "oi\n", - "[['Muskelkraft'],['Muskel·kraft']]\n", - "\n", - "[['Muskelkraft'], ['Muskel·kraft']]\n", - "oi\n", - "[['ablesen'],['ab·lesen']]\n", - "\n", - "[['ablesen'], ['ab·lesen']]\n", - "oi\n", - "[['Eintrittskarte'],['Eintritts·karte']]\n", - "\n", - "[['Eintrittskarte'], ['Eintritts·karte']]\n", - "oi\n", - "[['Weltkulturerbe'],['Welt·kultur·erbe']]\n", - "\n", - "[['Weltkulturerbe'], ['Welt·kultur·erbe']]\n", - "oi\n", - "[['Ohrmuschel'],['Ohr·muschel']]\n", - "\n", - "[['Ohrmuschel'], ['Ohr·muschel']]\n", - "oi\n", - "[['Abfallsorten'],['Abfall·sorten']]\n", - "\n", - "[['Abfallsorten'], ['Abfall·sorten']]\n", - "oi\n", - "[['Praezedenzfall'],['Praezedenz·fall']]\n", - "\n", - "[['Praezedenzfall'], ['Praezedenz·fall']]\n", - "oi\n", - "[['Lebewesen'],['Lebe·wesen']]\n", - "\n", - "[['Lebewesen'], ['Lebe·wesen']]\n", - "oi\n", - "[['Protestwaehler'],['Protest·waehler']]\n", - "\n", - "[['Protestwaehler'], ['Protest·waehler']]\n", - "oi\n", - "[['Fausregel'],['Faus·regel']]\n", - "\n", - "[['Fausregel'], ['Faus·regel']]\n", - "oi\n", - "[['Auftriebsguertel'],['Auftriebs·guertel']]\n", - "\n", - "[['Auftriebsguertel'], ['Auftriebs·guertel']]\n", - "oi\n", - "[['Wahlkreis'],['Wahl·kreis']]\n", - "\n", - "[['Wahlkreis'], ['Wahl·kreis']]\n", - "oi\n", - "[['Merkspruch'],['Merk·spruch']]\n", - "\n", - "[['Merkspruch'], ['Merk·spruch']]\n", - "oi\n", - "[['Papierhuelse'],['Papier·huelse']]\n", - "\n", - "[['Papierhuelse'], ['Papier·huelse']]\n", - "oi\n", - "[['Aktionstages'],['Aktions·tages']]\n", - "\n", - "[['Aktionstages'], ['Aktions·tages']]\n", - "oi\n", - "[['Fruehlingsfest'],['Fruehling·sfest']]\n", - "\n", - "[['Fruehlingsfest'], ['Fruehling·sfest']]\n", - "oi\n", - "[['Leihgebuehr'],['Leih·gebuehr']]\n", - "\n", - "[['Leihgebuehr'], ['Leih·gebuehr']]\n", - "oi\n", - "[['Wahrzeichen'],['Wahr·zeichen']]\n", - "\n", - "[['Wahrzeichen'], ['Wahr·zeichen']]\n", - "oi\n", - "[['Fahrzeug'],['Fahr·zeug']]\n", - "\n", - "[['Fahrzeug'], ['Fahr·zeug']]\n", - "oi\n", - "[['Sehbehindertentag'],['Seh·behinderten·tag']]\n", - "\n", - "[['Sehbehindertentag'], ['Seh·behinderten·tag']]\n", - "oi\n", - "[['Datenverarbeitungsanlage'],['Daten·verarbeitungs·anlage']]\n", - "\n", - "[['Datenverarbeitungsanlage'], ['Daten·verarbeitungs·anlage']]\n", - "oi\n", - "[['Glascontainer'],['Glas·container']]\n", - "\n", - "[['Glascontainer'], ['Glas·container']]\n", - "oi\n", - "[['Uhrzeiger'],['Uhr·zeiger']]\n", - "\n", - "[['Uhrzeiger'], ['Uhr·zeiger']]\n", - "oi\n", - "[['Rollstuhl'],['Roll·stuhl']]\n", - "\n", - "[['Rollstuhl'], ['Roll·stuhl']]\n", - "oi\n", - "[['Oberkleider'],['Ober·kleider']]\n", - "\n", - "[['Oberkleider'], ['Ober·kleider']]\n", - "oi\n", - "[['Abfalltonne'],['Abfall·tonne']]\n", - "\n", - "[['Abfalltonne'], ['Abfall·tonne']]\n", - "oi\n", - "[['Reisepass'],['Reise·pass']]\n", - "\n", - "[['Reisepass'], ['Reise·pass']]\n", - "oi\n", - "[['Bonanzarad'],['Bonanza·rad']]\n", - "\n", - "[['Bonanzarad'], ['Bonanza·rad']]\n", - "oi\n", - "[['Leistungskurs'],['Leistungs·kurs']]\n", - "\n", - "[['Leistungskurs'], ['Leistungs·kurs']]\n", - "oi\n", - "[['Wettkaempfe'],['Wett·kaempfe']]\n", - "\n", - "[['Wettkaempfe'], ['Wett·kaempfe']]\n", - "oi\n", - "[['Nationalsozialist'],['National·sozialist']]\n", - "\n", - "[['Nationalsozialist'], ['National·sozialist']]\n", - "oi\n", - "[['Betriebssystem'],['Betriebs·system']]\n", - "\n", - "[['Betriebssystem'], ['Betriebs·system']]\n", - "oi\n", - "[['Hauptnahrungsmittel'],['Haupt·nahrungs·mittel']]\n", - "\n", - "[['Hauptnahrungsmittel'], ['Haupt·nahrungs·mittel']]\n", - "oi\n", - "[['zusammenlebt'],['zusammen·lebt']]\n", - "\n", - "[['zusammenlebt'], ['zusammen·lebt']]\n", - "oi\n", - "[['Schadstoffe,'],['Schad·stoffe,']]\n", - "\n", - "[['Schadstoffe,'], ['Schad·stoffe,']]\n", - "oi\n", - "[['Schriftstueck'],['Schrift·stueck']]\n", - "\n", - "[['Schriftstueck'], ['Schrift·stueck']]\n", - "oi\n", - "[['Setlist'],['Set·list']]\n", - "\n", - "[['Setlist'], ['Set·list']]\n", - "oi\n", - "[['Fernsehsendung'],['Fernseh·sendung']]\n", - "\n", - "[['Fernsehsendung'], ['Fernseh·sendung']]\n", - "oi\n", - "[['aufblasen'],['auf·blasen']]\n", - "\n", - "[['aufblasen'], ['auf·blasen']]\n", - "oi\n", - "[['Fremdenfeindlichkeit'],['Fremden·feindlichkeit']]\n", - "\n", - "[['Fremdenfeindlichkeit'], ['Fremden·feindlichkeit']]\n", - "oi\n", - "[['Sozialhilfe'],['Sozial·hilfe']]\n", - "\n", - "[['Sozialhilfe'], ['Sozial·hilfe']]\n", - "oi\n", - "[['Sprachroboter'],['Sprach·roboter']]\n", - "\n", - "[['Sprachroboter'], ['Sprach·roboter']]\n", - "oi\n", - "[['Muttersprache'],['Mutter·sprache']]\n", - "\n", - "[['Muttersprache'], ['Mutter·sprache']]\n", - "oi\n", - "[['einschalten'],['ein·schalten']]\n", - "\n", - "[['einschalten'], ['ein·schalten']]\n", - "oi\n", - "[['Geschaeftsordnung'],['Geschaefts·ordnung']]\n", - "\n", - "[['Geschaeftsordnung'], ['Geschaefts·ordnung']]\n", - "oi\n", - "[['Sitzplaetze'],['Sitz·plaetze']]\n", - "\n", - "[['Sitzplaetze'], ['Sitz·plaetze']]\n", - "oi\n", - "[['Mehrmenge'],['Mehr·menge']]\n", - "\n", - "[['Mehrmenge'], ['Mehr·menge']]\n", - "oi\n", - "[['Wertstoffe'],['Wert·stoffe']]\n", - "\n", - "[['Wertstoffe'], ['Wert·stoffe']]\n", - "oi\n", - "[['Strohhut'],['Stroh·hut']]\n", - "\n", - "[['Strohhut'], ['Stroh·hut']]\n", - "oi\n", - "[['Lebensart'],['Lebens·art']]\n", - "\n", - "[['Lebensart'], ['Lebens·art']]\n", - "oi\n", - "[['Zweitstimme'],['Zweit·stimme']]\n", - "\n", - "[['Zweitstimme'], ['Zweit·stimme']]\n", - "oi\n", - "[['Schulabschluss'],['Schul·abschluss']]\n", - "\n", - "[['Schulabschluss'], ['Schul·abschluss']]\n", - "oi\n", - "[['Pilgerfahrt'],['Pilger·fahrt']]\n", - "\n", - "[['Pilgerfahrt'], ['Pilger·fahrt']]\n", - "oi\n", - "[['Europawahl'],['Europa·wahl']]\n", - "\n", - "[['Europawahl'], ['Europa·wahl']]\n", - "oi\n", - "[['weggehen'],['weg·gehen']]\n", - "\n", - "[['weggehen'], ['weg·gehen']]\n", - "oi\n", - "[['Suedamerika'],['Sued·amerika']]\n", - "\n", - "[['Suedamerika'], ['Sued·amerika']]\n", - "oi\n", - "[['Klimawandel'],['Klima·wandel']]\n", - "\n", - "[['Klimawandel'], ['Klima·wandel']]\n", - "oi\n", - "[['Musikton'],['Musik·ton']]\n", - "\n", - "[['Musikton'], ['Musik·ton']]\n", - "oi\n", - "[['Nachname'],['Nach·name']]\n", - "\n", - "[['Nachname'], ['Nach·name']]\n", - "oi\n", - "[['Fachkrankenhaus'],['Fach·krankenhaus']]\n", - "\n", - "[['Fachkrankenhaus'], ['Fach·krankenhaus']]\n", - "oi\n", - "[['Computerroboter'],['Computer·roboter']]\n", - "\n", - "[['Computerroboter'], ['Computer·roboter']]\n", - "oi\n", - "[['Landkarte'],['Land·karte']]\n", - "\n", - "[['Landkarte'], ['Land·karte']]\n", - "oi\n", - "[['Koerpergewicht'],['Koerper·gewicht']]\n", - "\n", - "[['Koerpergewicht'], ['Koerper·gewicht']]\n", - "oi\n", - "[['Motorrad'],['Motor·rad']]\n", - "\n", - "[['Motorrad'], ['Motor·rad']]\n", - "oi\n", - "[['Fastnachtssonntag'],['Fastnachts·sonntag']]\n", - "\n", - "[['Fastnachtssonntag'], ['Fastnachts·sonntag']]\n", - "oi\n", - "[['Leitartikel'],['Leit·artikel']]\n", - "\n", - "[['Leitartikel'], ['Leit·artikel']]\n", - "oi\n", - "[['Schularten'],['Schul·arten']]\n", - "\n", - "[['Schularten'], ['Schul·arten']]\n", - "oi\n", - "[['Feiertag'],['Feier·tag']]\n", - "\n", - "[['Feiertag'], ['Feier·tag']]\n", - "oi\n", - "[['Tierhaltung'],['Tier·haltung']]\n", - "\n", - "[['Tierhaltung'], ['Tier·haltung']]\n", - "oi\n", - "[['Stegreif'],['Steg·reif']]\n", - "\n", - "[['Stegreif'], ['Steg·reif']]\n", - "oi\n", - "[['Espressobar'],['Espresso·bar']]\n", - "\n", - "[['Espressobar'], ['Espresso·bar']]\n", - "oi\n", - "[['Radfahrt'],['Rad·fahrt']]\n", - "\n", - "[['Radfahrt'], ['Rad·fahrt']]\n", - "oi\n", - "[['Mautpreller'],['Maut·preller']]\n", - "\n", - "[['Mautpreller'], ['Maut·preller']]\n", - "oi\n", - "[['Olivenoel'],['Oliven·oel']]\n", - "\n", - "[['Olivenoel'], ['Oliven·oel']]\n", - "oi\n", - "[['Saegekette'],['Saege·kette']]\n", - "\n", - "[['Saegekette'], ['Saege·kette']]\n", - "oi\n", - "[['Krankenwagen'],['Kranken·wagen']]\n", - "\n", - "[['Krankenwagen'], ['Kranken·wagen']]\n", - "oi\n", - "[['Schaltjahr'],['Schalt·jahr']]\n", - "\n", - "[['Schaltjahr'], ['Schalt·jahr']]\n", - "oi\n", - "[['Wahlrecht'],['Wahl·recht']]\n", - "\n", - "[['Wahlrecht'], ['Wahl·recht']]\n", - "oi\n", - "[['Weltspartag'],['Welt·spar·tag']]\n", - "\n", - "[['Weltspartag'], ['Welt·spar·tag']]\n", - "oi\n", - "[['Internetdienst'],['Internet·dienst']]\n", - "\n", - "[['Internetdienst'], ['Internet·dienst']]\n", - "oi\n", - "[['Landraetin'],['Land·raetin']]\n", - "\n", - "[['Landraetin'], ['Land·raetin']]\n", - "oi\n", - "[['Abgeordnetengesetz'],['Abgeordneten·gesetz']]\n", - "\n", - "[['Abgeordnetengesetz'], ['Abgeordneten·gesetz']]\n", - "oi\n", - "[['Gipfeltreffen'],['Gipfel·treffen']]\n", - "\n", - "[['Gipfeltreffen'], ['Gipfel·treffen']]\n", - "oi\n", - "[['Zeitschaltuhr'],['Zeit·schalt·uhr']]\n", - "\n", - "[['Zeitschaltuhr'], ['Zeit·schalt·uhr']]\n", - "oi\n", - "[['Bleistiftrock'],['Blei·stift·rock']]\n", - "\n", - "[['Bleistiftrock'], ['Blei·stift·rock']]\n", - "oi\n", - "[['Autofahrer'],['Auto·fahrer']]\n", - "\n", - "[['Autofahrer'], ['Auto·fahrer']]\n", - "oi\n", - "[['Kaffeefahrt'],['Kaffee·fahrt']]\n", - "\n", - "[['Kaffeefahrt'], ['Kaffee·fahrt']]\n", - "oi\n", - "[['Bundeskanzler'],['Bundes·kanzler']]\n", - "\n", - "[['Bundeskanzler'], ['Bundes·kanzler']]\n", - "oi\n", - "[['Musiklied'],['Musik·lied']]\n", - "\n", - "[['Musiklied'], ['Musik·lied']]\n", - "oi\n", - "[['Ministererlaubnis'],['Minister·erlaubnis']]\n", - "\n", - "[['Ministererlaubnis'], ['Minister·erlaubnis']]\n", - "oi\n", - "[['Schutzstaffel'],['Schutz·staffel']]\n", - "\n", - "[['Schutzstaffel'], ['Schutz·staffel']]\n", - "oi\n", - "[['Hoehepunkt'],['Hoehe·punkt']]\n", - "\n", - "[['Hoehepunkt'], ['Hoehe·punkt']]\n", - "oi\n", - "[['Arbeitsplatz'],['Arbeits·platz']]\n", - "\n", - "[['Arbeitsplatz'], ['Arbeits·platz']]\n", - "oi\n", - "[['Streitschrift'],['Streit·schrift']]\n", - "\n", - "[['Streitschrift'], ['Streit·schrift']]\n", - "oi\n", - "[['Religionsgemeinschaft'],['Religions·gemeinschaft']]\n", - "\n", - "[['Religionsgemeinschaft'], ['Religions·gemeinschaft']]\n", - "oi\n", - "[['Frauentaxi'],['Frauen·taxi']]\n", - "\n", - "[['Frauentaxi'], ['Frauen·taxi']]\n", - "oi\n", - "[['Computerprogramm,'],['Computer·programm,']]\n", - "\n", - "[['Computerprogramm,'], ['Computer·programm,']]\n", - "oi\n", - "[['Rauchgranate'],['Rauch·granate']]\n", - "\n", - "[['Rauchgranate'], ['Rauch·granate']]\n", - "oi\n", - "[['Internetknoten'],['Internet·knoten']]\n", - "\n", - "[['Internetknoten'], ['Internet·knoten']]\n", - "oi\n", - "[['Schulart'],['Schul·art']]\n", - "\n", - "[['Schulart'], ['Schul·art']]\n", - "oi\n", - "[['Energiewende'],['Energie·wende']]\n", - "\n", - "[['Energiewende'], ['Energie·wende']]\n", - "oi\n", - "[['Wiederverwertung'],['Wieder·verwertung']]\n", - "\n", - "[['Wiederverwertung'], ['Wieder·verwertung']]\n", - "oi\n", - "[['Wassersportart'],['Wasser·sport·art']]\n", - "\n", - "[['Wassersportart'], ['Wasser·sport·art']]\n", - "oi\n", - "[['Unterhosenzettel'],['Unter·hosen·zettel']]\n", - "\n", - "[['Unterhosenzettel'], ['Unter·hosen·zettel']]\n", - "oi\n", - "[['Taschenlampe'],['Taschen·lampe']]\n", - "\n", - "[['Taschenlampe'], ['Taschen·lampe']]\n", - "oi\n", - "[['Fluechtlingslager'],['Fluechtlings·lager']]\n", - "\n", - "[['Fluechtlingslager'], ['Fluechtlings·lager']]\n", - "oi\n", - "[['Fahrkarte'],['Fahr·karte']]\n", - "\n", - "[['Fahrkarte'], ['Fahr·karte']]\n", - "oi\n", - "[['hintereinander'],['hinter·einander']]\n", - "\n", - "[['hintereinander'], ['hinter·einander']]\n", - "oi\n", - "[['Brandbrief'],['Brand·brief']]\n", - "\n", - "[['Brandbrief'], ['Brand·brief']]\n", - "oi\n", - "[['Schriftdolmetscher'],['Schrift·dolmetscher']]\n", - "\n", - "[['Schriftdolmetscher'], ['Schrift·dolmetscher']]\n", - "oi\n", - "[['Nutztier'],['Nutz·tier']]\n", - "\n", - "[['Nutztier'], ['Nutz·tier']]\n", - "oi\n", - "[['Theaterstueck'],['Theater·stueck']]\n", - "\n", - "[['Theaterstueck'], ['Theater·stueck']]\n", - "oi\n", - "[['Tippfehler'],['Tipp·fehler']]\n", - "\n", - "[['Tippfehler'], ['Tipp·fehler']]\n", - "oi\n", - "[['Fahrradfahrer'],['Fahrrad·fahrer']]\n", - "\n", - "[['Fahrradfahrer'], ['Fahrrad·fahrer']]\n", - "oi\n", - "[['Scherztext'],['Scherz·text']]\n", - "\n", - "[['Scherztext'], ['Scherz·text']]\n", - "oi\n", - "[['Comicfigur'],['Comic·figur']]\n", - "\n", - "[['Comicfigur'], ['Comic·figur']]\n", - "oi\n", - "[['Jakobsweg'],['Jakobs·weg']]\n", - "\n", - "[['Jakobsweg'], ['Jakobs·weg']]\n", - "oi\n", - "[['Spickzettel'],['Spick·zettel']]\n", - "\n", - "[['Spickzettel'], ['Spick·zettel']]\n", - "oi\n", - "[['Telefonanruf'],['Telefon·anruf']]\n", - "\n", - "[['Telefonanruf'], ['Telefon·anruf']]\n", - "oi\n", - "[['Entsorgungsbetrieb'],['Entsorgungs·betrieb']]\n", - "\n", - "[['Entsorgungsbetrieb'], ['Entsorgungs·betrieb']]\n", - "oi\n", - "[['Hyperlink'],['Hyper·link']]\n", - "\n", - "[['Hyperlink'], ['Hyper·link']]\n", - "oi\n", - "[['Staubsaugerbeutel'],['Staub·sauger·beutel']]\n", - "\n", - "[['Staubsaugerbeutel'], ['Staub·sauger·beutel']]\n", - "oi\n", - "[['Currywurst'],['Curry·wurst']]\n", - "\n", - "[['Currywurst'], ['Curry·wurst']]\n", - "oi\n", - "[['Sockenhalter'],['Socken·halter']]\n", - "\n", - "[['Sockenhalter'], ['Socken·halter']]\n", - "oi\n", - "[['Boxershorts'],['Boxer·shorts']]\n", - "\n", - "[['Boxershorts'], ['Boxer·shorts']]\n", - "oi\n", - "[['Direktkandidat'],['Direkt·kandidat']]\n", - "\n", - "[['Direktkandidat'], ['Direkt·kandidat']]\n", - "oi\n", - "[['unehrlich'],['un·ehrlich']]\n", - "\n", - "[['unehrlich'], ['un·ehrlich']]\n", - "oi\n", - "[['Zimtbaum'],['Zimt·baum']]\n", - "\n", - "[['Zimtbaum'], ['Zimt·baum']]\n", - "oi\n", - "[['Internetseite'],['Internet·seite']]\n", - "\n", - "[['Internetseite'], ['Internet·seite']]\n", - "oi\n", - "[['Nackenband'],['Nacken·band']]\n", - "\n", - "[['Nackenband'], ['Nacken·band']]\n", - "oi\n", - "[['Weltumwelttag'],['Welt·umwelt·tag']]\n", - "\n", - "[['Weltumwelttag'], ['Welt·umwelt·tag']]\n", - "oi\n", - "[['Mehrzahl'],['Mehr·zahl']]\n", - "\n", - "[['Mehrzahl'], ['Mehr·zahl']]\n", - "oi\n", - "[['Kollektivvertrag'],['Kollektiv·vertrag']]\n", - "\n", - "[['Kollektivvertrag'], ['Kollektiv·vertrag']]\n", - "oi\n", - "[['Stadtmitarbeiter'],['Stadt·mitarbeiter']]\n", - "\n", - "[['Stadtmitarbeiter'], ['Stadt·mitarbeiter']]\n", - "oi\n", - "[['Schrotthaufen'],['Schrott·haufen']]\n", - "\n", - "[['Schrotthaufen'], ['Schrott·haufen']]\n", - "oi\n", - "[['Bananenrepublik'],['Bananen·republik']]\n", - "\n", - "[['Bananenrepublik'], ['Bananen·republik']]\n", - "oi\n", - "[['Wohnort'],['Wohn·ort']]\n", - "\n", - "[['Wohnort'], ['Wohn·ort']]\n", - "oi\n", - "[['Nachbarlaender'],['Nachbar·laender']]\n", - "\n", - "[['Nachbarlaender'], ['Nachbar·laender']]\n", - "oi\n", - "[['Wohnwagen'],['Wohn·wagen']]\n", - "\n", - "[['Wohnwagen'], ['Wohn·wagen']]\n", - "oi\n", - "[['Bioabfall'],['Bio·abfall']]\n", - "\n", - "[['Bioabfall'], ['Bio·abfall']]\n", - "oi\n", - "[['Drachenschlucht'],['Drachen·schlucht']]\n", - "\n", - "[['Drachenschlucht'], ['Drachen·schlucht']]\n", - "oi\n", - "[['Doppelgaenger'],['Doppel·gaenger']]\n", - "\n", - "[['Doppelgaenger'], ['Doppel·gaenger']]\n", - "oi\n", - "[['Faktencheck'],['Fakten·check']]\n", - "\n", - "[['Faktencheck'], ['Fakten·check']]\n", - "oi\n", - "[['Songschreiberin,'],['Song·schreiberin,']]\n", - "\n", - "[['Songschreiberin,'], ['Song·schreiberin,']]\n", - "oi\n", - "[['Oktoberfest'],['Oktober·fest']]\n", - "\n", - "[['Oktoberfest'], ['Oktober·fest']]\n", - "oi\n", - "[['ausreisen'],['aus·reisen']]\n", - "\n", - "[['ausreisen'], ['aus·reisen']]\n", - "oi\n", - "[['Telefonnummer'],['Telefon·nummer']]\n", - "\n", - "[['Telefonnummer'], ['Telefon·nummer']]\n", - "oi\n", - "[['herunterladen'],['herunter·laden']]\n", - "\n", - "[['herunterladen'], ['herunter·laden']]\n", - "oi\n", - "[['Kochgeraet'],['Koch·geraet']]\n", - "\n", - "[['Kochgeraet'], ['Koch·geraet']]\n", - "oi\n", - "[['Neusprech'],['Neu·sprech']]\n", - "\n", - "[['Neusprech'], ['Neu·sprech']]\n", - "oi\n", - "[['Zeitwaage'],['Zeit·waage']]\n", - "\n", - "[['Zeitwaage'], ['Zeit·waage']]\n", - "oi\n", - "[['Ausdauer'],['Aus·dauer']]\n", - "\n", - "[['Ausdauer'], ['Aus·dauer']]\n", - "oi\n", - "[['Arbeitszeit'],['Arbeits·zeit']]\n", - "\n", - "[['Arbeitszeit'], ['Arbeits·zeit']]\n", - "oi\n", - "[['Papierabfall'],['Papier·abfall']]\n", - "\n", - "[['Papierabfall'], ['Papier·abfall']]\n", - "oi\n", - "[['abwaescht'],['ab·waescht']]\n", - "\n", - "[['abwaescht'], ['ab·waescht']]\n", - "oi\n", - "[['Landesparlament'],['Landes·parlament']]\n", - "\n", - "[['Landesparlament'], ['Landes·parlament']]\n", - "oi\n", - "[['Visarun'],['Visa·run']]\n", - "\n", - "[['Visarun'], ['Visa·run']]\n", - "oi\n", - "[['Gegenspieler'],['Gegen·spieler']]\n", - "\n", - "[['Gegenspieler'], ['Gegen·spieler']]\n", - "oi\n", - "[['vorlesen'],['vor·lesen']]\n", - "\n", - "[['vorlesen'], ['vor·lesen']]\n", - "oi\n", - "[['Kraftwerk'],['Kraft·werk']]\n", - "\n", - "[['Kraftwerk'], ['Kraft·werk']]\n", - "oi\n", - "[['Schreibschwaeche'],['Schreib·schwaeche']]\n", - "\n", - "[['Schreibschwaeche'], ['Schreib·schwaeche']]\n", - "oi\n", - "[['Eifelturm'],['Eifel·turm']]\n", - "\n", - "[['Eifelturm'], ['Eifel·turm']]\n", - "oi\n", - "[['Flugzeug'],['Flug·zeug']]\n", - "\n", - "[['Flugzeug'], ['Flug·zeug']]\n", - "oi\n", - "[['Zettelkasten'],['Zettel·kasten']]\n", - "\n", - "[['Zettelkasten'], ['Zettel·kasten']]\n", - "oi\n", - "[['Elektronikgeraete'],['Elektronik·geraete']]\n", - "\n", - "[['Elektronikgeraete'], ['Elektronik·geraete']]\n", - "oi\n", - "[['Bevoelkerungsdichte'],['Bevoelkerungs·dichte']]\n", - "\n", - "[['Bevoelkerungsdichte'], ['Bevoelkerungs·dichte']]\n", - "oi\n", - "[['Handzeichen'],['Hand·zeichen']]\n", - "\n", - "[['Handzeichen'], ['Hand·zeichen']]\n", - "oi\n", - "[['Papiertonne'],['Papier·tonne']]\n", - "\n", - "[['Papiertonne'], ['Papier·tonne']]\n", - "oi\n", - "[['Feiertagen'],['Feier·tagen']]\n", - "\n", - "[['Feiertagen'], ['Feier·tagen']]\n", - "oi\n", - "[['zusammengeschlossen'],['zusammen·geschlossen']]\n", - "\n", - "[['zusammengeschlossen'], ['zusammen·geschlossen']]\n", - "oi\n", - "[['Fachwerkturm'],['Fach·werk·turm']]\n", - "\n", - "[['Fachwerkturm'], ['Fach·werk·turm']]\n", - "oi\n", - "[['Gluecksspiel'],['Gluecks·spiel']]\n", - "\n", - "[['Gluecksspiel'], ['Gluecks·spiel']]\n", - "oi\n", - "[['Pflanzenwesen'],['Pflanzen·wesen']]\n", - "\n", - "[['Pflanzenwesen'], ['Pflanzen·wesen']]\n", - "oi\n", - "[['nebenher'],['neben·her']]\n", - "\n", - "[['nebenher'], ['neben·her']]\n", - "oi\n", - "[['Fernsehsendungen'],['Fernseh·sendungen']]\n", - "\n", - "[['Fernsehsendungen'], ['Fernseh·sendungen']]\n", - "oi\n", - "[['Kindermaedchen'],['Kinder·maedchen']]\n", - "\n", - "[['Kindermaedchen'], ['Kinder·maedchen']]\n", - "oi\n", - "[['Rennraedern'],['Renn·raedern']]\n", - "\n", - "[['Rennraedern'], ['Renn·raedern']]\n", - "oi\n", - "[['Schubkarre'],['Schub·karre']]\n", - "\n", - "[['Schubkarre'], ['Schub·karre']]\n", - "oi\n", - "[['Koerperbehandlung'],['Koerper·behandlung']]\n", - "\n", - "[['Koerperbehandlung'], ['Koerper·behandlung']]\n", - "oi\n", - "[['Themenpark'],['Themen·park']]\n", - "\n", - "[['Themenpark'], ['Themen·park']]\n", - "oi\n", - "[['Klapprad'],['Klapp·rad']]\n", - "\n", - "[['Klapprad'], ['Klapp·rad']]\n", - "oi\n", - "[['Neuwahl'],['Neu·wahl']]\n", - "\n", - "[['Neuwahl'], ['Neu·wahl']]\n", - "oi\n", - "[['zurueckzahlen'],['zurueck·zahlen']]\n", - "\n", - "[['zurueckzahlen'], ['zurueck·zahlen']]\n", - "oi\n", - "[['Mittelschicht'],['Mittel·schicht']]\n", - "\n", - "[['Mittelschicht'], ['Mittel·schicht']]\n", - "oi\n", - "[['Dabbawala'],['Dabba·wala']]\n", - "\n", - "[['Dabbawala'], ['Dabba·wala']]\n", - "oi\n", - "[['Woerterbuch'],['Woerter·buch']]\n", - "\n", - "[['Woerterbuch'], ['Woerter·buch']]\n", - "oi\n", - "[['Abendrot'],['Abend·rot']]\n", - "\n", - "[['Abendrot'], ['Abend·rot']]\n", - "oi\n", - "[['Badeanzug'],['Badean·zug']]\n", - "\n", - "[['Badeanzug'], ['Badean·zug']]\n", - "oi\n", - "[['fortbewegen'],['fort·bewegen']]\n", - "\n", - "[['fortbewegen'], ['fort·bewegen']]\n", - "oi\n", - "[['Unterschichtenfernsehen'],['Unter·schichten·fernsehen']]\n", - "\n", - "[['Unterschichtenfernsehen'], ['Unter·schichten·fernsehen']]\n", - "oi\n", - "[['Bollenhut'],['Bollen·hut']]\n", - "\n", - "[['Bollenhut'], ['Bollen·hut']]\n", - "oi\n", - "[['bergab'],['berg·ab']]\n", - "\n", - "[['bergab'], ['berg·ab']]\n", - "oi\n", - "[['Armbanduhr'],['Arm·band·uhr']]\n", - "\n", - "[['Armbanduhr'], ['Arm·band·uhr']]\n", - "oi\n", - "[['mitmachen'],['mit·machen']]\n", - "\n", - "[['mitmachen'], ['mit·machen']]\n", - "oi\n", - "[['Einwanderungsland'],['Einwanderungs·land']]\n", - "\n", - "[['Einwanderungsland'], ['Einwanderungs·land']]\n", - "oi\n", - "[['Schutzkleidung'],['Schutz·kleidung']]\n", - "\n", - "[['Schutzkleidung'], ['Schutz·kleidung']]\n", - "oi\n", - "[['Schriftzeichen'],['Schrift·zeichen']]\n", - "\n", - "[['Schriftzeichen'], ['Schrift·zeichen']]\n", - "oi\n", - "[['Modellregion:'],['Modell·region:']]\n", - "\n", - "[['Modellregion:'], ['Modell·region:']]\n", - "oi\n", - "[['Spielautomat'],['Spiel·automat']]\n", - "\n", - "[['Spielautomat'], ['Spiel·automat']]\n", - "oi\n", - "[['Staatsbuergern'],['Staats·buergern']]\n", - "\n", - "[['Staatsbuergern'], ['Staats·buergern']]\n", - "oi\n", - "[['Sektempfang'],['Sekt·empfang']]\n", - "\n", - "[['Sektempfang'], ['Sekt·empfang']]\n", - "oi\n", - "[['Bundesminister'],['Bundes·minister']]\n", - "\n", - "[['Bundesminister'], ['Bundes·minister']]\n", - "oi\n", - "[['Freiheitsstatue'],['Freiheits·statue']]\n", - "\n", - "[['Freiheitsstatue'], ['Freiheits·statue']]\n", - "oi\n", - "[['Schusswaffen'],['Schuss·waffen']]\n", - "\n", - "[['Schusswaffen'], ['Schuss·waffen']]\n", - "oi\n", - "[['Elektronikgeraet'],['Elektronik·geraet']]\n", - "\n", - "[['Elektronikgeraet'], ['Elektronik·geraet']]\n", - "oi\n", - "[['Selbstueberschaetzung'],['Selbst·ueber·schaetzung']]\n", - "\n", - "[['Selbstueberschaetzung'], ['Selbst·ueber·schaetzung']]\n", - "oi\n", - "[['Rollstuhlbasketball'],['Roll·stuhl·basket·ball']]\n", - "\n", - "[['Rollstuhlbasketball'], ['Roll·stuhl·basket·ball']]\n", - "oi\n", - "[['Feinstaub'],['Fein·staub']]\n", - "\n", - "[['Feinstaub'], ['Fein·staub']]\n", - "oi\n", - "[['zusammenleben'],['zusammen·leben']]\n", - "\n", - "[['zusammenleben'], ['zusammen·leben']]\n", - "oi\n", - "[['Menschengruppen'],['Menschen·gruppen']]\n", - "\n", - "[['Menschengruppen'], ['Menschen·gruppen']]\n", - "oi\n", - "[['Fremdstoff'],['Fremd·stoff']]\n", - "\n", - "[['Fremdstoff'], ['Fremd·stoff']]\n", - "oi\n", - "[['Nationalsozialismus'],['National·sozialismus']]\n", - "\n", - "[['Nationalsozialismus'], ['National·sozialismus']]\n", - "oi\n", - "[['geregelt'],['ge·regelt']]\n", - "\n", - "[['geregelt'], ['ge·regelt']]\n", - "oi\n", - "[['Dauerrede'],['Dauer·rede']]\n", - "\n", - "[['Dauerrede'], ['Dauer·rede']]\n", - "oi\n", - "[['Gehweg'],['Geh·weg']]\n", - "\n", - "[['Gehweg'], ['Geh·weg']]\n", - "oi\n", - "[['Lieblingsfigur'],['Lieblings·figur']]\n", - "\n", - "[['Lieblingsfigur'], ['Lieblings·figur']]\n", - "oi\n", - "[['Nordamerika'],['Nord·amerika']]\n", - "\n", - "[['Nordamerika'], ['Nord·amerika']]\n", - "oi\n", - "[['Muellauto'],['Muell·auto']]\n", - "\n", - "[['Muellauto'], ['Muell·auto']]\n", - "oi\n", - "[['Torschuss'],['Tor·schuss']]\n", - "\n", - "[['Torschuss'], ['Tor·schuss']]\n", - "oi\n", - "[['Erstaufnahmeeinrichtung'],['Erst·aufnahme·einrichtung']]\n", - "\n", - "[['Erstaufnahmeeinrichtung'], ['Erst·aufnahme·einrichtung']]\n", - "oi\n", - "[['Polizeiauto'],['Polizei·auto']]\n", - "\n", - "[['Polizeiauto'], ['Polizei·auto']]\n", - "oi\n", - "[['Sommergewinn'],['Sommer·gewinn']]\n", - "\n", - "[['Sommergewinn'], ['Sommer·gewinn']]\n", - "oi\n", - "[['Freundschaft'],['Freund·schaft']]\n", - "\n", - "[['Freundschaft'], ['Freund·schaft']]\n", - "oi\n", - "[['Superheld'],['Super·held']]\n", - "\n", - "[['Superheld'], ['Super·held']]\n", - "oi\n", - "[['Aufteilung'],['Auf·teilung']]\n", - "\n", - "[['Aufteilung'], ['Auf·teilung']]\n", - "oi\n", - "[['Algorithmus'],['Algo·rithmus']]\n", - "\n", - "[['Algorithmus'], ['Algo·rithmus']]\n", - "oi\n", - "[['Henkelmann'],['Henkel·mann']]\n", - "\n", - "[['Henkelmann'], ['Henkel·mann']]\n", - "oi\n", - "[['unwichtige'],['un·wichtige']]\n", - "\n", - "[['unwichtige'], ['un·wichtige']]\n", - "oi\n", - "[['Internetfirmen'],['Internet·firmen']]\n", - "\n", - "[['Internetfirmen'], ['Internet·firmen']]\n", - "oi\n", - "[['Fachidiot'],['Fach·idiot']]\n", - "\n", - "[['Fachidiot'], ['Fach·idiot']]\n", - "oi\n", - "[['Girokonto'],['Giro·konto']]\n", - "\n", - "[['Girokonto'], ['Giro·konto']]\n", - "oi\n", - "[['Pressemeldung'],['Presse·meldung']]\n", - "\n", - "[['Pressemeldung'], ['Presse·meldung']]\n", - "oi\n", - "[['Bauwerke'],['Bau·werke']]\n", - "\n", - "[['Bauwerke'], ['Bau·werke']]\n", - "oi\n", - "[['Landtag'],['Land·tag']]\n", - "\n", - "[['Landtag'], ['Land·tag']]\n", - "oi\n", - "[['Minirock'],['Mini·rock']]\n", - "\n", - "[['Minirock'], ['Mini·rock']]\n", - "oi\n", - "[['zusammenhalten'],['zusammen·halten']]\n", - "\n", - "[['zusammenhalten'], ['zusammen·halten']]\n", - "oi\n", - "[['Abhoergesetz'],['Abhoer·gesetz']]\n", - "\n", - "[['Abhoergesetz'], ['Abhoer·gesetz']]\n", - "oi\n", - "[['ausschalten'],['aus·schalten']]\n", - "\n", - "[['ausschalten'], ['aus·schalten']]\n", - "oi\n", - "[['Schutzbehauptung,'],['Schutz·behauptung,']]\n", - "\n", - "[['Schutzbehauptung,'], ['Schutz·behauptung,']]\n", - "oi\n", - "[['dabeihaben'],['dabei·haben']]\n", - "\n", - "[['dabeihaben'], ['dabei·haben']]\n", - "oi\n", - "[['Schwarzwald'],['Schwarz·wald']]\n", - "\n", - "[['Schwarzwald'], ['Schwarz·wald']]\n", - "oi\n", - "[['Doppelmoral'],['Doppel·moral']]\n", - "\n", - "[['Doppelmoral'], ['Doppel·moral']]\n", - "oi\n", - "[['Strumpfhose'],['Strumpf·hose']]\n", - "\n", - "[['Strumpfhose'], ['Strumpf·hose']]\n", - "oi\n", - "[['Litfasssaeule'],['Lit·fass·saeule']]\n", - "\n", - "[['Litfasssaeule'], ['Lit·fass·saeule']]\n", - "oi\n", - "[['Überwachungsstaat'],['Über·wachungs·staat']]\n", - "\n", - "[['Ã\\x9cberwachungsstaat'], ['Ã\\x9cber·wachungs·staat']]\n", - "oi\n", - "[['Neonazis'],['Neo·nazis']]\n", - "\n", - "[['Neonazis'], ['Neo·nazis']]\n", - "oi\n", - "[['Teletext'],['Tele·text']]\n", - "\n", - "[['Teletext'], ['Tele·text']]\n", - "oi\n", - "[['Hotline'],['Hot·line']]\n", - "\n", - "[['Hotline'], ['Hot·line']]\n", - "oi\n", - "[['Einzelfahrkarten'],['Einzel·fahr·karten']]\n", - "\n", - "[['Einzelfahrkarten'], ['Einzel·fahr·karten']]\n", - "oi\n", - "[['Wetterschutz'],['Wetter·schutz']]\n", - "\n", - "[['Wetterschutz'], ['Wetter·schutz']]\n", - "oi\n", - "[['Bestellerprinzip'],['Besteller·prinzip']]\n", - "\n", - "[['Bestellerprinzip'], ['Besteller·prinzip']]\n", - "oi\n", - "[['Telefongespraeche'],['Telefon·gespraeche']]\n", - "\n", - "[['Telefongespraeche'], ['Telefon·gespraeche']]\n", - "oi\n", - "[['Aktionstag'],['Aktions·tag']]\n", - "\n", - "[['Aktionstag'], ['Aktions·tag']]\n", - "oi\n", - "[['Trampolinturnen'],['Trampolin·turnen']]\n", - "\n", - "[['Trampolinturnen'], ['Trampolin·turnen']]\n", - "oi\n", - "[['Landesgrenze'],['Landes·grenze']]\n", - "\n", - "[['Landesgrenze'], ['Landes·grenze']]\n", - "oi\n", - "[['Restmuell?'],['Rest·muell?']]\n", - "\n", - "[['Restmuell?'], ['Rest·muell?']]\n", - "oi\n", - "[['Staatsanwalt'],['Staats·anwalt']]\n", - "\n", - "[['Staatsanwalt'], ['Staats·anwalt']]\n", - "oi\n", - "[['runterrutschen'],['runter·rutschen']]\n", - "\n", - "[['runterrutschen'], ['runter·rutschen']]\n", - "oi\n", - "[['Beachvolleyball'],['Beach·volley·ball']]\n", - "\n", - "[['Beachvolleyball'], ['Beach·volley·ball']]\n", - "oi\n", - "[['Nasenspuelung'],['Nasen·spuelung']]\n", - "\n", - "[['Nasenspuelung'], ['Nasen·spuelung']]\n", - "oi\n", - "[['Auftriebsuertel'],['Auftriebs·uertel']]\n", - "\n", - "[['Auftriebsuertel'], ['Auftriebs·uertel']]\n", - "oi\n", - "[['Superfood'],['Super·food']]\n", - "\n", - "[['Superfood'], ['Super·food']]\n", - "oi\n", - "[['Spielart'],['Spiel·art']]\n", - "\n", - "[['Spielart'], ['Spiel·art']]\n", - "oi\n", - "[['Gehoergang'],['Gehoer·gang']]\n", - "\n", - "[['Gehoergang'], ['Gehoer·gang']]\n", - "oi\n", - "[['Lebensmittel'],['Lebens·mittel']]\n", - "\n", - "[['Lebensmittel'], ['Lebens·mittel']]\n", - "oi\n", - "[['Heimatland'],['Heimat·land']]\n", - "\n", - "[['Heimatland'], ['Heimat·land']]\n", - "oi\n", - "[['Bohrplattform'],['Bohr·platt·form']]\n", - "\n", - "[['Bohrplattform'], ['Bohr·platt·form']]\n", - "oi\n", - "[['Wohngemeinschat'],['Wohn·gemeinschat']]\n", - "\n", - "[['Wohngemeinschat'], ['Wohn·gemeinschat']]\n", - "oi\n", - "[['Kapuzenpullover'],['Kapuzen·pullover']]\n", - "\n", - "[['Kapuzenpullover'], ['Kapuzen·pullover']]\n", - "oi\n", - "[['Reformationstag'],['Reformations·tag']]\n", - "\n", - "[['Reformationstag'], ['Reformations·tag']]\n", - "oi\n", - "[['Feitertag'],['Feiter·tag']]\n", - "\n", - "[['Feitertag'], ['Feiter·tag']]\n", - "oi\n", - "[['Weltblutspendetag'],['Welt·blut·spende·tag']]\n", - "\n", - "[['Weltblutspendetag'], ['Welt·blut·spende·tag']]\n", - "oi\n", - "[['Hauptstadt'],['Haupt·stadt']]\n", - "\n", - "[['Hauptstadt'], ['Haupt·stadt']]\n", - "oi\n", - "[['Politbarometer'],['Polit·barometer']]\n", - "\n", - "[['Politbarometer'], ['Polit·barometer']]\n", - "oi\n", - "[['Zusammenarbeit'],['Zusammen·arbeit']]\n", - "\n", - "[['Zusammenarbeit'], ['Zusammen·arbeit']]\n", - "oi\n", - "[['Landesverrat'],['Landes·verrat']]\n", - "\n", - "[['Landesverrat'], ['Landes·verrat']]\n", - "oi\n", - "[['Arbeitnehmern'],['Arbeit·nehmern']]\n", - "\n", - "[['Arbeitnehmern'], ['Arbeit·nehmern']]\n", - "oi\n", - "[['Trennschicht'],['Trenn·schicht']]\n", - "\n", - "[['Trennschicht'], ['Trenn·schicht']]\n", - "oi\n", - "[['Gotteshaus'],['Gottes·haus']]\n", - "\n", - "[['Gotteshaus'], ['Gottes·haus']]\n", - "oi\n", - "[['Polizeikontrollen'],['Polizei·kontrollen']]\n", - "\n", - "[['Polizeikontrollen'], ['Polizei·kontrollen']]\n", - "oi\n", - "[['Wahlmeinung'],['Wahl·meinung']]\n", - "\n", - "[['Wahlmeinung'], ['Wahl·meinung']]\n", - "oi\n", - "[['Kaltmiete'],['Kalt·miete']]\n", - "\n", - "[['Kaltmiete'], ['Kalt·miete']]\n", - "oi\n", - "[['Weltzeit'],['Welt·zeit']]\n", - "\n", - "[['Weltzeit'], ['Welt·zeit']]\n", - "oi\n", - "[['Leinwand'],['Lein·wand']]\n", - "\n", - "[['Leinwand'], ['Lein·wand']]\n", - "oi\n", - "[['Arbeitgebern'],['Arbeit·gebern']]\n", - "\n", - "[['Arbeitgebern'], ['Arbeit·gebern']]\n", - "oi\n", - "[['Smartwatch'],['Smart·watch']]\n", - "\n", - "[['Smartwatch'], ['Smart·watch']]\n", - "oi\n", - "[['Volleyball'],['Volley·ball']]\n", - "\n", - "[['Volleyball'], ['Volley·ball']]\n", - "oi\n", - "[['Grenzuebergang'],['Grenz·uebergang']]\n", - "\n", - "[['Grenzuebergang'], ['Grenz·uebergang']]\n", - "oi\n", - "[['Fussstuetze'],['Fuss·stuetze']]\n", - "\n", - "[['Fussstuetze'], ['Fuss·stuetze']]\n", - "oi\n", - "[['miteinander'],['mit·einander']]\n", - "\n", - "[['miteinander'], ['mit·einander']]\n", - "oi\n", - "[['Wahlkampf'],['Wahl·kampf']]\n", - "\n", - "[['Wahlkampf'], ['Wahl·kampf']]\n", - "oi\n", - "[['Mittelmeer'],['Mittel·meer']]\n", - "\n", - "[['Mittelmeer'], ['Mittel·meer']]\n", - "oi\n", - "[['Mittelalter'],['Mittel·alter']]\n", - "\n", - "[['Mittelalter'], ['Mittel·alter']]\n", - "oi\n", - "[['Wurstart'],['Wurst·art']]\n", - "\n", - "[['Wurstart'], ['Wurst·art']]\n", - "oi\n", - "[['Fahrpruefung'],['Fahr·pruefung']]\n", - "\n", - "[['Fahrpruefung'], ['Fahr·pruefung']]\n", - "oi\n", - "[['Grabesruhe'],['Grabes·ruhe']]\n", - "\n", - "[['Grabesruhe'], ['Grabes·ruhe']]\n", - "oi\n", - "[['Restmuell'],['Rest·muell']]\n", - "\n", - "[['Restmuell'], ['Rest·muell']]\n", - "oi\n", - "[['Fingerspitzengefuehl'],['Finger·spitzen·gefuehl']]\n", - "\n", - "[['Fingerspitzengefuehl'], ['Finger·spitzen·gefuehl']]\n", - "oi\n", - "[['Bruehwurst'],['Brueh·wurst']]\n", - "\n", - "[['Bruehwurst'], ['Brueh·wurst']]\n", - "oi\n", - "[['Rubensfigur'],['Rubens·figur']]\n", - "\n", - "[['Rubensfigur'], ['Rubens·figur']]\n", - "oi\n", - "[['Konzentrationslager'],['Konzentrations·lager']]\n", - "\n", - "[['Konzentrationslager'], ['Konzentrations·lager']]\n", - "oi\n", - "[['Schwarzarbeit'],['Schwarz·arbeit']]\n", - "\n", - "[['Schwarzarbeit'], ['Schwarz·arbeit']]\n", - "oi\n", - "[['Mediopunkt'],['Medio·punkt']]\n", - "\n", - "[['Mediopunkt'], ['Medio·punkt']]\n", - "oi\n", - "[['Fachhochschule'],['Fach·hoch·schule']]\n", - "\n", - "[['Fachhochschule'], ['Fach·hoch·schule']]\n", - "oi\n", - "[['Wertstoffhof'],['Wert·stoff·hof']]\n", - "\n", - "[['Wertstoffhof'], ['Wert·stoff·hof']]\n", - "oi\n", - "[['Landratsamt'],['Land·rats·amt']]\n", - "\n", - "[['Landratsamt'], ['Land·rats·amt']]\n", - "oi\n", - "[['unwahr'],['un·wahr']]\n", - "\n", - "[['unwahr'], ['un·wahr']]\n", - "oi\n", - "[['Fremdsprache'],['Fremd·sprache']]\n", - "\n", - "[['Fremdsprache'], ['Fremd·sprache']]\n", - "oi\n", - "[['Nulltoleranzstrategie'],['Null·toleranz·strategie']]\n", - "\n", - "[['Nulltoleranzstrategie'], ['Null·toleranz·strategie']]\n", - "oi\n", - "[['Onlinelexikon'],['Online·lexikon']]\n", - "\n", - "[['Onlinelexikon'], ['Online·lexikon']]\n", - "oi\n", - "[['Schiedsrichterball'],['Schiedsrichter·ball']]\n", - "\n", - "[['Schiedsrichterball'], ['Schiedsrichter·ball']]\n", - "oi\n", - "[['Blindenhund'],['Blinden·hund']]\n", - "\n", - "[['Blindenhund'], ['Blinden·hund']]\n", - "oi\n", - "[['Analphabet'],['An·al·pha·bet']]\n", - "\n", - "[['Analphabet'], ['An·al·pha·bet']]\n", - "oi\n", - "[['Lesezirkel'],['Lese·zirkel']]\n", - "\n", - "[['Lesezirkel'], ['Lese·zirkel']]\n", - "oi\n", - "[['hauteng'],['haut·eng']]\n", - "\n", - "[['hauteng'], ['haut·eng']]\n", - "oi\n", - "[['Telefonfirmen'],['Telefon·firmen']]\n", - "\n", - "[['Telefonfirmen'], ['Telefon·firmen']]\n", - "oi\n", - "[['Wutbuerger'],['Wut·buerger']]\n", - "\n", - "[['Wutbuerger'], ['Wut·buerger']]\n", - "oi\n", - "[['Zufluchtsort'],['Zu·fluchts·ort']]\n", - "\n", - "[['Zufluchtsort'], ['Zu·fluchts·ort']]\n", - "oi\n", - "[['Wahlleiter'],['Wahl·leiter']]\n", - "\n", - "[['Wahlleiter'], ['Wahl·leiter']]\n", - "oi\n", - "[['Hochschule'],['Hoch·schule']]\n", - "\n", - "[['Hochschule'], ['Hoch·schule']]\n", - "oi\n", - "[['Geschlechtsorgan'],['Geschlechts·organ']]\n", - "\n", - "[['Geschlechtsorgan'], ['Geschlechts·organ']]\n", - "oi\n", - "[['durchlaeuft'],['durch·laeuft']]\n", - "\n", - "[['durchlaeuft'], ['durch·laeuft']]\n", - "oi\n", - "[['Dienstleistungen'],['Dienst·leistungen']]\n", - "\n", - "[['Dienstleistungen'], ['Dienst·leistungen']]\n", - "oi\n", - "[['Kombinationsmoeglichkeiten'],['Kombinations·moeglichkeiten']]\n", - "\n", - "[['Kombinationsmoeglichkeiten'], ['Kombinations·moeglichkeiten']]\n", - "oi\n", - "[['Eisenbahn'],['Eisen·bahn']]\n", - "\n", - "[['Eisenbahn'], ['Eisen·bahn']]\n", - "oi\n", - "[['Barcamp'],['Bar·camp']]\n", - "\n", - "[['Barcamp'], ['Bar·camp']]\n", - "oi\n", - "[['Antagonisten'],['Anta·gonisten']]\n", - "\n", - "[['Antagonisten'], ['Anta·gonisten']]\n", - "oi\n", - "[['Gottesdienst'],['Gottes·dienst']]\n", - "\n", - "[['Gottesdienst'], ['Gottes·dienst']]\n", - "oi\n", - "[['Raumschiffe'],['Raum·schiffe']]\n", - "\n", - "[['Raumschiffe'], ['Raum·schiffe']]\n", - "oi\n", - "[['Neujahrsempfang'],['Neujahrs·empfang']]\n", - "\n", - "[['Neujahrsempfang'], ['Neujahrs·empfang']]\n", - "oi\n", - "[['Wahlfaelschung'],['Wahl·faelschung']]\n", - "\n", - "[['Wahlfaelschung'], ['Wahl·faelschung']]\n", - "oi\n", - "[['Wirtschaftsform'],['Wirtschafts·form']]\n", - "\n", - "[['Wirtschaftsform'], ['Wirtschafts·form']]\n", - "oi\n", - "[['geschleudert'],['ge·schleudert']]\n", - "\n", - "[['geschleudert'], ['ge·schleudert']]\n", - "oi\n", - "[['Menschengruppe'],['Menschen·gruppe']]\n", - "\n", - "[['Menschengruppe'], ['Menschen·gruppe']]\n", - "oi\n", - "[['Lebengemeinschaft'],['Leben·gemeinschaft']]\n", - "\n", - "[['Lebengemeinschaft'], ['Leben·gemeinschaft']]\n", - "oi\n", - "[['Qigongkugeln'],['Qi·gong·kugeln']]\n", - "\n", - "[['Qigongkugeln'], ['Qi·gong·kugeln']]\n", - "oi\n", - "[['Ankerland'],['Anker·land']]\n", - "\n", - "[['Ankerland'], ['Anker·land']]\n", - "oi\n", - "[['Fahrrad'],['Fahr·rad']]\n", - "\n", - "[['Fahrrad'], ['Fahr·rad']]\n", - "oi\n", - "[['Friedenshaltung'],['Friedens·haltung']]\n", - "\n", - "[['Friedenshaltung'], ['Friedens·haltung']]\n", - "oi\n", - "[['Punktschriftsystem'],['Punkt·schrift·system']]\n", - "\n", - "[['Punktschriftsystem'], ['Punkt·schrift·system']]\n", - "oi\n", - "[['festgebunden'],['fest·gebunden']]\n", - "\n", - "[['festgebunden'], ['fest·gebunden']]\n", - "oi\n", - "[['Arbeitstisch'],['Arbeits·tisch']]\n", - "\n", - "[['Arbeitstisch'], ['Arbeits·tisch']]\n", - "oi\n", - "[['Babysitter'],['Baby·sitter']]\n", - "\n", - "[['Babysitter'], ['Baby·sitter']]\n", - "oi\n", - "[['Schneemann'],['Schnee·mann']]\n", - "\n", - "[['Schneemann'], ['Schnee·mann']]\n", - "oi\n", - "[['Erststimme'],['Erst·stimme']]\n", - "\n", - "[['Erststimme'], ['Erst·stimme']]\n", - "oi\n", - "[['homosexuell'],['homo·sexuell']]\n", - "\n", - "[['homosexuell'], ['homo·sexuell']]\n", - "oi\n", - "[['Internetadresse'],['Internet·adresse']]\n", - "\n", - "[['Internetadresse'], ['Internet·adresse']]\n", - "oi\n", - "[['Redestab'],['Rede·stab']]\n", - "\n", - "[['Redestab'], ['Rede·stab']]\n", - "oi\n", - "[['Texterkennung'],['Texter·kennung']]\n", - "\n", - "[['Texterkennung'], ['Texter·kennung']]\n", - "oi\n", - "[['Gotteslaesterung'],['Gottes·laesterung']]\n", - "\n", - "[['Gotteslaesterung'], ['Gottes·laesterung']]\n", - "oi\n", - "[['anzeigt'],['an·zeigt']]\n", - "\n", - "[['anzeigt'], ['an·zeigt']]\n", - "oi\n", - "[['Oberteil'],['Ober·teil']]\n", - "\n", - "[['Oberteil'], ['Ober·teil']]\n", - "oi\n", - "[['Weiterbildung'],['Weiter·bildung']]\n", - "\n", - "[['Weiterbildung'], ['Weiter·bildung']]\n", - "oi\n", - "[['Kleinbuerger'],['Klein·buerger']]\n", - "\n", - "[['Kleinbuerger'], ['Klein·buerger']]\n", - "oi\n", - "[['Verschwoerungstheorie'],['Verschwoerungs·theorie']]\n", - "\n", - "[['Verschwoerungstheorie'], ['Verschwoerungs·theorie']]\n", - "oi\n", - "[['Heilerziehungspfleger'],['Heil·erziehungs·pfleger']]\n", - "\n", - "[['Heilerziehungspfleger'], ['Heil·erziehungs·pfleger']]\n", - "oi\n", - "[['Rechtsgutachten'],['Rechts·gutachten']]\n", - "\n", - "[['Rechtsgutachten'], ['Rechts·gutachten']]\n", - "oi\n", - "[['Waschmaschine'],['Wasch·maschine']]\n", - "\n", - "[['Waschmaschine'], ['Wasch·maschine']]\n", - "oi\n", - "[['Weltfluechtlingstag'],['Welt·fluechtlings·tag']]\n", - "\n", - "[['Weltfluechtlingstag'], ['Welt·fluechtlings·tag']]\n", - "oi\n", - "[['Schachspiele'],['Schach·spiele']]\n", - "\n", - "[['Schachspiele'], ['Schach·spiele']]\n", - "oi\n", - "[['Schriftsprache'],['Schrift·sprache']]\n", - "\n", - "[['Schriftsprache'], ['Schrift·sprache']]\n", - "oi\n", - "[['Weihnachtsmann'],['Weihnachts·mann']]\n", - "\n", - "[['Weihnachtsmann'], ['Weihnachts·mann']]\n", - "oi\n", - "[['Sportuebungen'],['Sport·uebungen']]\n", - "\n", - "[['Sportuebungen'], ['Sport·uebungen']]\n", - "oi\n", - "[['Dreigespann'],['Drei·gespann']]\n", - "\n", - "[['Dreigespann'], ['Drei·gespann']]\n", - "oi\n", - "[['Majestaetsbeleidigung'],['Majestaets·beleidigung']]\n", - "\n", - "[['Majestaetsbeleidigung'], ['Majestaets·beleidigung']]\n", - "oi\n", - "[['Pflichtversicherung'],['Pflicht·versicherung']]\n", - "\n", - "[['Pflichtversicherung'], ['Pflicht·versicherung']]\n", - "oi\n", - "[['Politikergruppe'],['Politiker·gruppe']]\n", - "\n", - "[['Politikergruppe'], ['Politiker·gruppe']]\n", - "oi\n", - "[['Geldautomaten'],['Geld·automaten']]\n", - "\n", - "[['Geldautomaten'], ['Geld·automaten']]\n", - "oi\n", - "[['Ehegattensplitting'],['Ehe·gatten·splitting']]\n", - "\n", - "[['Ehegattensplitting'], ['Ehe·gatten·splitting']]\n", - "oi\n", - "[['zusammenarbeiten'],['zusammen·arbeiten']]\n", - "\n", - "[['zusammenarbeiten'], ['zusammen·arbeiten']]\n", - "oi\n", - "[['Internetseiten'],['Internet·seiten']]\n", - "\n", - "[['Internetseiten'], ['Internet·seiten']]\n", - "oi\n", - "[['Betriebsblind'],['Betriebs·blind']]\n", - "\n", - "[['Betriebsblind'], ['Betriebs·blind']]\n", - "oi\n", - "[['Grosswetterlage'],['Gross·wetter·lage']]\n", - "\n", - "[['Grosswetterlage'], ['Gross·wetter·lage']]\n", - "oi\n", - "[['Gewaechshaus'],['Gewaechs·haus']]\n", - "\n", - "[['Gewaechshaus'], ['Gewaechs·haus']]\n", - "oi\n", - "[['Fahrkarten:'],['Fahr·karten:']]\n", - "\n", - "[['Fahrkarten:'], ['Fahr·karten:']]\n", - "oi\n", - "[['Muellabfuhr'],['Muell·abfuhr']]\n", - "\n", - "[['Muellabfuhr'], ['Muell·abfuhr']]\n", - "oi\n", - "[['Falschmeldung'],['Falsch·meldung']]\n", - "\n", - "[['Falschmeldung'], ['Falsch·meldung']]\n", - "oi\n", - "[['Digitaluhr'],['Digital·uhr']]\n", - "\n", - "[['Digitaluhr'], ['Digital·uhr']]\n", - "oi\n", - "[['Unterhemd'],['Unter·hemd']]\n", - "\n", - "[['Unterhemd'], ['Unter·hemd']]\n", - "oi\n", - "[['Gleichbehandlungsgesetz'],['Gleich·behandlungs·gesetz']]\n", - "\n", - "[['Gleichbehandlungsgesetz'], ['Gleich·behandlungs·gesetz']]\n", - "oi\n", - "[['Karsamstag'],['Kar·samstag']]\n", - "\n", - "[['Karsamstag'], ['Kar·samstag']]\n", - "oi\n", - "[['Komfortverhalten'],['Komfort·verhalten']]\n", - "\n", - "[['Komfortverhalten'], ['Komfort·verhalten']]\n", - "oi\n", - "[['Hundekommando'],['Hunde·kommando']]\n", - "\n", - "[['Hundekommando'], ['Hunde·kommando']]\n", - "oi\n", - "[['Sportuebung'],['Sport·uebung']]\n", - "\n", - "[['Sportuebung'], ['Sport·uebung']]\n", - "oi\n", - "[['Protektionismus'],['Protektio·nismus']]\n", - "\n", - "[['Protektionismus'], ['Protektio·nismus']]\n", - "oi\n", - "[['Nationalsozialisten'],['National·sozialisten']]\n", - "\n", - "[['Nationalsozialisten'], ['National·sozialisten']]\n", - "oi\n", - "[['Binnenstaat'],['Binnen·staat']]\n", - "\n", - "[['Binnenstaat'], ['Binnen·staat']]\n", - "oi\n", - "[['Asylbewerber'],['Asyl·bewerber']]\n", - "\n", - "[['Asylbewerber'], ['Asyl·bewerber']]\n", - "oi\n", - "[['Buchwiege'],['Buch·wiege']]\n", - "\n", - "[['Buchwiege'], ['Buch·wiege']]\n", - "oi\n", - "[['Saeugetier'],['Saeuge·tier']]\n", - "\n", - "[['Saeugetier'], ['Saeuge·tier']]\n", - "oi\n", - "[['gelebt'],['ge·lebt']]\n", - "\n", - "[['gelebt'], ['ge·lebt']]\n", - "oi\n", - "[['Werktage'],['Werk·tage']]\n", - "\n", - "[['Werktage'], ['Werk·tage']]\n", - "oi\n", - "[['Cocktailparty'],['Cocktail·party']]\n", - "\n", - "[['Cocktailparty'], ['Cocktail·party']]\n", - "oi\n", - "[['Woerterbuch:'],['Woerter·buch:']]\n", - "\n", - "[['Woerterbuch:'], ['Woerter·buch:']]\n", - "oi\n", - "[['Politikart'],['Politik·art']]\n", - "\n", - "[['Politikart'], ['Politik·art']]\n", - "oi\n", - "[['abgeben'],['ab·geben']]\n", - "\n", - "[['abgeben'], ['ab·geben']]\n", - "oi\n", - "[['Mietpreisbremse'],['Miet·preis·bremse']]\n", - "\n", - "[['Mietpreisbremse'], ['Miet·preis·bremse']]\n", - "oi\n", - "[['Fastnachtssontag'],['Fastnachts·sontag']]\n", - "\n", - "[['Fastnachtssontag'], ['Fastnachts·sontag']]\n", - "oi\n", - "[['Wahlzeit'],['Wahl·zeit']]\n", - "\n", - "[['Wahlzeit'], ['Wahl·zeit']]\n", - "oi\n", - "[['Erdoel'],['Erd·oel']]\n", - "\n", - "[['Erdoel'], ['Erd·oel']]\n", - "oi\n", - "[['unmoeglich'],['un·moeglich']]\n", - "\n", - "[['unmoeglich'], ['un·moeglich']]\n", - "oi\n", - "[['Informationsfreiheitsgesetz'],['Informations·freiheits·gesetz']]\n", - "\n", - "[['Informationsfreiheitsgesetz'], ['Informations·freiheits·gesetz']]\n", - "oi\n", - "[['Unterschicht'],['Unter·schicht']]\n", - "\n", - "[['Unterschicht'], ['Unter·schicht']]\n", - "oi\n", - "[['Schimpfwort'],['Schimpf·wort']]\n", - "\n", - "[['Schimpfwort'], ['Schimpf·wort']]\n", - "oi\n", - "[['Alleinunterhalter'],['Allein·unter·halter']]\n", - "\n", - "[['Alleinunterhalter'], ['Allein·unter·halter']]\n", - "oi\n", - "[['Autofahrern'],['Auto·fahrern']]\n", - "\n", - "[['Autofahrern'], ['Auto·fahrern']]\n", - "oi\n", - "[['Ostersontag'],['Oster·sontag']]\n", - "\n", - "[['Ostersontag'], ['Oster·sontag']]\n", - "oi\n", - "[['Pizzagate'],['Pizza·gate']]\n", - "\n", - "[['Pizzagate'], ['Pizza·gate']]\n", - "oi\n", - "[['Antisemitismus'],['Anti·semitismus']]\n", - "\n", - "[['Antisemitismus'], ['Anti·semitismus']]\n", - "oi\n", - "[['Eiffelturm'],['Eiffel·turm']]\n", - "\n", - "[['Eiffelturm'], ['Eiffel·turm']]\n", - "oi\n", - "[['Fuehrungszeugnis'],['Fuehrungs·zeugnis']]\n", - "\n", - "[['Fuehrungszeugnis'], ['Fuehrungs·zeugnis']]\n", - "oi\n", - "[['Ostersonntag'],['Oster·sonntag']]\n", - "\n", - "[['Ostersonntag'], ['Oster·sonntag']]\n", - "oi\n", - "[['Alltagskleidung'],['Alltags·kleidung']]\n", - "\n", - "[['Alltagskleidung'], ['Alltags·kleidung']]\n", - "oi\n", - "[['Grosskatzen'],['Gross·katzen']]\n", - "\n", - "[['Grosskatzen'], ['Gross·katzen']]\n", - "oi\n", - "[['eingedrueckt'],['ein·gedrueckt']]\n", - "\n", - "[['eingedrueckt'], ['ein·gedrueckt']]\n", - "oi\n", - "[['weiterfahren'],['weiter·fahren']]\n", - "\n", - "[['weiterfahren'], ['weiter·fahren']]\n", - "oi\n", - "[['Computerprogramm'],['Computer·programm']]\n", - "\n", - "[['Computerprogramm'], ['Computer·programm']]\n", - "oi\n", - "[['ausleihen'],['aus·leihen']]\n", - "\n", - "[['ausleihen'], ['aus·leihen']]\n", - "oi\n", - "[['Versammlungshaus'],['Versammlungs·haus']]\n", - "\n", - "[['Versammlungshaus'], ['Versammlungs·haus']]\n", - "oi\n", - "[['Weiberfastnacht'],['Weiber·fast·nacht']]\n", - "\n", - "[['Weiberfastnacht'], ['Weiber·fast·nacht']]\n", - "oi\n", - "[['Grundkurs'],['Grund·kurs']]\n", - "\n", - "[['Grundkurs'], ['Grund·kurs']]\n", - "oi\n", - "[['zweitgroesste'],['zweit·groesste']]\n", - "\n", - "[['zweitgroesste'], ['zweit·groesste']]\n", - "oi\n", - "[['anhoeren'],['an·hoeren']]\n", - "\n", - "[['anhoeren'], ['an·hoeren']]\n", - "oi\n", - "[['Buchverlag'],['Buch·verlag']]\n", - "\n", - "[['Buchverlag'], ['Buch·verlag']]\n", - "oi\n", - "[['Ausserirdische'],['Ausser·irdische']]\n", - "\n", - "[['Ausserirdische'], ['Ausser·irdische']]\n", - "oi\n", - "[['Muelltonne'],['Muell·tonne']]\n", - "\n", - "[['Muelltonne'], ['Muell·tonne']]\n", - "oi\n", - "[['Sportarten'],['Sport·arten']]\n", - "\n", - "[['Sportarten'], ['Sport·arten']]\n", - "oi\n", - "[['Hausratversicherung'],['Haus·rat·versicherung']]\n", - "\n", - "[['Hausratversicherung'], ['Haus·rat·versicherung']]\n", - "oi\n", - "[['Geraeteturnen'],['Geraete·turnen']]\n", - "\n", - "[['Geraeteturnen'], ['Geraete·turnen']]\n", - "oi\n", - "[['Fruehlingsfest'],['Fruehlings·fest']]\n", - "\n", - "[['Fruehlingsfest'], ['Fruehlings·fest']]\n", - "oi\n", - "[['Buergergeld'],['Buerger·geld']]\n", - "\n", - "[['Buergergeld'], ['Buerger·geld']]\n", - "oi\n", - "[['abgesperrt'],['ab·gesperrt']]\n", - "\n", - "[['abgesperrt'], ['ab·gesperrt']]\n", - "oi\n", - "[['Rechtsextremimus'],['Rechts·extremimus']]\n", - "\n", - "[['Rechtsextremimus'], ['Rechts·extremimus']]\n", - "oi\n", - "[['Abrollschuh'],['Ab·roll·schuh']]\n", - "\n", - "[['Abrollschuh'], ['Ab·roll·schuh']]\n", - "oi\n", - "[['Bankkonto'],['Bank·konto']]\n", - "\n", - "[['Bankkonto'], ['Bank·konto']]\n", - "oi\n", - "[['Sportgeraet'],['Sport·geraet']]\n", - "\n", - "[['Sportgeraet'], ['Sport·geraet']]\n", - "oi\n", - "[['Rabenmutter'],['Raben·mutter']]\n", - "\n", - "[['Rabenmutter'], ['Raben·mutter']]\n", - "oi\n", - "[['Werkbank'],['Werk·bank']]\n", - "\n", - "[['Werkbank'], ['Werk·bank']]\n", - "oi\n", - "[['Spielzeug'],['Spiel·zeug']]\n", - "\n", - "[['Spielzeug'], ['Spiel·zeug']]\n", - "oi\n", - "[['unentgeltlich,'],['un·ent·geltlich,']]\n", - "\n", - "[['unentgeltlich,'], ['un·ent·geltlich,']]\n", - "oi\n", - "[['Restabfall'],['Rest·abfall']]\n", - "\n", - "[['Restabfall'], ['Rest·abfall']]\n", - "oi\n", - "[['Bildungsbuergertum'],['Bildungs·buerger·tum']]\n", - "\n", - "[['Bildungsbuergertum'], ['Bildungs·buerger·tum']]\n", - "oi\n", - "[['Erstaufnahmeeinrichtungen'],['Erst·aufnahme·einrichtungen']]\n", - "\n", - "[['Erstaufnahmeeinrichtungen'], ['Erst·aufnahme·einrichtungen']]\n", - "oi\n", - "[['Koerperorgan'],['Koerper·organ']]\n", - "\n", - "[['Koerperorgan'], ['Koerper·organ']]\n", - "oi\n", - "[['Haustiere'],['Haus·tiere']]\n", - "\n", - "[['Haustiere'], ['Haus·tiere']]\n", - "oi\n", - "[['Callcenter'],['Call·center']]\n", - "\n", - "[['Callcenter'], ['Call·center']]\n", - "oi\n", - "[['aufklappen'],['auf·klappen']]\n", - "\n", - "[['aufklappen'], ['auf·klappen']]\n", - "oi\n", - "[['Oberhaupt'],['Ober·haupt']]\n", - "\n", - "[['Oberhaupt'], ['Ober·haupt']]\n", - "oi\n", - "[['Umweltschutz'],['Umwelt·schutz']]\n", - "\n", - "[['Umweltschutz'], ['Umwelt·schutz']]\n", - "oi\n", - "[['Vorsorgevollmacht'],['Vorsorge·vollmacht']]\n", - "\n", - "[['Vorsorgevollmacht'], ['Vorsorge·vollmacht']]\n", - "oi\n", - "[['Fitnessgeraet'],['Fitness·geraet']]\n", - "\n", - "[['Fitnessgeraet'], ['Fitness·geraet']]\n", - "oi\n", - "[['Elterngeld'],['Eltern·geld']]\n", - "\n", - "[['Elterngeld'], ['Eltern·geld']]\n", - "oi\n", - "[['rundherum'],['rund·herum']]\n", - "\n", - "[['rundherum'], ['rund·herum']]\n", - "oi\n", - "[['Basketball'],['Basket·ball']]\n", - "\n", - "[['Basketball'], ['Basket·ball']]\n", - "oi\n", - "[['Bergwerk'],['Berg·werk']]\n", - "\n", - "[['Bergwerk'], ['Berg·werk']]\n", - "oi\n", - "[['Heimerzieher'],['Heim·erzieher']]\n", - "\n", - "[['Heimerzieher'], ['Heim·erzieher']]\n", - "oi\n", - "[['Bettelampel'],['Bettel·ampel']]\n", - "\n", - "[['Bettelampel'], ['Bettel·ampel']]\n", - "oi\n", - "[['Zeitverschiebung'],['Zeit·verschiebung']]\n", - "\n", - "[['Zeitverschiebung'], ['Zeit·verschiebung']]\n", - "oi\n", - "[['Fernsehserie'],['Fernseh·serie']]\n", - "\n", - "[['Fernsehserie'], ['Fernseh·serie']]\n", - "oi\n", - "[['Weltgesundheitsorganisation'],['Welt·gesundheits·organisation']]\n", - "\n", - "[['Weltgesundheitsorganisation'], ['Welt·gesundheits·organisation']]\n", - "oi\n", - "[['Konzerthaus'],['Konzert·haus']]\n", - "\n", - "[['Konzerthaus'], ['Konzert·haus']]\n", - "oi\n", - "[['Nachbarschaftshaus'],['Nachbarschafts·haus']]\n", - "\n", - "[['Nachbarschaftshaus'], ['Nachbarschafts·haus']]\n", - "oi\n", - "[['Sonnenlicht'],['Sonnen·licht']]\n", - "\n", - "[['Sonnenlicht'], ['Sonnen·licht']]\n", - "oi\n", - "[['Regierungsart'],['Regierungs·art']]\n", - "\n", - "[['Regierungsart'], ['Regierungs·art']]\n", - "oi\n", - "[['Brandwaffe'],['Brand·waffe']]\n", - "\n", - "[['Brandwaffe'], ['Brand·waffe']]\n", - "oi\n", - "[['Pflastersteine'],['Pflaster·steine']]\n", - "\n", - "[['Pflastersteine'], ['Pflaster·steine']]\n", - "oi\n", - "[['Glueckspilz'],['Gluecks·pilz']]\n", - "\n", - "[['Glueckspilz'], ['Gluecks·pilz']]\n", - "oi\n", - "[['Blocksberg'],['Blocks·berg']]\n", - "\n", - "[['Blocksberg'], ['Blocks·berg']]\n", - "oi\n", - "[['Selbstportraet'],['Selbst·portraet']]\n", - "\n", - "[['Selbstportraet'], ['Selbst·portraet']]\n", - "oi\n", - "[['alkoholsuechtig'],['alkohol·suechtig']]\n", - "\n", - "[['alkoholsuechtig'], ['alkohol·suechtig']]\n", - "oi\n", - "[['Zweifrontenkrieg'],['Zwei·fronten·krieg']]\n", - "\n", - "[['Zweifrontenkrieg'], ['Zwei·fronten·krieg']]\n", - "oi\n", - "[['Gesellschaftsform'],['Gesellschafts·form']]\n", - "\n", - "[['Gesellschaftsform'], ['Gesellschafts·form']]\n", - "oi\n", - "[['Fastnachtsbrauch'],['Fast·nachts·brauch']]\n", - "\n", - "[['Fastnachtsbrauch'], ['Fast·nachts·brauch']]\n", - "oi\n", - "[['Koerperkraft'],['Koerper·kraft']]\n", - "\n", - "[['Koerperkraft'], ['Koerper·kraft']]\n", - "oi\n", - "[['Geheimnummer'],['Geheim·nummer']]\n", - "\n", - "[['Geheimnummer'], ['Geheim·nummer']]\n", - "oi\n", - "[['Reizwaesche'],['Reiz·waesche']]\n", - "\n", - "[['Reizwaesche'], ['Reiz·waesche']]\n", - "oi\n", - "[['Bundespraesident'],['Bundes·praesident']]\n", - "\n", - "[['Bundespraesident'], ['Bundes·praesident']]\n", - "oi\n", - "[['Glasflasche'],['Glas·flasche']]\n", - "\n", - "[['Glasflasche'], ['Glas·flasche']]\n", - "oi\n", - "[['Schienbein'],['Schien·bein']]\n", - "\n", - "[['Schienbein'], ['Schien·bein']]\n", - "oi\n", - "[['Weltreich'],['Welt·reich']]\n", - "\n", - "[['Weltreich'], ['Welt·reich']]\n", - "oi\n", - "[['Muelltonnen'],['Muell·tonnen']]\n", - "\n", - "[['Muelltonnen'], ['Muell·tonnen']]\n", - "oi\n", - "[['Schienbeinschoner'],['Schien·bein·schoner']]\n", - "\n", - "[['Schienbeinschoner'], ['Schien·bein·schoner']]\n", - "oi\n", - "[['Koalitionsvertrag'],['Koalitions·vertrag']]\n", - "\n", - "[['Koalitionsvertrag'], ['Koalitions·vertrag']]\n", - "oi\n", - "[['Kampfarten'],['Kampf·arten']]\n", - "\n", - "[['Kampfarten'], ['Kampf·arten']]\n", - "oi\n", - "[['Asylantrag'],['Asyl·antrag']]\n", - "\n", - "[['Asylantrag'], ['Asyl·antrag']]\n", - "oi\n", - "[['mitbestimmen'],['mit·bestimmen']]\n", - "\n", - "[['mitbestimmen'], ['mit·bestimmen']]\n", - "oi\n", - "[['Niemandsland'],['Niemands·land']]\n", - "\n", - "[['Niemandsland'], ['Niemands·land']]\n", - "oi\n", - "[['Sprachregelung'],['Sprach·regelung']]\n", - "\n", - "[['Sprachregelung'], ['Sprach·regelung']]\n", - "oi\n", - "[['gelernt'],['ge·lernt']]\n", - "\n", - "[['gelernt'], ['ge·lernt']]\n", - "oi\n", - "[['Lebenshaltung'],['Lebens·haltung']]\n", - "\n", - "[['Lebenshaltung'], ['Lebens·haltung']]\n", - "oi\n", - "[['Bundesteilhabegesetz'],['Bundes·teilhabe·gesetz']]\n", - "\n", - "[['Bundesteilhabegesetz'], ['Bundes·teilhabe·gesetz']]\n", - "oi\n", - "[['Aquajogging'],['Aqua·jogging']]\n", - "\n", - "[['Aquajogging'], ['Aqua·jogging']]\n", - "oi\n", - "[['Ballermannsteuer'],['Baller·mann·steuer']]\n", - "\n", - "[['Ballermannsteuer'], ['Baller·mann·steuer']]\n", - "oi\n", - "[['Bananenschalen'],['Bananen·schalen']]\n", - "\n", - "[['Bananenschalen'], ['Bananen·schalen']]\n", - "oi\n", - "[['Volleyballspielerinnen'],['Volley·ball·spielerinnen']]\n", - "\n", - "[['Volleyballspielerinnen'], ['Volley·ball·spielerinnen']]\n", - "oi\n", - "[['gekocht'],['ge·kocht']]\n", - "\n", - "[['gekocht'], ['ge·kocht']]\n", - "oi\n", - "[['Radiosender'],['Radio·sender']]\n", - "\n", - "[['Radiosender'], ['Radio·sender']]\n", - "oi\n", - "[['Naturschutzgebiet'],['Natur·schutz·gebiet']]\n", - "\n", - "[['Naturschutzgebiet'], ['Natur·schutz·gebiet']]\n", - "oi\n", - "[['Zusammenleben'],['Zusammen·leben']]\n", - "\n", - "[['Zusammenleben'], ['Zusammen·leben']]\n", - "oi\n", - "[['Welternaehrungstag'],['Welt·ernaehrungs·tag']]\n", - "\n", - "[['Welternaehrungstag'], ['Welt·ernaehrungs·tag']]\n", - "oi\n", - "[['Ergotherapie'],['Ergo·therapie']]\n", - "\n", - "[['Ergotherapie'], ['Ergo·therapie']]\n", - "oi\n", - "[['Nachtisch'],['Nach·tisch']]\n", - "\n", - "[['Nachtisch'], ['Nach·tisch']]\n", - "oi\n", - "[['ausgeliehen'],['aus·geliehen']]\n", - "\n", - "[['ausgeliehen'], ['aus·geliehen']]\n", - "oi\n", - "[['Wuestenschiff'],['Wuesten·schiff']]\n", - "\n", - "[['Wuestenschiff'], ['Wuesten·schiff']]\n", - "oi\n", - "[['Herrschaftsform'],['Herrschafts·form']]\n", - "\n", - "[['Herrschaftsform'], ['Herrschafts·form']]\n", - "oi\n", - "[['Zeitdauer'],['Zeit·dauer']]\n", - "\n", - "[['Zeitdauer'], ['Zeit·dauer']]\n", - "oi\n", - "[['Erdoberflaeche'],['Erd·ober·flaeche']]\n", - "\n", - "[['Erdoberflaeche'], ['Erd·ober·flaeche']]\n", - "oi\n", - "[['gegeneinander'],['gegen·einander']]\n", - "\n", - "[['gegeneinander'], ['gegen·einander']]\n", - "oi\n", - "[['Bratwurst'],['Brat·wurst']]\n", - "\n", - "[['Bratwurst'], ['Brat·wurst']]\n", - "oi\n", - "[['Fruehschoppen'],['Frueh·schoppen']]\n", - "\n", - "[['Fruehschoppen'], ['Frueh·schoppen']]\n", - "oi\n", - "[['Verkehrsdaten'],['Verkehrs·daten']]\n", - "\n", - "[['Verkehrsdaten'], ['Verkehrs·daten']]\n", - "oi\n", - "[['Legitimationspapier'],['Legitimations·papier']]\n", - "\n", - "[['Legitimationspapier'], ['Legitimations·papier']]\n", - "oi\n", - "[['Personengruppe'],['Personen·gruppe']]\n", - "\n", - "[['Personengruppe'], ['Personen·gruppe']]\n", - "oi\n", - "[['Reichspogromnacht'],['Reichs·pogrom·nacht']]\n", - "\n", - "[['Reichspogromnacht'], ['Reichs·pogrom·nacht']]\n", - "oi\n", - "[['Zusatzprogramm'],['Zusatz·programm']]\n", - "\n", - "[['Zusatzprogramm'], ['Zusatz·programm']]\n", - "oi\n", - "[['Steuerflucht'],['Steuer·flucht']]\n", - "\n", - "[['Steuerflucht'], ['Steuer·flucht']]\n", - "oi\n", - "[['Sparbuch'],['Spar·buch']]\n", - "\n", - "[['Sparbuch'], ['Spar·buch']]\n", - "oi\n", - "[['Bundesversammlung'],['Bundes·versammlung']]\n", - "\n", - "[['Bundesversammlung'], ['Bundes·versammlung']]\n", - "oi\n", - "[['Geisterstadt'],['Geister·stadt']]\n", - "\n", - "[['Geisterstadt'], ['Geister·stadt']]\n", - "oi\n", - "[['auslachen'],['aus·lachen']]\n", - "\n", - "[['auslachen'], ['aus·lachen']]\n", - "oi\n", - "[['Wanderlust'],['Wander·lust']]\n", - "\n", - "[['Wanderlust'], ['Wander·lust']]\n", - "oi\n", - "[['Rathaus'],['Rat·haus']]\n", - "\n", - "[['Rathaus'], ['Rat·haus']]\n", - "oi\n", - "[['Erinnerungstag'],['Erinnerungs·tag']]\n", - "\n", - "[['Erinnerungstag'], ['Erinnerungs·tag']]\n", - "oi\n", - "[['mitlesen'],['mit·lesen']]\n", - "\n", - "[['mitlesen'], ['mit·lesen']]\n", - "oi\n", - "[['Stadtmauer'],['Stadt·mauer']]\n", - "\n", - "[['Stadtmauer'], ['Stadt·mauer']]\n", - "oi\n", - "[['Fuehrerscheintypen:'],['Fuehrer·schein·typen:']]\n", - "\n", - "[['Fuehrerscheintypen:'], ['Fuehrer·schein·typen:']]\n", - "oi\n", - "[['Zusatzwort'],['Zusatz·wort']]\n", - "\n", - "[['Zusatzwort'], ['Zusatz·wort']]\n", - "oi\n", - "[['Halbwissen'],['Halb·wissen']]\n", - "\n", - "[['Halbwissen'], ['Halb·wissen']]\n", - "oi\n", - "[['Bananenpflanze'],['Bananen·pflanze']]\n", - "\n", - "[['Bananenpflanze'], ['Bananen·pflanze']]\n", - "oi\n", - "[['Badeanzug'],['Bade·anzug']]\n", - "\n", - "[['Badeanzug'], ['Bade·anzug']]\n", - "oi\n", - "[['Mitteleuropa'],['Mittel·europa']]\n", - "\n", - "[['Mitteleuropa'], ['Mittel·europa']]\n", - "oi\n", - "[['Werkzeugmaschine'],['Werkzeug·maschine']]\n", - "\n", - "[['Werkzeugmaschine'], ['Werkzeug·maschine']]\n", - "oi\n", - "[['Stadtteil'],['Stadt·teil']]\n", - "\n", - "[['Stadtteil'], ['Stadt·teil']]\n", - "oi\n", - "[['Zeitnehmer'],['Zeit·nehmer']]\n", - "\n", - "[['Zeitnehmer'], ['Zeit·nehmer']]\n", - "oi\n", - "[['Aussenohr'],['Aussen·ohr']]\n", - "\n", - "[['Aussenohr'], ['Aussen·ohr']]\n", - "oi\n", - "[['Datenbank'],['Daten·bank']]\n", - "\n", - "[['Datenbank'], ['Daten·bank']]\n", - "oi\n", - "[['ausgetauscht'],['ausge·tauscht']]\n", - "\n", - "[['ausgetauscht'], ['ausge·tauscht']]\n", - "oi\n", - "[['Kuehlschrank'],['Kuehl·schrank']]\n", - "\n", - "[['Kuehlschrank'], ['Kuehl·schrank']]\n", - "oi\n", - "[['Fabelwesen'],['Fabel·wesen']]\n", - "\n", - "[['Fabelwesen'], ['Fabel·wesen']]\n", - "oi\n", - "[['aufschreiben'],['auf·schreiben']]\n", - "\n", - "[['aufschreiben'], ['auf·schreiben']]\n", - "oi\n", - "[['Texterkennungssoftware'],['Text·erkennungs·software']]\n", - "\n", - "[['Texterkennungssoftware'], ['Text·erkennungs·software']]\n", - "oi\n", - "[['Staatsgewalt'],['Staats·gewalt']]\n", - "\n", - "[['Staatsgewalt'], ['Staats·gewalt']]\n", - "oi\n", - "[['Sondierungsgespraech'],['Sondierungs·gespraech']]\n", - "\n", - "[['Sondierungsgespraech'], ['Sondierungs·gespraech']]\n", - "oi\n", - "[['Staatsbesuch'],['Staats·besuch']]\n", - "\n", - "[['Staatsbesuch'], ['Staats·besuch']]\n", - "oi\n", - "[['Telefondienst'],['Telefon·dienst']]\n", - "\n", - "[['Telefondienst'], ['Telefon·dienst']]\n", - "oi\n", - "[['Binomialkoeffizient'],['Bi·no·mi·al·ko·ef·fi·zi·ent']]\n", - "\n", - "[['Binomialkoeffizient'], ['Bi·no·mi·al·ko·ef·fi·zi·ent']]\n", - "oi\n", - "[['Redesab'],['Rede·sab']]\n", - "\n", - "[['Redesab'], ['Rede·sab']]\n", - "oi\n", - "[['Baumstamm'],['Baum·stamm']]\n", - "\n", - "[['Baumstamm'], ['Baum·stamm']]\n", - "oi\n", - "[['Energieberater'],['Energie·berater']]\n", - "\n", - "[['Energieberater'], ['Energie·berater']]\n", - "oi\n", - "[['Schadstoffe'],['Schad·stoffe']]\n", - "\n", - "[['Schadstoffe'], ['Schad·stoffe']]\n", - "oi\n", - "[['Computerspiele'],['Computer·spiele']]\n", - "\n", - "[['Computerspiele'], ['Computer·spiele']]\n", - "oi\n", - "[['Verbrechenskarte'],['Verbrechens·karte']]\n", - "\n", - "[['Verbrechenskarte'], ['Verbrechens·karte']]\n", - "oi\n", - "[['Volkshochschulen'],['Volks·hoch·schulen']]\n", - "\n", - "[['Volkshochschulen'], ['Volks·hoch·schulen']]\n", - "oi\n", - "[['Brailleschrift'],['Braille·schrift']]\n", - "\n", - "[['Brailleschrift'], ['Braille·schrift']]\n", - "oi\n", - "[['Raeuberpistole'],['Raeuber·pistole']]\n", - "\n", - "[['Raeuberpistole'], ['Raeuber·pistole']]\n", - "oi\n", - "[['(Steuergeld'],['(Steuer·geld']]\n", - "\n", - "[['(Steuergeld'], ['(Steuer·geld']]\n", - "oi\n", - "[['Modewort'],['Mode·wort']]\n", - "\n", - "[['Modewort'], ['Mode·wort']]\n", - "oi\n", - "[['Haustier'],['Haus·tier']]\n", - "\n", - "[['Haustier'], ['Haus·tier']]\n", - "oi\n", - "[['Gebuehrenbescheid'],['Gebuehren·bescheid']]\n", - "\n", - "[['Gebuehrenbescheid'], ['Gebuehren·bescheid']]\n", - "oi\n", - "[['Frauentag'],['Frauen·tag']]\n", - "\n", - "[['Frauentag'], ['Frauen·tag']]\n", - "oi\n", - "[['Gedenktag'],['Gedenk·tag']]\n", - "\n", - "[['Gedenktag'], ['Gedenk·tag']]\n", - "oi\n", - "[['mitgemacht'],['mit·gemacht']]\n", - "\n", - "[['mitgemacht'], ['mit·gemacht']]\n", - "oi\n", - "[['Wortvorschlag'],['Wort·vorschlag']]\n", - "\n", - "[['Wortvorschlag'], ['Wort·vorschlag']]\n", - "oi\n", - "[['Sonntag'],['Sonn·tag']]\n", - "\n", - "[['Sonntag'], ['Sonn·tag']]\n", - "oi\n", - "[['Holzwerkstatt'],['Holz·werkstatt']]\n", - "\n", - "[['Holzwerkstatt'], ['Holz·werkstatt']]\n", - "oi\n", - "[['Essensreste'],['Essens·reste']]\n", - "\n", - "[['Essensreste'], ['Essens·reste']]\n", - "oi\n", - "[['Uhrzeit'],['Uhr·zeit']]\n", - "\n", - "[['Uhrzeit'], ['Uhr·zeit']]\n", - "oi\n", - "[['Zeitabschnitt'],['Zeit·abschnitt']]\n", - "\n", - "[['Zeitabschnitt'], ['Zeit·abschnitt']]\n", - "oi\n", - "[['Oberkoerper'],['Ober·koerper']]\n", - "\n", - "[['Oberkoerper'], ['Ober·koerper']]\n", - "oi\n", - "[['Kirchenmitglieder'],['Kirchen·mitglieder']]\n", - "\n", - "[['Kirchenmitglieder'], ['Kirchen·mitglieder']]\n", - "oi\n", - "[['Online-Bezahldienst'],['Online-Bezahl·dienst']]\n", - "\n", - "[['Online-Bezahldienst'], ['Online-Bezahl·dienst']]\n", - "oi\n", - "[['untergehen'],['unter·gehen']]\n", - "\n", - "[['untergehen'], ['unter·gehen']]\n", - "oi\n", - "[['Abendland'],['Abend·land']]\n", - "\n", - "[['Abendland'], ['Abend·land']]\n", - "oi\n", - "[['Paretoprinzip'],['Pareto·prinzip']]\n", - "\n", - "[['Paretoprinzip'], ['Pareto·prinzip']]\n", - "oi\n", - "[['Surrealismus'],['Sur·realismus']]\n", - "\n", - "[['Surrealismus'], ['Sur·realismus']]\n", - "oi\n", - "[['Weltkindertag'],['Welt·kinder·tag']]\n", - "\n", - "[['Weltkindertag'], ['Welt·kinder·tag']]\n", - "oi\n", - "[['Wortart'],['Wort·art']]\n", - "\n", - "[['Wortart'], ['Wort·art']]\n", - "oi\n", - "[['Automatikuhr'],['Automatik·uhr']]\n", - "\n", - "[['Automatikuhr'], ['Automatik·uhr']]\n", - "oi\n", - "[['Maedchenname'],['Maedchen·name']]\n", - "\n", - "[['Maedchenname'], ['Maedchen·name']]\n", - "oi\n", - "[['Protestwahl'],['Protest·wahl']]\n", - "\n", - "[['Protestwahl'], ['Protest·wahl']]\n", - "oi\n", - "[['Hauskatze'],['Haus·katze']]\n", - "\n", - "[['Hauskatze'], ['Haus·katze']]\n", - "oi\n", - "[['Krankenversicherungskarte'],['Kranken·versicherungs·karte']]\n", - "\n", - "[['Krankenversicherungskarte'], ['Kranken·versicherungs·karte']]\n", - "oi\n", - "[['festmachen'],['fest·machen']]\n", - "\n", - "[['festmachen'], ['fest·machen']]\n", - "oi\n", - "[['Abfalltrennung'],['Abfall·trennung']]\n", - "\n", - "[['Abfalltrennung'], ['Abfall·trennung']]\n", - "oi\n", - "[['mitmacht'],['mit·macht']]\n", - "\n", - "[['mitmacht'], ['mit·macht']]\n", - "oi\n", - "[['Videospiele'],['Video·spiele']]\n", - "\n", - "[['Videospiele'], ['Video·spiele']]\n", - "oi\n", - "[['Parlamentspraesident'],['Parlaments·praesident']]\n", - "\n", - "[['Parlamentspraesident'], ['Parlaments·praesident']]\n", - "oi\n", - "[['Kommunikation'],['Kommu·nikation']]\n", - "\n", - "[['Kommunikation'], ['Kommu·nikation']]\n", - "oi\n", - "[['Fussgaenger'],['Fuss·gaenger']]\n", - "\n", - "[['Fussgaenger'], ['Fuss·gaenger']]\n", - "oi\n", - "[['Chefsache'],['Chef·sache']]\n", - "\n", - "[['Chefsache'], ['Chef·sache']]\n", - "oi\n", - "[['Elbphilharmonie'],['Elb·philharmonie']]\n", - "\n", - "[['Elbphilharmonie'], ['Elb·philharmonie']]\n", - "oi\n", - "[['Geburtstagsfeier'],['Geburtstags·feier']]\n", - "\n", - "[['Geburtstagsfeier'], ['Geburtstags·feier']]\n", - "oi\n", - "[['Obstsalat'],['Obst·salat']]\n", - "\n", - "[['Obstsalat'], ['Obst·salat']]\n", - "oi\n", - "[['Schachuhr'],['Schach·uhr']]\n", - "\n", - "[['Schachuhr'], ['Schach·uhr']]\n", - "oi\n", - "[['Abstimmung'],['Ab·stimmung']]\n", - "\n", - "[['Abstimmung'], ['Ab·stimmung']]\n", - "oi\n", - "[['Holzscheiben'],['Holz·scheiben']]\n", - "\n", - "[['Holzscheiben'], ['Holz·scheiben']]\n", - "oi\n", - "[['Buergeramt'],['Buerger·amt']]\n", - "\n", - "[['Buergeramt'], ['Buerger·amt']]\n", - "oi\n", - "[['Bleistift'],['Blei·stift']]\n", - "\n", - "[['Bleistift'], ['Blei·stift']]\n", - "oi\n", - "[['Proxyserver'],['Proxy·server']]\n", - "\n", - "[['Proxyserver'], ['Proxy·server']]\n", - "oi\n", - "[['Bundestag'],['Bundes·tag']]\n", - "\n", - "[['Bundestag'], ['Bundes·tag']]\n", - "oi\n", - "[['Kochrezept'],['Koch·rezept']]\n", - "\n", - "[['Kochrezept'], ['Koch·rezept']]\n", - "oi\n", - "[['Staatsbuergerschaft'],['Staats·buerger·schaft']]\n", - "\n", - "[['Staatsbuergerschaft'], ['Staats·buerger·schaft']]\n", - "oi\n", - "[['Strohmann'],['Stroh·mann']]\n", - "\n", - "[['Strohmann'], ['Stroh·mann']]\n", - "oi\n", - "[['Besatzungszone'],['Besatzungs·zone']]\n", - "\n", - "[['Besatzungszone'], ['Besatzungs·zone']]\n", - "oi\n", - "[['Suedamerikaner'],['Sued·amerikaner']]\n", - "\n", - "[['Suedamerikaner'], ['Sued·amerikaner']]\n", - "oi\n", - "[['Beachvolleyballspielerinnen'],['Beach·volley·ball·spielerinnen']]\n", - "\n", - "[['Beachvolleyballspielerinnen'], ['Beach·volley·ball·spielerinnen']]\n", - "oi\n", - "[['Ebolafieber'],['Ebola·fieber']]\n", - "\n", - "[['Ebolafieber'], ['Ebola·fieber']]\n", - "oi\n", - "[['anrufen'],['an·rufen']]\n", - "\n", - "[['anrufen'], ['an·rufen']]\n", - "oi\n", - "[['Gluecksgefuehl'],['Gluecks·gefuehl']]\n", - "\n", - "[['Gluecksgefuehl'], ['Gluecks·gefuehl']]\n", - "oi\n", - "[['Bundestagswahl'],['Bundestags·wahl']]\n", - "\n", - "[['Bundestagswahl'], ['Bundestags·wahl']]\n", - "oi\n", - "[['Schreibzeichen'],['Schreib·zeichen']]\n", - "\n", - "[['Schreibzeichen'], ['Schreib·zeichen']]\n", - "oi\n", - "[['Woerterbuecher'],['Woerter·buecher']]\n", - "\n", - "[['Woerterbuecher'], ['Woerter·buecher']]\n", - "oi\n", - "[['Nacktscanner'],['Nackt·scanner']]\n", - "\n", - "[['Nacktscanner'], ['Nackt·scanner']]\n", - "oi\n", - "[['Rosenmontag'],['Rosen·montag']]\n", - "\n", - "[['Rosenmontag'], ['Rosen·montag']]\n", - "oi\n", - "[['Sicherheitsmethode'],['Sicherheits·methode']]\n", - "\n", - "[['Sicherheitsmethode'], ['Sicherheits·methode']]\n", - "oi\n", - "[['Sternschnuppen'],['Stern·schnuppen']]\n", - "\n", - "[['Sternschnuppen'], ['Stern·schnuppen']]\n", - "oi\n", - "[['Werktag'],['Werk·tag']]\n", - "\n", - "[['Werktag'], ['Werk·tag']]\n", - "oi\n", - "[['Gruenschnitt'],['Gruen·schnitt']]\n", - "\n", - "[['Gruenschnitt'], ['Gruen·schnitt']]\n", - "oi\n", - "[['Geburtstag'],['Geburts·tag']]\n", - "\n", - "[['Geburtstag'], ['Geburts·tag']]\n", - "oi\n", - "[['Stadtverwaltung'],['Stadt·verwaltung']]\n", - "\n", - "[['Stadtverwaltung'], ['Stadt·verwaltung']]\n", - "oi\n", - "[['Arbeitsweise'],['Arbeits·weise']]\n", - "\n", - "[['Arbeitsweise'], ['Arbeits·weise']]\n", - "oi\n", - "[['Simultanschach'],['Simultan·schach']]\n", - "\n", - "[['Simultanschach'], ['Simultan·schach']]\n", - "oi\n", - "[['hineinlegen'],['hinein·legen']]\n", - "\n", - "[['hineinlegen'], ['hinein·legen']]\n", - "oi\n", - "[['Strafrecht'],['Straf·recht']]\n", - "\n", - "[['Strafrecht'], ['Straf·recht']]\n", - "oi\n", - "[['Mogelpackung'],['Mogel·packung']]\n", - "\n", - "[['Mogelpackung'], ['Mogel·packung']]\n", - "oi\n", - "[['Kettenstemmer'],['Ketten·stemmer']]\n", - "\n", - "[['Kettenstemmer'], ['Ketten·stemmer']]\n", - "oi\n", - "[['Deckname'],['Deck·name']]\n", - "\n", - "[['Deckname'], ['Deck·name']]\n", - "oi\n", - "[['Bioabfalltonne'],['Bio·abfall·tonne']]\n", - "\n", - "[['Bioabfalltonne'], ['Bio·abfall·tonne']]\n", - "oi\n", - "[['Eierkennzeichnung'],['Eier·kennzeichnung']]\n", - "\n", - "[['Eierkennzeichnung'], ['Eier·kennzeichnung']]\n", - "oi\n", - "[['Kunststuecke'],['Kunst·stuecke']]\n", - "\n", - "[['Kunststuecke'], ['Kunst·stuecke']]\n", - "oi\n", - "[['Unfallversicherung'],['Unfall·versicherung']]\n", - "\n", - "[['Unfallversicherung'], ['Unfall·versicherung']]\n", - "oi\n", - "[['Tierprodukte'],['Tier·produkte']]\n", - "\n", - "[['Tierprodukte'], ['Tier·produkte']]\n", - "oi\n", - "[['Weltumweltkonferenz'],['Welt·umwelt·konferenz']]\n", - "\n", - "[['Weltumweltkonferenz'], ['Welt·umwelt·konferenz']]\n", - "oi\n", - "[['Secondhandladen'],['Second·hand·laden']]\n", - "\n", - "[['Secondhandladen'], ['Second·hand·laden']]\n", - "oi\n", - "[['Staatsbuerger'],['Staats·buerger']]\n", - "\n", - "[['Staatsbuerger'], ['Staats·buerger']]\n", - "oi\n", - "[['Zeitvertreib'],['Zeit·vertreib']]\n", - "\n", - "[['Zeitvertreib'], ['Zeit·vertreib']]\n", - "oi\n", - "[['Wohnzimmer'],['Wohn·zimmer']]\n", - "\n", - "[['Wohnzimmer'], ['Wohn·zimmer']]\n", - "oi\n", - "[['Trinkwasser'],['Trink·wasser']]\n", - "\n", - "[['Trinkwasser'], ['Trink·wasser']]\n", - "oi\n", - "[['Fahrgeschaefte'],['Fahr·geschaefte']]\n", - "\n", - "[['Fahrgeschaefte'], ['Fahr·geschaefte']]\n", - "oi\n", - "[['Kleidungsstueck'],['Kleidungs·stueck']]\n", - "\n", - "[['Kleidungsstueck'], ['Kleidungs·stueck']]\n", - "oi\n", - "[['wegmacht'],['weg·macht']]\n", - "\n", - "[['wegmacht'], ['weg·macht']]\n", - "oi\n", - "[['Fuehrerschein'],['Fuehrer·schein']]\n", - "\n", - "[['Fuehrerschein'], ['Fuehrer·schein']]\n", - "oi\n", - "[['festhalten'],['fest·halten']]\n", - "\n", - "[['festhalten'], ['fest·halten']]\n", - "oi\n", - "[['Radfahrern'],['Rad·fahrern']]\n", - "\n", - "[['Radfahrern'], ['Rad·fahrern']]\n", - "oi\n", - "[['Roboterwettbewerb'],['Roboter·wettbewerb']]\n", - "\n", - "[['Roboterwettbewerb'], ['Roboter·wettbewerb']]\n", - "oi\n", - "[['Abendkleid'],['Abend·kleid']]\n", - "\n", - "[['Abendkleid'], ['Abend·kleid']]\n", - "oi\n", - "[['Schalttag'],['Schalt·tag']]\n", - "\n", - "[['Schalttag'], ['Schalt·tag']]\n", - "oi\n", - "[['Sondierungsgespraeche'],['Sondierungs·gespraeche']]\n", - "\n", - "[['Sondierungsgespraeche'], ['Sondierungs·gespraeche']]\n", - "oi\n", - "[['Software'],['Soft·ware']]\n", - "\n", - "[['Software'], ['Soft·ware']]\n", - "oi\n", - "[['Funkempfang'],['Funk·empfang']]\n", - "\n", - "[['Funkempfang'], ['Funk·empfang']]\n", - "oi\n", - "[['Bevoelkerungsgruppen'],['Bevoelkerungs·gruppen']]\n", - "\n", - "[['Bevoelkerungsgruppen'], ['Bevoelkerungs·gruppen']]\n", - "oi\n", - "[['Brieftraegerkissen'],['Brief·traeger·kissen']]\n", - "\n", - "[['Brieftraegerkissen'], ['Brief·traeger·kissen']]\n", - "oi\n", - "[['Filmpreis'],['Film·preis']]\n", - "\n", - "[['Filmpreis'], ['Film·preis']]\n", - "oi\n", - "[['Fahrgemeinschaft'],['Fahr·gemeinschaft']]\n", - "\n", - "[['Fahrgemeinschaft'], ['Fahr·gemeinschaft']]\n", - "oi\n", - "[['Bundespressekonferenz'],['Bundes·presse·konferenz']]\n", - "\n", - "[['Bundespressekonferenz'], ['Bundes·presse·konferenz']]\n", - "oi\n", - "[['Informationsaustausch'],['Informations·austausch']]\n", - "\n", - "[['Informationsaustausch'], ['Informations·austausch']]\n", - "oi\n", - "[['Empfangstresen:'],['Empfangs·tresen:']]\n", - "\n", - "[['Empfangstresen:'], ['Empfangs·tresen:']]\n", - "oi\n", - "[['Fremdsprachen'],['Fremd·sprachen']]\n", - "\n", - "[['Fremdsprachen'], ['Fremd·sprachen']]\n", - "oi\n", - "[['Politiksystem'],['Politik·system']]\n", - "\n", - "[['Politiksystem'], ['Politik·system']]\n", - "oi\n", - "[['Interdisziplinaer'],['In·ter·dis·zi·pli·naer']]\n", - "\n", - "[['Interdisziplinaer'], ['In·ter·dis·zi·pli·naer']]\n", - "oi\n", - "[['Vorratsdatenspeicherung'],['Vorrats·daten·speicherung']]\n", - "\n", - "[['Vorratsdatenspeicherung'], ['Vorrats·daten·speicherung']]\n", - "oi\n", - "[['Oberbuergermeister'],['Ober·buerger·meister']]\n", - "\n", - "[['Oberbuergermeister'], ['Ober·buerger·meister']]\n", - "creating the hkl dump of MedioDBAll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "done..\n", - "Creating the hkl dump of MedioDB 1\n", - "Creating the hkl dump of MedioDB 2\n" - ] - }, - { - "data": { - "text/plain": [ - "'done'" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "#medi.create_hklDB_from_csv('mediowords.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": [ - "medi.load_DB_into_FASTsearch()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "sentences = [['das', 'ist', 'Kindersprache'],['er', 'ging', 'über', 'die', 'Straße'], ['halt', 'ab', 'hier']]\n", - "punctuations = ['.', '!', '.']" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "mediosofsentence ['das', 'ist', 'Kindersprache']\n" - ] - }, - { - "ename": "AttributeError", - "evalue": "'Medio' object has no attribute 'hkldbFremd_WB1'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0moutsentences\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpunctuations\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmedi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mMedioreplace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msentences\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpunctuations\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/ProjektA/PrototypeWebApp/Prototyp/Medio.py\u001b[0m in \u001b[0;36mMedioreplace\u001b[0;34m(self, sentences, punctuations)\u001b[0m\n\u001b[1;32m 129\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 130\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 131\u001b[0;31m \u001b[0mmedio\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhkldbFremd_WB1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mmatchindex2\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msplit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 132\u001b[0m \u001b[0mmedioeintrag\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhkldbFremd_WB2\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mmatchindex2\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msplit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Medio' object has no attribute 'hkldbFremd_WB1'" - ] - } - ], - "source": [ - "outsentences, punctuations = medi.Medioreplace(sentences, punctuations)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(outsentences, punctuations)" - ] - }, - { - "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 -} diff --git a/build/rust-proto-fastapi-server/Prototyp/run.bash b/build/rust-proto-fastapi-server/Prototyp/run.bash deleted file mode 100644 index 7890d4f..0000000 --- a/build/rust-proto-fastapi-server/Prototyp/run.bash +++ /dev/null @@ -1,4 +0,0 @@ - - - -python aye.py