{ "cells": [ { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\foersterflorian\\AppData\\Local\\Temp\\ipykernel_22040\\126296594.py:3: DeprecationWarning: \n", "Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),\n", "(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)\n", "but was not found to be installed on your system.\n", "If this would cause problems for you,\n", "please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466\n", " \n", " import pandas as pd\n" ] } ], "source": [ "from symspellpy import SymSpell, Verbosity\n", "from itertools import islice\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "sym_spell = SymSpell()" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [], "source": [ "DICT_PATH = './de_DE.txt'\n", "DICT_PATH_2 = './deu_news_2023_1M-words.txt'" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(DICT_PATH_2, sep='\t', header=None)" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | 1 | \n", "2 | \n", "
|---|---|---|
| 0 | \n", "\n", " | \n", " |
| 1 | \n", "! | \n", "13183 | \n", "
| 2 | \n", "\\t99542\\n4\\t$\\t244\\n5\\t%\\t1310\\n6\\t&\\t1970\\n7\\... | \n", "10108 | \n", "
| 250 | \n", "ins | \n", "10012 | \n", "
| 251 | \n", "da | \n", "9868 | \n", "
| 252 | \n", "sagt | \n", "9634 | \n", "
| ... | \n", "... | \n", "... | \n", "
| 759746 | \n", "übergeben | \n", "1 | \n", "
| 759747 | \n", "überhaupt | \n", "1 | \n", "
| 759748 | \n", "überwältigt | \n", "1 | \n", "
| 759749 | \n", "üppige | \n", "1 | \n", "
| 759750 | \n", "ausweiten | \n", "1 | \n", "
759503 rows × 2 columns
\n", "