The codebase provides some interactions with .json and .jsonl file formats
Create a virtual environment using conda
conda create --name <your virtual environment> python=<your preferred python version>
Activate the environment
conda activate <your virtual environment>
The most important modules to import are json and jsonlines
import json
import jsonlines
The other modules included the project can be imported/installed at leisure. Ensure you're within your virtual environment when installing modules.
with jsonlines.open(f'{PATH}/{file_name}.jsonl') as reader:\n",
" for obj in reader:\n",
" ...",
with jsonlines.open(f'{PATH}/{file_name}.jsonl', mode='a') as writer:\n",
" ...",
-
Dataset: /asian_data/asian_words.json
-
Requirements: A Wordnik API Key. Visit Wordnik to learn more.
-
Open main.ipynb and navigate to Sample project
-
Append the etymologies to your json file
write_to_json(PATH,'asian_words-test',data)