Skip to content

kwchurch/Wordnet_tables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Wordnet_tables

Extract WordNet tables from NLTK

Creates a three simple tables:

  1. synset2lang_table.txt: synset --> glosses in 29 languages + examples & definitions
  2. rel_table.txt: (head, rel, tail), where head and tail are synsets
  3. 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

About

Extract WordNet tables from NLTK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages