# Path: common/ws_utils.py
# def split_page_text(text):
# 
# Path: common/utils.py
# def read_file(filename):
# def write_file(filename, text):
# def save_obj(filename, data):
# def load_obj(filename):
# def sha1(filename):
# def write_sha1(sha1, filename):
# def url_opener():
# def copy_file_from_url(url, out_file, expect_sha1 = None, max_retry = 4):
# def compress_file_data(out_filename, data, compress_type):
# def compress_file(out_filename, in_filename, compress_type):
# def uncompress_file(filename, compress_type):
# def _retry_on_eintr(func, *args):
# def safe_read(fd):
# def safe_write(fd, text):
# def print_traceback(*kwargs):
# def readline_backward(filename, buf_size=8192):


import sys
import os
import re
import tempfile
import os
import pywikibot
from ws_namespaces import page as page_prefixes, index as index_prefixes
from common import ws_utils
from common import utils
from pywikibot import pagegenerators as pagegen
    from match_and_split import align
        u"GRECLIN" : u"GREDIN",
        u"CLOUTER" : u"DOUTER",
        u"CLOUTÂT" : u"DOUTÂT",
        u"CLIGNE" : u"DIGNE",
        u"US" : u"ILS",
        u"CLAMES" : u"DAMES",
        u"CLAME" : u"DAME",
        u"TON" : u"L’ON",
        u"JUE" : u"QUE",
        u"CJUE" : u"QUE",
        u"FDLES" : u"FILLES",
        u"FDLE" : u"FILLE",
        u"H" : u"À",
        u"A" : u"À",
        u"I" : u"",
        u"TÉtat" : u"L’ÉTAT",
        }

    if left in lst and right == lst[left]:
        return True
    return False

def transform_ocr_diff(diff):
    diff = diff.replace(u'OEUVRÉ', u'ŒUVRÉ')
    diff = diff.replace(u'COETERA', u'CÆTERA')
    diff = diff.replace(u'VOEUX', u'VŒUX')
    diff = diff.replace(u'MOEURS', u'MŒURS')
    diff = diff.replace(u'SOEUR', u'SŒUR')
    diff = diff.replace(u'CHOEUR', u'CHŒUR')
    diff = diff.replace(u'NOEUD', u'NŒUD')

# Path: common/ws_utils.py
# def split_page_text(text):
# 
# Path: common/utils.py
# def read_file(filename):
# def write_file(filename, text):
# def save_obj(filename, data):
# def load_obj(filename):
# def sha1(filename):
# def write_sha1(sha1, filename):
# def url_opener():
# def copy_file_from_url(url, out_file, expect_sha1 = None, max_retry = 4):
# def compress_file_data(out_filename, data, compress_type):
# def compress_file(out_filename, in_filename, compress_type):
# def uncompress_file(filename, compress_type):
# def _retry_on_eintr(func, *args):
# def safe_read(fd):
# def safe_write(fd, text):
# def print_traceback(*kwargs):
# def readline_backward(filename, buf_size=8192):


# Path: verify_match/verify_match.py
import sys
import os
import re
import tempfile
import os
import pywikibot
from ws_namespaces import page as page_prefixes, index as index_prefixes
from common import ws_utils
from common import utils
from pywikibot import pagegenerators as pagegen
    from match_and_split import align

        u"GRECLIN" : u"GREDIN",
        u"CLOUTER" : u"DOUTER",
        u"CLOUTÂT" : u"DOUTÂT",
        u"CLIGNE" : u"DIGNE",
        u"US" : u"ILS",
        u"CLAMES" : u"DAMES",
        u"CLAME" : u"DAME",
        u"TON" : u"L’ON",
        u"JUE" : u"QUE",
        u"CJUE" : u"QUE",
        u"FDLES" : u"FILLES",
        u"FDLE" : u"FILLE",
        u"H" : u"À",
        u"A" : u"À",
        u"I" : u"",
        u"TÉtat" : u"L’ÉTAT",
        }

    if left in lst and right == lst[left]:
        return True
    return False

def transform_ocr_diff(diff):
    diff = diff.replace(u'OEUVRÉ', u'ŒUVRÉ')
    diff = diff.replace(u'COETERA', u'CÆTERA')
    diff = diff.replace(u'VOEUX', u'VŒUX')
    diff = diff.replace(u'MOEURS', u'MŒURS')
    diff = diff.replace(u'SOEUR', u'SŒUR')
    diff = diff.replace(u'CHOEUR', u'CHŒUR')
    diff = diff.replace(u'NOEUD', u'NŒUD')

    diff = diff.replace(u'VOEUX', u'VŒUX')