Skip to main content

Wordnet Interface.

Project description

Wn logo
a Python library for wordnets
PyPI link Python Support tests Documentation Status
Available Wordnets | Documentation | FAQ | Migrating from NLTK | Roadmap


Notice for users upgrading to v0.6: Version v0.6.0 introduced changes to the database schema that require the user to rebuild their database. Please raise an issue if you need help.


Wn is a Python library for exploring information in wordnets. Install it from PyPI:

$ pip install wn

Then download some data and start exploring:

>>> import wn
>>> wn.download('ewn:2020')    # Install the English WordNet 2020 (only once)
Download complete (13643357 bytes)
Added ewn:2020 (English WordNet)
>>> ss = wn.synsets('win')[0]  # Get the first synset for 'win'
>>> ss.definition()            # Get the synset's definition
'be the winner in a contest or competition; be victorious'

Unlike previous implementations, Wn uses a SQLite database to store wordnet data, which can make it much faster: Wn is 5x faster than the NLTK to list all English synsets, and almost 20x faster if you include the startup time. Some operations, particularly path operations that require multiple SQL queries, may be slower.

Wn is also multilingual from the start. English is not the default. Instead, all wordnets are searched unless one (or more) are specified:

>>> import wn
>>> wn.synsets('chat')                      # all installed wordnets
>>> wn.synsets('chat', lang='en')           # limit to one language
>>> wn.synsets('chat', lexicon='ewn:2020')  # limit to one wordnet

Available Wordnets

The following wordnets are indexed by Wn and ready to be installed:

Name ID Versions Language
Open English WordNet ewn 2019, 2020 English [en]
Princeton WordNet pwn 3.0, 3.1 English [en]
Open Multilingual Wordnet omw 1.3 multiple [mul]
Open German WordNet odenet 1.3 German [de]

The Open Multilingual Wordnet installs the following lexicons (from here) which can also be downloaded and installed independently:

Name ID Versions Language
Albanet alswn 1.3+omw Albanian [als]
Arabic WordNet (AWN v2) arbwn 1.3+omw Arabic [arb]
BulTreeBank Wordnet (BTB-WN) bulwn 1.3+omw Bulgarian [bg]
Chinese Open Wordnet cmnwn 1.3+omw Mandarin (Simplified) [zh]
Croatian Wordnet hrvwn 1.3+omw Croatian [hr]
DanNet danwn 1.3+omw Danish [da]
FinnWordNet finwn 1.3+omw Finnish [fi]
Greek Wordnet ellwn 1.3+omw Greek [el]
Hebrew Wordnet hebwn 1.3+omw Hebrew [he]
IceWordNet islwn 1.3+omw Icelandic [is]
Italian Wordnet iwn 1.3+omw Italian [it]
Japanese Wordnet jpnwn 1.3+omw Japanese [jp]
Lithuanian WordNet litwn 1.3+omw Lithuanian [lt]
Multilingual Central Repository catwn 1.3+omw Catalan [ca]
Multilingual Central Repository euswn 1.3+omw Basque [eu]
Multilingual Central Repository glgwn 1.3+omw Galician [gl]
Multilingual Central Repository spawn 1.3+omw Spanish [es]
MultiWordNet itawn 1.3+omw Italian [it]
Norwegian Wordnet nobwn 1.3+omw Norwegian (Bokmål) [nb]
Norwegian Wordnet nnown 1.3+omw Norwegian (Nynorsk) [nn]
Open Dutch WordNet nldwn 1.3+omw Dutch [nl]
OpenWN-PT porwn 1.3+omw Portuguese [pt]
plWordNet polwn 1.3+omw Polish [pl]
Romanian Wordnet ronwn 1.3+omw Romanian [ro]
Slovak WordNet slkwn 1.3+omw Slovak [sk]
sloWNet slvwn 1.3+omw Slovenian [sl]
Swedish (SALDO) swewn 1.3+omw Swedish [sv]
Thai Wordnet thawn 1.3+omw Thai [th]
WOLF (Wordnet Libre du Français) frawn 1.3+omw French [fr]
Wordnet Bahasa indwn 1.3+omw Indonesian [id]
Wordnet Bahasa zsmwn 1.3+omw Malaysian [zsm]

The project index list is defined in wn/index.toml.

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-0.6.1.tar.gz (90.6 kB view details)

Uploaded Source

Built Distribution

wn-0.6.1-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

Details for the file wn-0.6.1.tar.gz.

File metadata

  • Download URL: wn-0.6.1.tar.gz
  • Upload date:
  • Size: 90.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for wn-0.6.1.tar.gz
Algorithm Hash digest
SHA256 5135ac500533787d5924e948a9c5df71382444ec25a2264d36ca7a2e0497dc55
MD5 13fea16b441faf6bcbfee7103fd3c950
BLAKE2b-256 95f347ba0d59da763379fa1ee99ebb65ab132c63e3f9186b8f016c8d1b6a8278

See more details on using hashes here.

File details

Details for the file wn-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: wn-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 54.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for wn-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d82c0c20b1fc870c63c51da0410267617d24b8969c3306647684796a0f1aa808
MD5 6b7c6dfaffd72ff0814254754129bbc8
BLAKE2b-256 ef604af67c81d6fd000f091d76ae11e7baae871e46ce1b4cf941fc28f79e6756

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page