Release date: 2024-12-11
- Added
oewn:2024
(#221)
Relation
class (#216)Sense.relation_map()
method (#216)Synset.relation_map()
method (#167, #216)W305
blank definition on synset validation (#151)W306
blank example on synset validation (#151)W307
repeated definition on synset validation (#151)
- Enumerate repeated entry, sense, synset IDs for validation (#228)
Release date: 2024-10-29
- Follow redirects with
httpx.Client
inwn._download
(#211) - Remove reverse relations for
pertainym
andalso
(#213) - Validate redundant relations considering
dc:type
(#215)
- Added
docs/.readthedocs.yaml
for building docs (#214)
Release date: 2024-10-29
- Support for WN-LMF 1.2 and 1.3 (#200)
- Don't assume 'id' on form elements in WN-LMF 1.2+ (#207)
- Switched packaging from flit to Hatch (#201)
- Updated dependencies, CI warnings, old workarounds (#203)
- Change CI publishing to OIDC trusted publishing
Release date: 2023-12-05
- Added
oewn:2023
(#194)
Release date: 2023-05-07
- Added
oewn:2022
(#181)
Release date: 2022-11-13
- Removed support for Python 3.6
- Added support for Python 3.11
wn.Synset.relations()
no longer raises aKeyError
when no relation types are given and relations are found via ILI (#177)
Release date: 2022-10-02
- The
editor
installation extra installs thewn-editor
package. This is not a normal way of using extras, as it installs a dependent and not a dependency, and may be removed. (#17)
wn.download()
no longer uses Python features unavailable in 3.7 when recovering from download errorsSense.synset()
now creates aSynset
properly linked to the sameWordnet
object (#157, #168)Sense.word()
now creates aWord
properly linked to the sameWordnet
object (#157)Synset.relations()
uses the correct relation type for those obtained from expand lexicons (#169)
Release date: 2021-11-23
- Correctly add syntactic behaviours for WN-LMF 1.1 lexicons (#156)
Release date: 2021-11-17
wn.constants.REVERSE_RELATIONS
wn.validate
module (#143)validate
subcommand (#143)wn.Lexicon.describe()
(#144)wn.Wordnet.describe()
(#144)wn.ConfigurationError
wn.ProjectError
- WN-LMF 1.0 Syntactic Behaviours with no
senses
are now assigned to all senses in the lexical entry. If a WN-LMF 1.1 lexicon extension puts Syntactic Behaviour elements on lexical entries (which it shouldn't) it will only be assigned to senses and external senses listed. wn.Form
now always hashes likestr
, so things likeset.__contains__
works as expected.wn.download()
raises an exception on bad responses (#147])- Avoid returning duplicate matches when a lemmatizer is used (#154)
wn.lmf.dump()
no longer has theversion
parameter
wn.lmf.load()
- returns a dictionary for the resource instead of a
list of lexicons, now including the WN-LMF version, as below:
{ 'lmf_version': '...', 'lexicons': [...] }
- returned lexicons are modeled with Python lists and dicts instead of custom classes (#80)
- returns a dictionary for the resource instead of a
list of lexicons, now including the WN-LMF version, as below:
wn.lmf.scan_lexicons()
only returns info about present lexicons, not element counts (#113)- Improper configurations (e.g., invalid data directory, malformed
index) now raise a
wn.ConfigurationError
- Attempting to get an unknown project or version now raises
wn.ProjectError
instead ofwn.Error
orKeyError
- Projects and versions in the index now take an
error
key. Callingwn.config.get_project_info()
on such an entry will raisewn.ProjectError
. Such entries may not also specify a url. The entry can still be viewed without triggering the error viawn.config.index
. (#146) - Project versions in the index may specify multiple, space-separated URLs on the url key. If one fails, the next will be attempted when downloading. (#142)
wn.config.get_project_info()
now returns aresource_urls
key mapped to a list of URLs instead ofresource_url
mapped to a single URL. (#142)wn.config.get_cache_path()
now only accepts URL arguments- The
lexicon
parameter in many functions now allows glob patterns likeomw-*:1.4
(#155)
- Added
oewn:2021
new ID, previouslyewn
(#152) - Added
own
,own-pt
, andown-en
(#97) - Added
odenet:1.4
- Added
omw:1.4
, includingomw-en
, formerlypwn:3.0
(#152) - Added
omw-en31:1.4
, formerlypwn:3.1
(#152) - Removed
omw:1.3
,pwn:3.0
, andpwn:3.1
(#152) - Added
kurdnet:1.0
(#140)
Release date: 2021-11-03
wn.lmf
now serialized DC and non-DC metadata correctly (#148)
Release date: 2021-11-01
This release only resolves some dependency issues with the previous release.
Release date: 2021-10-29
Note: the release on PyPI was yanked because a dependency was not specified properly.
wn.lmf
useshttps://
for thedc
namespace instead ofhttp://
, following the DTD
Release date: 2021-07-07
wn.ic
module (#40wn.taxonomy
module (#125)wn.similarity.res
Resnik similarity (#122)wn.similarity.jcn
Jiang-Conrath similarity (#123)wn.similarity.lin
Lin similarity (#124)wn.util.synset_id_formatter
(#119)
- Taxonomy methods on
wn.Synset
are moved town.taxonomy
, but shortcut methods remain for compatibility (#125). - Similarity metrics in
wn.similarity
now raise an error when synsets come from different parts of speech.
Release date: 2021-06-09
- Support for approximate word searches; on by default, configurable
only by instantiating a
wn.Wordnet
object (#105) wn.morphy
(#19)wn.Wordnet.lemmatizer
attribute (#8)wn.web
(#116)wn.Sense.relations()
(#82)wn.Synset.relations()
(#82)
wn.lmf.load()
now takes aprogress_handler
parameter (#46)wn.lmf.scan_lexicons()
no longer returns sets of relation types or lexfiles;wn.add()
now gets these from loaded lexicons insteadwn.util.ProgressHandler
- Now has a
refresh_interval
parameter; updates only trigger a refresh after the counter hits the threshold set by the interval - The
update()
method now takes aforce
parameter to trigger a refresh regardless of the refresh interval
- Now has a
wn.Wordnet
- Initialization now takes a
normalizer
parameter (#105) - Initialization now takes a
lemmatizer
parameter (#8) - Initialization now takes a
search_all_forms
parameter (#115) Wordnet.words()
,Wordnet.senses()
andWordnet.synsets()
now use any specified lemmatization or normalization functions to expand queries on word forms (#105)
- Initialization now takes a
wn.Synset.ili
for proposed ILIs now works again (#117)
Release date: 2021-03-22
- Disable
sqlite3
progress reporting afterwn.remove()
(#108)
Release date: 2021-03-05
wn.DatabaseError
as a more specific error type for schema changes (#106)
Release date: 2021-03-04
Notice: This release introduces backwards-incompatible changes to the schema that require users upgrading from previous versions to rebuild their database.
- For WN-LMF 1.0 support (#65)
wn.Sense.frames()
wn.Sense.adjposition()
wn.Tag
wn.Form.tags()
wn.Count
wn.Sense.counts()
- For ILI modeling (#23)
wn.ILI
classwn.Wordnet.ili()
wn.Wordnet.ilis()
wn.ili()
wn.ilis()
wn.project.Package.type
property- Index entries of different types; default is
'wordnet'
,'ili'
is also available - Support for detecting and loading ILI tab-separated-value exports; not directly accessible through the public API at this time
- Support for adding ILI resources to the database
- A CILI index entry (#23)
wn.lmf
WN-LMF 1.1 support (#7)<Requires>
<LexiconExtension>
,<Extends>
,<ExternalSynset>
,<ExternalLexicalEntry>
,<ExternalSense>
,<ExternalLemma>
,<ExternalForm>
subcat
on<Sense>
members
on<Synset>
lexfile
on<Synset>
<Pronunciation>
id
on<Form>
- New relations
- Other WN-LMF 1.1 support
wn.constants.SENSE_SYNSET_RELATIONS
wn.WnWarning
(related to #92)wn.Lexicon.modified()
(#17)
- Adding a wordnet with sense relations with invalid target IDs now raises an error instead of ignoring the relation.
- Detect LMF-vs-CILI projects even when files are uncompressed (#104)
- WN-LMF 1.0 entities now modeled and exported to XML (#65):
- WN-LMF 1.1 entities now modeled and exported to XML (#89):
- Lexicon requirements and extensions (#99)
- Form pronunciations
- Lexicographer files via the
lexfile
attribute - Form ids
wn.Synset.ili
now returns anILI
objectwn.remove()
now takes aprogess_handler
parameterwn.util.ProgressBar
uses a simpler formatting string with two new computed variableswn.project.is_package_directory()
andwn.project.is_collection_directory()
now detect packages/collection with ILI resource files (#23)wn.project.iterpackages()
now includes ILI packageswn.Wordnet
now sets the defaultexpand
value to a lexicon's dependencies if they are specified (related to #92)
- General changes:
- Parts of speech are stored as text
- Added indexes and
ON DELETE
actions to speed upwn.remove()
- All extendable tables are now linked to their lexicon (#91)
- Added rowid to tables with metadata
- Preemptively added a
modified
column tolexicons
table (#17) - Preemptively added a
normalized_form
column toforms
(#105) - Relation type tables are combined for synsets and senses (#75)
- ILI-related changes (#23):
- ILIs now have an integer rowid and a status
- Proposed ILIs also have an integer rowid for metadata access
- Added a table for ILI statuses
- WN-LMF 1.0 changes (#65):
- SyntacticBehaviour (previously unused) no longer requires an ID and does not use it in the primary key
- Added table for adjposition values
- Added source-sense to definitions table
- WN-LMF 1.1 changes (#7, #89):
- Added a table for lexicon dependencies
- Added a table for lexicon extensions (#99)
- Added
logo
column tolexicons
table - Added a
synset_rank
column tosenses
table - Added a
pronunciations
table - Added column for lexicographer files to the
synsets
table - Added a table for lexicographer file names
- Added an
id
column toforms
table
Release date: 2021-01-29
wn.lmf
specifiesutf-8
when opening files (#95)wn.lmf.dump()
casts attribute values to strings
Release date: 2021-01-28
wn.Lexicon.specifier()
wn.config.allow_multithreading
(#86)wn.util
module for public-API utilitieswn.util.ProgressHandler
(#87)wn.util.ProgressBar
(#87)
wn.Wordnet.lang
wn.Synset.get_related()
does same-lexicon traversals first, then ILI expansions (#90)wn.Synset.get_related()
only targets the source synset lexicon in default mode (#90, #92)wn.Wordnet
has a "default mode", when no lexicon or language is selected, which searches any lexicon but relation traversals only target the lexicon of the source synset (#92) is used for the lexicon id (#92)wn.Wordnet
has an empty expand set when a lexicon or language is specified and no expand set is specified (#92)wn.Wordnet
now allows versions in lexicon specifiers when the id is*
(e.g.,*:1.3+omw
)wn.Wordnet
class signature haslexicon
first,lang
is keyword-only (#93)lang
andlexicon
parameters are keyword-only onwn.lexicons()
,wn.word()
,wn.words()
,wn.sense()
,wn.senses()
,wn.synset()
,wn.synsets()
, and thetranslate()
methods ofwn.Word
,wn.Sense
, andwn.Synset
(#93)
Release date: 2021-01-19
wn.config.database_filename
(onlywn.config.data_directory
is configurable now)
- Schema validation is now done when creating a new connection,
instead of on import of
wn
- One connection is shared per database path, rather than storing connections on the modeling classes (#81)
- More robustly check for LMF validity (#83)
Release date: 2020-12-29
wn.export()
to export lexicon(s) from the database (#15)wn.lmf.dump()
to dump WN-LMF lexicons to disk (#15)metadata
method onwn.Word
,wn.Sense
, andwn.Synset
lexicalized
method onwn.Sense
andwn.Synset
wn.Form
class (#79)--verbose
/-v
option for the command-line interface (#71)
wn.Lexicon.metadata
is now a methodwn.Word.lemma()
returns awn.Form
object (#79)wn.Word.forms()
returns a list ofwn.Form
objects (#79)wn.project.iterpackages()
raiseswn.Error
on decompression problems (#77)wn.lmf.LMFError
now inherits fromwn.Error
wn.lmf.scan_lexicons()
raisesLMFError
on XML parsing errors (#77)wn.download()
reraises caughtwn.Error
with more informative message (#77)wn.add()
improve error message when lexicons are already added (#77)- Basic logging added for
wn.download()
andwn.add()
(#71) Synset.get_related()
andSense.get_related()
may take a'*'
parameter to get all relationswn.Wordnet
objects keep an open connection to the database (#81)
wn.projects.iterpackages()
tries harder to prevent potential race conditions when reading temporary files (#76)wn.Lexicon.metadata
now returns a dictionary (#78)
Release date: 2020-12-16
add
parameter town.download()
(#73)--no-add
option town download
command (#73)progress_handler
parameter town.download()
(#70)progress_handler
parameter town.add()
(#70)
Synset.shortest_path()
no longer includes starting node (#63)Synset.closure()
/Sense.closure()
may take multiple relations (#74)Synset.hypernym_paths(simulate_root=True)
returns just the fake root node if no paths were found (related to #64)wn.lexicons()
returns empty list on unknown lang/lexicon (#59)
- Renamed
lgcode
parameter tolang
throughout (#66) - Renamed
Wordnet.lgcode
property toWordnet.lang
(#66) - Renamed
--lgcode
command-line option to--lang
(#66) - Use better-performing/less-safe database options when adding lexicons (#69)
Release date: 2020-12-02
wn.config.get_cache_path()
returns the path of a cached resourcewn.projects()
returns the info about known projects (#60)projects
subcommand to command-line interface (#60)- Open German WordNet 1.3 to the index
- On import, Wn now raises an error if the database has an outdated schema (#61)
wn.config.get_project_info()
now includes acache
key- Output of
lexicons
CLI subcommand now tab-delimited
Release date: 2020-11-26
- Command-line interface for downloading and listing lexicons (#47)
- Cast
pathlib.Path
tostr
forsqlite3.connect()
(#58) - Pass
lgcode
toWordnet
object inwn.synset()
Release date: 2020-11-25
This is the initial release of the new Wn library. On PyPI it replaces the https://github.com/nltk/wordnet/ code which had been effectively abandoned, but this is an entirely new codebase.