Extract WordNet tables from NLTK
Creates a three simple tables:
- synset2lang_table.txt: synset --> glosses in 29 languages + examples & definitions
- rel_table.txt: (head, rel, tail), where head and tail are synsets
- lemma_table.txt: (head, rel, tail, language), where head and tail are lemmas
Code is embarrassingly simple. Requires numpy and NLTK. Please install that first. See https://www.nltk.org/install.html for NLTK.
Then go into python and say:
import nltk
nltk.download('wordnet')
nltk.download('omw')
Usage:
python3 create_lemma_table.py > lemma_table.txt
python3 create_rel_table.py > rel_table.txt
python3 create_synset2lang_table.py > synset2lang_table.txt
echo 'This is a test of morphological decompositions of some words' | tr ' ' '\n' | python3 wordnet_decomp.py
Questions: kenneth.ward.church@gmail.com