diff --git a/.gitignore b/.gitignore index da7a8ce44..a0596a63c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,8 @@ __pycache__ ########### node_modules package-lock.json + +# Temporary to test +# TODO remove later +################### +tmp_*.json diff --git a/src/scribe_data/extract_transform/process_unicode.py b/src/scribe_data/extract_transform/process_unicode.py index 27fab76b1..59d2436db 100644 --- a/src/scribe_data/extract_transform/process_unicode.py +++ b/src/scribe_data/extract_transform/process_unicode.py @@ -74,6 +74,13 @@ def gen_emoji_autosuggestions( print("Number of trigger keywords found:", len(autosuggest_dict)) + output_path = f"tmp_{iso}_emojisuggestions.json" + + with open(output_path, "w", encoding="utf-8") as file: + json.dump(autosuggest_dict, file, ensure_ascii=False, indent=0) + + print(f"Emoji autosuggestions for '{language}' generated and saved to '{output_path}'.") + ### return autosuggest_dict