Registry / data / wn
library1.1.0pypypi✓ verified 86d ago

A pure Python interface to the WordNet lexical database, providing access to synsets, lemmas, and semantic relations. Current version 1.1.0, released in 2023, with occasional maintenance updates.

pip install wn
INSTALL
IMPORT
SIG · WN
W
wn
datapythonv1.1.0
Install
2.4s avg
Import
384ms
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.404s · 22.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.364s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

wn
import wn
from wn import WordNet
Use module-level import, not class import.
WordNet
import wn; wn.WordNet
from wn import WordNet
WordNet is a class inside the module; accessing via from import may cause confusion.

Basic usage: import module, create WordNet instance, query synsets.

import wn # Download the WordNet database (first run) # wn.download('omw-en') # Load a lexicon wn = wn.WordNet() # Get synsets for a word synsets = wn.synsets('dog') print(synsets) # Get lemmas for a synset for synset in synsets: print(synset.lemmas())
Debug
Known issues
breakingIn version 1.0.0, the API changed significantly. The old 'from wn import WordNet' pattern no longer works; use 'import wn' and instantiate wn.WordNet().
fix
Change import from 'from wn import WordNet' to 'import wn' and replace 'WordNet()' with 'wn.WordNet()'.
affects: >=1.0.0
deprecatedThe wn.download() function is deprecated; use wn.DB().install() or command-line tool 'wn install'.
fix
Run 'wn install omw-en' in terminal or use 'wn.DB().install("omw-en")' in code.
affects: >=1.1.0
gotchaWordNet database must be downloaded before first use. Calling synsets without downloading will raise an exception.
fix
Run 'wn install omw-en' or 'wn.download("omw-en")' (deprecated) before querying.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'wn'
The library 'wn' is not installed.
fix
Run 'pip install wn' to install.
AttributeError: module 'wn' has no attribute 'WordNet'
Importing incorrectly: from wn import WordNet instead of import wn.
fix
Use 'import wn' and then 'wn.WordNet()'.
ValueError: unknown lexicon 'omw-en'
The database 'omw-en' is not installed.
fix
Run 'wn install omw-en' or download it via programmatic method.
Upgrade
Version history
1.1.0latest on PyPI · released Mar 21, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
OpenAI (training)
1
Resources
wn — pip install wn · libregistry