{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "#with open(\"~/Desktop/Regina Phalange/circumstance/movy/Persian/Tajiki/Farhangi-tafsirii/bycolumns/farhang-linear-normalized.txt\",\"r\") as fin:\n",
    "with open(\"bycolumns/farhang-linear-normalized.txt\",\"r\") as fin:\n",
    "    full=fin.read()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re\n",
    "def iscyr(word):\n",
    "    if len(word)==0:\n",
    "        return False\n",
    "    return word[0] in \"ACDEILSTVXY_abcdefghijklmnoprstuvwxyzĤπЁЃІЇЉЊЌЎАБВГДЕЖЗИЙКЛМНОПРСТУФХЧШЪЭЮЯабвгдежзийклмнопрстуфхцчшщъьэюяёѓїљњќўғҚқҲҳҷӢӣӯ\"\n",
    "def isarab(word):\n",
    "    if len(word)==0:\n",
    "        return False\n",
    "    return word[0] in \"Ĥءآأؤإئابةتثجحخدذرزسشصضطظعغفقلمنهوىپچژکگی۰۱۲۳۴۵۶۷۸۹ﭐﭗﭘﭙﭻﭼﭽﮋﮐﮓﮔﮕﱠﷲﺀﺄﺆﺊﺋﺌﺎﺐﺑﺒﺓﺔﺖﺗﺘﺚﺛﺜﺞﺟﺠﺢﺣﺤﺦﺧﺨﺪﺬﺮﺰﺲﺳﺴﺶﺷﺸﺺﺻﺼﺾﺿﻀﻂﻃﻄﻆﻇﻈﻊﻋﻌﻎﻏﻐﻒﻓﻔﻖﻗﻘﻚﻛﻜﻞﻟﻠﻢﻣﻤﻦﻧﻨﻩﻪﻫﻬﻮﻰﻲﻳﻴﻵﻶﻸﻻﻼ\"\n",
    "def normalizearab(word):\n",
    "    txt=word\n",
    "    txt=re.sub(\"[ﺂĤ]\",\"آ\",txt)\n",
    "    txt=re.sub(\"[ﭗﭘﭙ]\",\"پ\",txt)\n",
    "    txt=re.sub(\"[ﭻﭼﭽ]\",\"چ\",txt)\n",
    "    txt=re.sub(\"[ﮋ]\",\"ژ\",txt)\n",
    "    txt=re.sub(\"[كﮑﮏﮐ]\",\"ک\",txt)\n",
    "    txt=re.sub(\"[ﮓﮔﮕﱠ]\",\"گ\",txt)\n",
    "    txt=re.sub(\"[ﺀ]\",\"ء\",txt)\n",
    "    txt=re.sub(\"[ﺄ]\",\"أ\",txt)\n",
    "    txt=re.sub(\"[ﺆ]\",\"ؤ\",txt)\n",
    "    txt=re.sub(\"[ﺊﺋﺌ]\",\"ئ\",txt)\n",
    "    txt=re.sub(\"[ﮥ]\",\"هٔ\",txt)\n",
    "    txt=re.sub(\"[ﺎ]\",\"ا\",txt)\n",
    "    txt=re.sub(\"[ﺐﺑﺒ]\",\"ب\",txt)\n",
    "    txt=re.sub(\"[ﺓﺔ]\",\"‭ة\",txt)\n",
    "    txt=re.sub(\"[ﺖﺗﺘ]\",\"ت\",txt)\n",
    "    txt=re.sub(\"[ﺚﺛﺜ]\",\"ث\",txt)\n",
    "    txt=re.sub(\"[ﺞﺟﺠ]\",\"ج\",txt)\n",
    "    txt=re.sub(\"[ﺢﺣﺤ]\",\"ح\",txt)\n",
    "    txt=re.sub(\"[ﺦﺧﺨ]\",\"خ\",txt)\n",
    "    txt=re.sub(\"[ﺪ]\",\"د\",txt)\n",
    "    txt=re.sub(\"[ﺬ]\",\"ذ\",txt)\n",
    "    txt=re.sub(\"[ﺮ]\",\"ر\",txt)\n",
    "    txt=re.sub(\"[ﺰ]\",\"ز\",txt)\n",
    "    txt=re.sub(\"[ﺲﺳﺴ]\",\"س\",txt)\n",
    "    txt=re.sub(\"[ﺶﺷﺸ]\",\"ش\",txt)\n",
    "    txt=re.sub(\"[ﺺﺻﺼ]\",\"ص\",txt)\n",
    "    txt=re.sub(\"[ﺾﺿﻀ]\",\"ض\",txt)\n",
    "    txt=re.sub(\"[ﻁﻂﻃﻄ]\",\"ط\",txt)\n",
    "    txt=re.sub(\"[ﻆﻇﻈ]\",\"ظ\",txt)\n",
    "    txt=re.sub(\"[ﻊﻋﻌ]\",\"ع\",txt)\n",
    "    txt=re.sub(\"[ﻎﻏﻐ]\",\"غ\",txt)\n",
    "    txt=re.sub(\"[ﻒﻓﻔ]\",\"ف\",txt)\n",
    "    txt=re.sub(\"[ﻖﻗﻘ]\",\"ق\",txt)\n",
    "    txt=re.sub(\"[ﻚﻛﻜ]\",\"ک\",txt)\n",
    "    txt=re.sub(\"[ﻞﻟﻠ]\",\"ل\",txt)\n",
    "    txt=re.sub(\"[ﻢﻣﻤ]\",\"م\",txt)\n",
    "    txt=re.sub(\"[ﻦﻧﻨ]\",\"ن\",txt)\n",
    "    txt=re.sub(\"[ﻩﻪﻫﻬ]\",\"ه\",txt)\n",
    "    txt=re.sub(\"[ﻮ]\",\"و\",txt)\n",
    "    txt=re.sub(\"[ﻰﻲﻳﻴﯾﯿﯽ]\",\"ي\",txt)\n",
    "    txt=re.sub(\"[ﻵﻶ]\",\"لآ\",txt)\n",
    "    txt=re.sub(\"[ﻸ]\",\"لأ\",txt)\n",
    "    txt=re.sub(\"[ﻻﻼ]\",\"لا\",txt)\n",
    "    return txt\n",
    "\n",
    "def normalizecyr(word):\n",
    "    txt=word\n",
    "    txt=re.sub(\"Ї\",\"Ӣ\",txt)\n",
    "    txt=re.sub(\"ї\",\"ӣ\",txt)\n",
    "    txt=re.sub(\"Ў\",\"Ӯ\",txt)\n",
    "    txt=re.sub(\"ў\",\"ӯ\",txt)\n",
    "    txt=re.sub(\"Љ\",\"Ҷ\",txt)\n",
    "    txt=re.sub(\"љ\",\"ҷ\",txt)\n",
    "    txt=re.sub(\"Њ\",\"Ҳ\",txt)\n",
    "    txt=re.sub(\"њ\",\"ҳ\",txt)\n",
    "    txt=re.sub(\"Ѓ\",\"Ғ\",txt)\n",
    "    txt=re.sub(\"ѓ\",\"ғ\",txt)\n",
    "    txt=re.sub(\"Ќ\",\"Қ\",txt)\n",
    "    txt=re.sub(\"ќ\",\"қ\",txt)\n",
    "    return txt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "full = normalizearab(full)\n",
    "full = normalizecyr(full)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "#with open(\"Desktop/Regina Phalange/circumstance/movy/Persian/Tajiki/Farhangi-tafsirii/dicion/arab.txt\",\"w\") as fin:\n",
    "with open(\"bycolumns/farhang-linear-normalized.txt\",\"w\") as fin:\n",
    "    fin.write(full)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n\\x0c (),-./0123456789:IV\\\\cІАОХабвгдежзийклмнопрстуфхчшъэюяёғқҳҷӣӯ،ءآأؤئابةتثجحخدذرزسشصضطظعغفقلمنهوىئًٍَُِّپچژکگ–\\u202a\\u202b\\u202c\\u202d\\ue820\\ue821\\ue823\\ue825\\ue826\\ue828\\ue82cﷲﹰ'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Check\n",
    "import pandas as pd\n",
    "from collections import Counter \n",
    "res = Counter(full)\n",
    "\"\".join(sorted(list(dict(res).keys())))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "EOL while scanning string literal (<ipython-input-123-bf3d94781975>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  File \u001b[0;32m\"<ipython-input-123-bf3d94781975>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m    re.findall(\"\\n\u001b[0m\n\u001b[0m                  ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m EOL while scanning string literal\n"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "552\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "['ОБ\\n\\n-6',\n",
       " 'ОБГ\\n\\n-8',\n",
       " 'ПАД\\n\\n-52',\n",
       " 'ПАЗ\\n\\n-54',\n",
       " 'ПАЙ\\n\\n-56',\n",
       " 'ПАЙ\\n\\n-58',\n",
       " 'ПАЙ\\n\\n-60',\n",
       " 'ПАЛ\\n\\n-62',\n",
       " 'ПАН\\n\\n-64',\n",
       " 'ПАН\\n\\n-66']"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ex1=re.findall(\"[ЁІАБВГДЕЖЗИЙКЛМНОПРСТУФХЧШЪЭЮЯҒҚҲҶӢӮ]{1,3}\\n\\n-[0-9]{1,4}\",full)\n",
    "print(len(ex1))\n",
    "ex1[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "45601\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "['А ',\n",
       " 'А ',\n",
       " 'АБ ',\n",
       " 'АБАВАЙН ',\n",
       " 'АБАВИЯТ ',\n",
       " 'АБАВӢ ',\n",
       " 'АБАВОН ',\n",
       " 'АБАД ',\n",
       " 'АБАДА ',\n",
       " 'АБАДАН ',\n",
       " 'АБАДЗИНДА ',\n",
       " 'АБАДИЯТ ',\n",
       " 'АБАДӢ ',\n",
       " 'АБАДУДДАҲР ',\n",
       " 'АБАДУЛАБАД ',\n",
       " 'АБАДУЛОБИДИН ',\n",
       " 'АБАДУЛОБОД ',\n",
       " 'АБАР ',\n",
       " 'АБАРҚУДРАТ ',\n",
       " 'АБАРҚУДРАТӢ ',\n",
       " 'АБАРМАРД ',\n",
       " 'АБАС ',\n",
       " 'І ',\n",
       " 'АБАС ',\n",
       " 'АББОС ',\n",
       " 'АББОСИЁН ',\n",
       " 'АББОСИЯ ',\n",
       " 'АББОСӢ ',\n",
       " 'АББОСӢ ',\n",
       " 'АБГОР ',\n",
       " 'АБД ',\n",
       " 'АБДОЛ ',\n",
       " 'АБЕ ',\n",
       " 'АБКАМ ',\n",
       " 'АБЛАҚ ',\n",
       " 'АБЛАҚӢ ',\n",
       " 'АБЛАҲ ',\n",
       " 'АБЕРА ',\n",
       " 'АБЕША ',\n",
       " 'АБЁТ ',\n",
       " 'АБЗОЛ ',\n",
       " 'АБЗОР ',\n",
       " 'АБЗОРДОН ',\n",
       " 'АБЗОРСОЗ ',\n",
       " 'АБЗОРСОЗӢ ',\n",
       " 'АБИР ',\n",
       " 'АБИРАФШОН ',\n",
       " 'АБИРФИШОН ',\n",
       " 'АБЕДОНИШ ',\n",
       " 'АБИРСИРИШТ ',\n",
       " 'АБЛАҒ ',\n",
       " 'АБГОРӢ ',\n",
       " 'АБЗОРФУРӮШӢ ',\n",
       " 'АБИРОМЕЗ ',\n",
       " 'АБҚАРӢ ',\n",
       " 'АБВОБ ',\n",
       " 'АБЛАҲНАМО ',\n",
       " 'АБЛАҲФИРЕБ ',\n",
       " 'АБЛАҲФИРЕБӢ ',\n",
       " 'АБНО ',\n",
       " 'АБО ',\n",
       " 'АБО ',\n",
       " 'АБО ',\n",
       " 'АБОБИЛ ',\n",
       " 'АБР ',\n",
       " 'АБР ',\n",
       " 'АБР ',\n",
       " 'АБРА ',\n",
       " 'АБРААСТАР ',\n",
       " 'АБРАҚ ',\n",
       " 'АБРАҚӢ ',\n",
       " 'АБРАНДУД ',\n",
       " 'АБРАНҶИН ',\n",
       " 'АБРАС ',\n",
       " 'АБРАШ ',\n",
       " 'АБРГИРИФТА ',\n",
       " 'АБРДОР ',\n",
       " 'АБРЕШУМ ',\n",
       " 'АБРЕШИМБАҲО ',\n",
       " 'АБРЕШИМБОРӢ ',\n",
       " 'АБРЕШИМБОФ ',\n",
       " 'АБРЕШИМВОР ',\n",
       " 'АБРЕШИМВОРӢ ',\n",
       " 'АБРЕШИМДӮЗ ',\n",
       " 'АБРЕШИМДӮЗӢ ',\n",
       " 'АБРЕШИМИН ',\n",
       " 'АБРЕШИМӢ ',\n",
       " 'АБРЕШИМКАШӢ ',\n",
       " 'АБРЕШИМКОР ',\n",
       " 'АБРБАНД ',\n",
       " 'АБРЕШИМКОРӢ ',\n",
       " 'АБРБАНДӢ ',\n",
       " 'АБРЕШИММОНАНД ',\n",
       " 'АБРЕШИМРАНГ ',\n",
       " 'АБРЕШИМРЕСӢ ',\n",
       " 'АБРЕШИМТОБ ',\n",
       " 'АБРЕШИМТОБӢ ',\n",
       " 'АБРӢ ',\n",
       " 'АБРНОГУЗАР ',\n",
       " 'АБРНОК ',\n",
       " 'АБРНОКӢ ',\n",
       " 'АБРОЛУД ',\n",
       " 'АБРОЛУДА ',\n",
       " 'АБРОР ',\n",
       " 'АБРПОРА ',\n",
       " 'АБРТӮДА ',\n",
       " 'АБРӮЙ ',\n",
       " 'АБРӮБОРИК ',\n",
       " 'АБРӮДАРОЗ ',\n",
       " 'АБРӮКАМОН ',\n",
       " 'АБРӮКУШОДА ',\n",
       " 'АБРӮКУШОДАГӢ ',\n",
       " 'АБРӮПАЙВАСТ ',\n",
       " 'АБРӮСИЁҲ ',\n",
       " 'АБРӮФАРОХ ',\n",
       " 'АБРӮФАРОХӢ ',\n",
       " 'АБРӮҲИЛОЛ ',\n",
       " 'АБРӮЧИНАК ',\n",
       " 'АБРӮЧИНӢ ',\n",
       " 'АБСОРБСИЯ ',\n",
       " 'АБСТРАКТ ',\n",
       " 'АБСТРАКТСИОНИЗМ ',\n",
       " 'АБСТРАКТСИОНИСТ ',\n",
       " 'АБСТРАКТСИЯ ',\n",
       " 'АБСТРАКТӢ ',\n",
       " 'АБТАР ',\n",
       " 'АБУЛБАШАР ',\n",
       " 'АБУЛҲАВЛ ',\n",
       " 'АБУС ',\n",
       " 'АБХОЗӢ ',\n",
       " 'АБҲАР ',\n",
       " 'АБҲАРӢ ',\n",
       " 'АБҶАД ',\n",
       " 'АБҶАДХОН ',\n",
       " 'АБҶАДХОНӢ ',\n",
       " 'АБҶИР ',\n",
       " 'АБЪАД ',\n",
       " 'АБЪОД ',\n",
       " 'АБЯЗ ',\n",
       " 'АВ ',\n",
       " 'АВАСТО ',\n",
       " 'АВАСТОӢ ',\n",
       " 'АВБОРИДАН ',\n",
       " 'АВБОШ ',\n",
       " 'АВБОШОНА ',\n",
       " 'АВВАЛ ',\n",
       " 'АВВАЛАН ',\n",
       " 'АВВАЛИНДАРАҶА ',\n",
       " 'АВВАЛИЯ ',\n",
       " 'АВВАЛӢ ',\n",
       " 'АВВАЛМАҚОМ ',\n",
       " 'АВВАЛО ',\n",
       " 'АВВАЛҲО ',\n",
       " 'АВВАЛШАХС ',\n",
       " 'АВВО ',\n",
       " 'АВГУСТ ',\n",
       " 'АВД ',\n",
       " 'АВЕСТО ',\n",
       " 'АВЗОЪ ',\n",
       " 'АВИА ',\n",
       " 'АВИАТСИОНӢ ',\n",
       " 'АВИАТСИЯ ',\n",
       " 'АВИС ',\n",
       " 'АВИТАМИНОЗ ',\n",
       " 'АВҚОТ ',\n",
       " 'АВҚОТ ',\n",
       " 'АВҚОТПАЗӢ ',\n",
       " 'АВҚОТТАЛХ ',\n",
       " 'АВҚОТХӮРӢ ',\n",
       " 'АВҚОФ ',\n",
       " 'АВЛ ',\n",
       " 'АВЛ ',\n",
       " 'АВЛАВИЯТ ',\n",
       " 'АВЛИЁ ',\n",
       " 'АВЛИТАР ',\n",
       " 'АВЛО ',\n",
       " 'АВЛОД ',\n",
       " 'АВЛОДӢ ',\n",
       " 'АВОИЛ ',\n",
       " 'АВОҚИБ ',\n",
       " 'АВОМОНА ',\n",
       " 'АВОМ ',\n",
       " 'АВОМУННОС ',\n",
       " 'АВОМФАҲМ ',\n",
       " 'АВОМФИРЕБ ',\n",
       " 'АВОМФИРЕБӢ ',\n",
       " 'АВОМФИРЕБОНА ',\n",
       " 'АВОН ',\n",
       " 'АВОН ',\n",
       " 'АВОРА ',\n",
       " 'АВОРИЗ ',\n",
       " 'АВОСИТ ',\n",
       " 'АВОСИФ ',\n",
       " 'АВОТИФ ',\n",
       " 'АВОХИР ',\n",
       " 'АВРАНГ ',\n",
       " 'АВТОМАТИКА ',\n",
       " 'АВТОМАТӢ ',\n",
       " 'АВРАТ ',\n",
       " 'АВРИНГ ',\n",
       " 'АВРОД ',\n",
       " 'АВРОДХОНӢ ',\n",
       " 'АВРОҚ ',\n",
       " 'АВРУПОИДӮХТ ',\n",
       " 'АВРУПОӢ ',\n",
       " 'АВСАТ ',\n",
       " 'АВСОФ ',\n",
       " 'АВСУН ',\n",
       " 'АВТОБУС ',\n",
       " 'АВТОГЕНӢ ',\n",
       " 'АВТОДРОМ ',\n",
       " 'АВТОКРАН ',\n",
       " 'АВТОМАТ ',\n",
       " 'АВТОМАТОНӢ ',\n",
       " 'АВТОМАТЧӢ ',\n",
       " 'АВТОМАШИНА ',\n",
       " 'АВТОМОБИЛ ',\n",
       " 'АВТОМОБИЛГАРД ',\n",
       " 'АВТОМОБИЛӢ ',\n",
       " 'АВТОМОБИЛРОНӢ ',\n",
       " 'АВТОМОБИЛСОЗӢ ',\n",
       " 'АВТОН ',\n",
       " 'АВТОСИСТЕРНА ',\n",
       " 'АВУЛ ',\n",
       " 'АВФ ',\n",
       " 'АВФАР ',\n",
       " 'АВҲОМ ',\n",
       " 'ТАҲИЯИ ',\n",
       " 'СОМОНАИ ',\n",
       " 'АВҶ ',\n",
       " 'АВҶГИРӢ ',\n",
       " 'АВҶНАВАРД ',\n",
       " 'АВҶПАР ',\n",
       " 'АВҶРАВ ',\n",
       " 'АГНОСТИТСИЗМ ',\n",
       " 'АГРАРӢ ',\n",
       " 'АГРЕГАТ ',\n",
       " 'АГРОБИОЛОГИЯ ',\n",
       " 'АГРОНОМ ',\n",
       " 'АГРОНОМИЯ ',\n",
       " 'АГАР ',\n",
       " 'АГРОНОМӢ ',\n",
       " 'АГРОТЕХНИКА ',\n",
       " 'АГАРЧИ ',\n",
       " 'АГЕНТ ',\n",
       " 'АГЕНТӢ ',\n",
       " 'АГЛОМЕРАТ ',\n",
       " 'АГРОФИЗИКА ',\n",
       " 'АГРОХИМИЯ ',\n",
       " 'АҒБА ',\n",
       " 'АҒБАР ',\n",
       " 'АҒБАРӢ ',\n",
       " 'АҒЁР ',\n",
       " 'АҒЗИЯ ',\n",
       " 'АҒЛАБ ',\n",
       " 'АҒЛОТ ',\n",
       " 'АҒНИЁ ',\n",
       " 'АҒОЛУҚ ',\n",
       " 'АҒОНИСАРО ',\n",
       " 'АҒОНӢ ',\n",
       " 'АДАБ ',\n",
       " 'АДАБДОН ',\n",
       " 'АДАБДӮСТ ',\n",
       " 'АДАБИЁТ ',\n",
       " 'АДАБИЁТДӮСТ ',\n",
       " 'АДАБИЁТШИНОС ',\n",
       " 'АДАБИЁТШИНОСӢ ',\n",
       " 'АДАБИНАВИС ',\n",
       " 'АДАБИСТОН ',\n",
       " 'АДАБӢ ',\n",
       " 'АДАБОМӮЗ ',\n",
       " 'АДАБПАРВАР ',\n",
       " 'АДАБПАРВАРДА ',\n",
       " 'АДАБХОНА ',\n",
       " 'АДАБЧӮБ ',\n",
       " 'АДАВОТ ',\n",
       " 'АДАД ',\n",
       " 'АДАДАН ',\n",
       " 'АДАДӢ ',\n",
       " 'АДАДНАВИСӢ ',\n",
       " 'АДАЖИО ',\n",
       " 'АДАМ ',\n",
       " 'АДДОӢ ',\n",
       " 'АДЁН ',\n",
       " 'АДИБ ',\n",
       " 'АДИБОНА ',\n",
       " 'АДИЛ ',\n",
       " 'АДИМ ',\n",
       " 'АДИМ ',\n",
       " 'АДИР ',\n",
       " 'АДКАН ',\n",
       " 'АДЛ ',\n",
       " 'АДАС ',\n",
       " 'АДЛВАРЗ ',\n",
       " 'АДАСӢ ',\n",
       " 'АДАСШАКЛ ',\n",
       " 'АДВИЁТ ',\n",
       " 'АДВИЯ ',\n",
       " 'АДВИЯҶОТ ',\n",
       " 'АДВОКАТ ']"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ex2=re.findall(\"[ЁІАБВГДЕЖЗИЙКЛМНОПРСТУФХЧШЪЭЮЯҒҚҲҶӢӮ]{1,} \",full)\n",
    "print(len(ex2))\n",
    "ex2[:300]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n'"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "full[3097565-2]"
   ]
  },
  {
   "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.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
