SkillAgentSearch skills...

Wn

A modern, interlingual wordnet interface for Python

Install / Use

/learn @goodmami/Wn
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <img src="https://raw.githubusercontent.com/goodmami/wn/main/docs/_static/wn-logo.svg" alt="Wn logo"> <br> <strong>a Python library for wordnets</strong> <br> <a href="https://pypi.org/project/wn/"><img src="https://img.shields.io/pypi/v/wn.svg?style=flat-square" alt="PyPI link"></a> <img src="https://img.shields.io/pypi/pyversions/wn.svg?style=flat-square" alt="Python Support"> <a href="https://github.com/goodmami/wn/actions?query=workflow%3A%22tests%22"><img src="https://github.com/goodmami/wn/workflows/tests/badge.svg" alt="tests"></a> <a href="https://wn.readthedocs.io/en/latest/?badge=latest"><img src="https://readthedocs.org/projects/wn/badge/?version=latest&style=flat-square" alt="Documentation Status"></a> <br> <a href="https://github.com/goodmami/wn#available-wordnets">Available Wordnets</a> | <a href="https://wn.readthedocs.io/">Documentation</a> | <a href="https://wn.readthedocs.io/en/latest/faq.html">FAQ</a> | <a href="https://wn.readthedocs.io/en/latest/guides/nltk-migration.html">Migrating from NLTK</a> | <a href="https://github.com/goodmami/wn#citation">Citation</a> </p>

Wn is a Python library for exploring information in wordnets.

Installation

Install it from PyPI using pip:

pip install wn

or uv:

uv add wn

[!IMPORTANT] Existing users of Wn may encounter an error about an incompatible database schema. The remedy is to rebuild the database. There is a new function to help with this:

>>> wn.reset_database(rebuild=True)  # re-add any indexed lexicons

or

>>> wn.reset_database()  # initialize without re-adding; start from scratch

Getting Started

First, download some data:

python -m wn download oewn:2025+  # the Open English WordNet 2025+

Now start exploring:

>>> import wn
>>> en = wn.Wordnet('oewn:2025+')       # Create Wordnet object to query
>>> ss = en.synsets('win', pos='v')[0]  # Get the first synset for 'win'
>>> ss.definition()                     # Get the synset's definition
'be the winner in a contest or competition; be victorious'

Features

Available Wordnets

Any WN-LMF-formatted wordnet can be added to Wn's database from a local file or remote URL, but Wn also maintains an index (see wn/index.toml) of available projects, similar to a package manager for software, to aid in the discovery and downloading of new wordnets. The projects in this index are listed below.

English Wordnets

There are several English wordnets available. In general it is recommended to use the latest Open English Wordnet, but if you have stricter compatibility needs for, e.g., experiment replicability, you may try the OMW English Wordnet based on WordNet 3.0 (compatible with the Princeton WordNet 3.0 and with the NLTK), or OpenWordnet-EN (for use with the Portuguese wordnet OpenWordnet-PT).

| Name | Specifier | # Synsets | Notes | | -------------------------------------------- | ---------------------- | --------: | ----- | | Open English WordNet | oewn:2025+<br/> oewn:2025</br> oewn:2024<br/> oewn:2023<br/> oewn:2022<br/> oewn:2021<br/> ewn:2020<br/> ewn:2019 | 120564<br/>107519<br/>120630<br/>120135<br/>120068<br/>120039<br/>120053<br/>117791 | ← Recommended<br/> <br/> <br/> <br/> <br/> <br/> <br/>  | | OMW English Wordnet based on WordNet 1.5 | omw-en15:2.0 | 91591 | | | OMW English Wordnet based on WordNet 1.6 | omw-en16:2.0 | 99642 | | | OMW English Wordnet based on WordNet 1.7 | omw-en17:2.0 | 109377 | | | OMW English Wordnet based on WordNet 1.7.1 | omw-en171:2.0 | 111223 | | | OMW English Wordnet based on WordNet 2.0 | omw-en20:2.0 | 115424 | | | OMW English Wordnet based on WordNet 2.1 | omw-en21:2.0 | 117597 | | | OMW English Wordnet based on WordNet 3.0 | omw-en:2.0</br> omw-en:1.4 | 117659</br> 117659 | Included with omw:2.0<br/> Included with omw:1.4 | | OMW English Wordnet based on WordNet 3.1 | omw-en31:2.0</br> omw-en31:1.4 | 117791</br> 117791 | | | OpenWordnet-EN | own-en:1.0.0 | 117659 | Included with own:1.0.0 |

Other Wordnets and Collections

These are standalone non-English wordnets and collections. The wordnets of each collection are listed further down.

| Name | Specifier | # Synsets | Language | | ------------------------------------------ | ----------------------------- | --------------: | ---------------- | | Open Multilingual Wordnet | omw:1.4 | n/a | multiple [mul] | | Open German WordNet | odenet:1.4<br/>odenet:1.3 | 36268<br/>36159 | German [de] | | Open Wordnets for Portuguese and English | own:1.0.0 | n/a | multiple [mul] | | KurdNet | kurdnet:1.0 | 2144 | Kurdish [ckb] |

Open Multilingual Wordnet (OMW) Collection

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

| Name | Specifier | # Synsets | Language | | ---------------------------------------- | -------------------------------- | -----------------: | -------------------------------- | | Albanet | omw-sq:2.0<br/> omw-sq:1.4 | 4679<br/> 4675 | Albanian [sq] | | Arabic WordNet (AWN v2) | omw-arb:2.0<br/> omw-arb:1.4 | 9916<br/> 9916 | Arabic [arb] | | BulTreeBank Wordnet (BTB-WN) | omw-bg:2.0<br/> omw-bg:1.4 | 4959<br/> 4959 | Bulgarian [bg] | | Chinese Open Wordnet | omw-cmn:2.0<br/> omw-cmn:1.4 | 42300<br/> 42312 | Mandarin (Simplified) [cmn-Hans] | | Croatian Wordnet | omw-hr:2.0<br/> omw-hr:1.4 | 23115<br/> 23120 | Croatian [hr] | | DanNet | omw-da:2.0<br/> omw-da:1.4 | 4476<br/> 4476 | Danish [da] | | FinnWordNet | omw-fi:2.0<br/> omw-fi:1.4 | 116763<br/> 116763 | Finnish [fi] | | Greek Wordnet | omw-el:2.0<br/> omw-el:1.4 | 18113<br/> 18049 | Greek [el] | | Hebrew Wordnet | omw-he:2.0<br/> omw-he:1.4 | 5448<br/> 5448 | Hebrew [he] | | IceWordNet | omw-is:2.0<br/> omw-is:1.4 | 4951<br/> 4951 | Icelandic [is] | | Italian Wordnet | omw-iwn:2.0<br/> omw-iwn:1.4 | 15563<br/> 15563 | Italian [it] | | Japanese Wordnet | omw-ja:2.0<br/> omw-ja:1.4 | 117659<br/> 57184 | Japanese [ja] | | Lithuanian WordNet | omw-lt:2.0<br/> omw-lt:1.4 | 9462<br/> 9462 | Lithuanian [lt] | | Multilingual Central Repository | omw-ca:2.0<br/> omw-ca:1.4 | 60765<br/> 45826 | Catalan [ca] | | Multilingual

Related Skills

View on GitHub
GitHub Stars289
CategoryDevelopment
Updated4d ago
Forks31

Languages

Python

Security Score

100/100

Audited on Mar 28, 2026

No findings