wn
Wordnet interface library
What it is and what it does
Wn is a Python interface to wordnet databases—structured lexical resources that organize words into synonym sets (synsets) with definitions, part-of-speech tags, and semantic relationships. It provides a modern alternative to NLTK's wordnet module, with a SQL-backed database for fast queries and first-class support for multiple languages and interlingual lookups via the Collaborative Interlingual Index. The library lets you download wordnets from a curated index (similar to a package manager), query them for definitions and synonyms, explore taxonomies, compute word similarity, and perform lemmatization.
You start by downloading a wordnet (e.g., Open English WordNet 2025+) via the command line, then import the library and create a Wordnet object to query. It handles both English wordnets (with multiple historical versions for compatibility) and non-English wordnets in languages including German, Portuguese, Japanese, Spanish, and many others. The library supports the WN-LMF 1.4 format, including word pronunciations and custom lexicon extensions.
Use it for:
- Build semantic similarity or word-sense disambiguation features for NLP applications by querying synset relationships and definitions.
- Migrate from NLTK's wordnet module to a faster, more actively maintained alternative with better multilingual support.
- Perform cross-lingual semantic lookups using the Collaborative Interlingual Index to find equivalent concepts across languages.
- Extract lemmatized forms and morphological variants for text preprocessing in linguistic research or information retrieval.
- Explore word taxonomies and hypernym/hyponym relationships for knowledge graph construction or ontology building.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wn is a Python library for querying and exploring wordnet data—semantic networks of word meanings, definitions, and relationships—with support for multiple languages and interlingual lookups.
Yes. Wn is actively maintained, has no known vulnerabilities, installs with low friction, and offers a clean modern interface to wordnet data with strong multilingual support. It's a solid choice for NLP and linguistic tasks, especially if you need multiple languages or are migrating from NLTK. The only prerequisite is downloading wordnet data separately, which is straightforward.
Install
wn on PyPI
pip
pip install wnuv
uv add wnpoetry
poetry add wnInstalling wn
Before you install
Low install friction: pure Python wheel with only two lightweight runtime dependencies (httpx and tomli). Active maintenance with a recent release and no known vulnerabilities.
License in practice
MIT License permits unrestricted use, modification, and redistribution for commercial and private projects with minimal obligations—only attribution and license inclusion required.
Quickstart
pip install wn
python -m wn download oewn:2025+
import wn
en = wn.Wordnet('oewn:2025+')
synsets = en.synsets('win', pos='v')
print(synsets[0].definition())
Requires Python 3.10 or later. Wordnet data must be downloaded separately via `python -m wn download` before querying.
Verify before relying
- Performance characteristics and query speed on large wordnet datasets compared to alternatives
- Memory footprint of the SQL-based backend for typical use cases
- Completeness and accuracy of available wordnets across supported languages
Package facts
| License | MIT License Copyright (c) 2020 Michael Wayne Goodman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — httpx, tomli |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 157,397/month — #10,757 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wn-1.1.1-py3-none-any.whl
Keywords: interlingual, language, library, linguistics, wordnet
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
num2wordsConverts numbers to their word representations…
copyleft · top 5,000 on PyPI
polyglotPolyglot is a multilingual natural language…
copyleft · top 15,000 on PyPI
nltkNLTK is a Python library for natural language…
permissive · top 1,000 on PyPI
wordfreqwordfreq looks up word frequencies across over…
permissive · top 5,000 on PyPI
lingua-language-detectorDetects which language a text is written in,…
permissive · top 5,000 on PyPI
simplemmaSimplemma converts inflected word forms to…
permissive · top 15,000 on PyPI
text2numConverts natural language number words into…
permissive · top 15,000 on PyPI
lemminflectLemmatizes and inflects English words using…
permissive · top 15,000 on PyPI
babelfishBabelFish provides Python objects for…
permissive · top 15,000 on PyPI
PyStemmerPyStemmer provides word stemming algorithms for…
permissive · top 5,000 on PyPI