import json, re a = open('output/article.md', encoding='utf-8').read() body = re.sub(r'^# .*\n', '', a, count=1) # exclude the H1 headline, which is also stored as metadata words = re.findall(r"[A-Za-z0-9][A-Za-z0-9'’.,×%-]*", body) print('article words excl. H1:', len(words)) m = json.load(open('output/metadata.json', encoding='utf-8')) print('headline chars:', len(m['headline'])) print('excerpt words:', len(m['excerpt'].split())) print('search_description chars:', len(m['search_description'])) for bad in ['USD 19', 'GDPR', 'offline', '60%', 'hallucination', 'fired', 'tested it', 'I tested', 'we tested']: print(bad, '->', bad.lower() in a.lower())