import re
import difflib
import sys

def get_myanmar_text(filepath):
    with open(filepath, 'r', encoding='utf-8') as f:
        text = f.read()
    return ''.join(re.findall(r'[\u1000-\u109F]+', text))

std_file = sys.argv[1]
md_file = sys.argv[2]

std_text = get_myanmar_text(std_file)
md_text = get_myanmar_text(md_file)

matcher = difflib.SequenceMatcher(None, std_text, md_text)
acc = matcher.ratio() * 100

print(f"Accuracy: {acc:.2f}%")
