An editor for wordnets, extending the popular 'wn' package.
Project description
wn-editor
A extension for the popular wn package, making wordnets editable from python!
Motivation
Currently the wn python package does not support editing the imported wordnets. For some usecases editing the wordnets or creating new ones on the fly is very important. This package aims to be an extension of wn and provides an API for editing wordnets.
Documentation
This package integrates directly into the wordnet database maintained by wn, and thus allowes to change data and not only provide a changed view. This is done by using different editor classes for the various wordnet components.
Quickstart
- Install this package using
pip install wn-editor
- import the package (and wn) like so
import wn
from wn-editor import LexiconEditor
# Get and editor for an installed lexicon
lex_edit = LexiconEditor('odenet')
# Use differnet methods to create and edit synsets
lex_edit.create_synset()
.add_word('auto')
.set_hypernym_of(wn.synsets('mercedes')[0])
- Read the wiki for more detailed info about the available methods and classes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wn-editor-0.5.3.tar.gz
(12.2 kB
view hashes)
Built Distribution
wn_editor-0.5.3-py3-none-any.whl
(11.6 kB
view hashes)
Close
Hashes for wn_editor-0.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 231467d27684ef9471f32af51b6c9f731711674c033d37a24cdf65967fa3c49d |
|
MD5 | 322d5f200d43f23a232ed724e6bfeb3c |
|
BLAKE2b-256 | b0e14874c9432dd628365bbb564d419cdae1ef689b1adf86133cc1e170b08c75 |