Skip to content

Instantly share code, notes, and snippets.

#include <Windows.h>
#include <iostream>
#include <fstream>
#include <cmath>
#include <limits>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
def detransliterate(string):
from_list = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'
to_list = 'a,b,v,g,d,e,jo,zh,z,i,y,k,l,m,n,o,p,r,s,t,u,f,kh,c,ch,sh,shh,jhh,ih,jh,eh,ju,ja,A,B,V,G,D,E,JO,ZH,Z,I,Y,K,L,M,N,O,P,R,S,T,U,F,KH,C,CH,SH,SHH,JHH,IH,JH,EH,JU,JA'.split(',')
detransliterated_string = ''
index_of_symbol = 0
while index_of_symbol < len(string):
was_combination = 0
for i in range(3, 0, -1):
if string[index_of_symbol:index_of_symbol+i] in to_list:
index = to_list.index(string[index_of_symbol:index_of_symbol+i])