import sys

def read_file(filepath):
    with open(filepath, 'r', encoding='utf-8') as f:
        return f.read()

text1 = read_file('An Duc Tam Bao/tam_bao_001_010.md')
text2 = read_file('An Duc Tam Bao/tam_bao_001_010_standard.txt')

print("Length difference:")
print(f"Extracted length: {len(text1)}")
print(f"Standard length: {len(text2)}")

import re
words1 = re.findall(r'[\u1000-\u109F]+', text1)
words2 = re.findall(r'[\u1000-\u109F]+', text2)
print(f"\nMyanmar words in Extracted: {len(words1)}")
print(f"Myanmar words in Standard: {len(words2)}")

