Skip to content

Commit

Permalink
scribe-org#14 save tmp emoji files for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wkyoshida committed Nov 9, 2022
1 parent cbf36c8 commit 405c290
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ __pycache__
###########
node_modules
package-lock.json

# Temporary to test
# TODO remove later
###################
tmp_*.json
7 changes: 7 additions & 0 deletions src/scribe_data/extract_transform/process_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 405c290

Please sign in to comment.