Skip to main content

A helper library for accessing and manipulating WordNets in the MultiWordNet

Project description

### Background
A WordNet is a lexico-conceptual database for a language. In a WordNet, a language's lexemes (nouns, verbs, adjectives, and adverbs) are grouped into sets of semantically related words called synsets (for "synonym sets"), which thus correspond to the senses that are lexicalized in the language. A WordNet also typically includes information about semantic relations (i.e., relations between synsets) and about lexical relations (i.e., relations between words).

Created by Stefano Minozzi between 2004 and 2008 as part of the Fondazione Bruno Kessler's MultiWordNet, the original Latin WordNet contained 9,124 lemmas drawn from Riganti's Lessico Fondamentale Latino. The University of Exeter's TExtual Project aims to build on and expand Minozzi's work by adding some 30,000 words, covering the Latin language from the archaic period to late antiquity (and somewhat beyond).

When completed, this Latin WordNet '2.0' will become an integral component of two Digital Humanities projects. For the TExtual semantic and syntactic search engine for electronic corpora of Latin, the WordNet will deliver the engine's ability to execute queries based on word meanings. The WordNet will also provide the Exeter Dictionary of Latin Metaphor (Lexicon Translaticium Latinum) with a basis for distinguishing between words' literal and abstract senses.

### Installation
To get setup, all you need to do is compile the relevant SQLite databases:
```
>>> from multiwordnet.db import compile
>>> compile('latin')
```
You will need to do the same for the English and Italian synset databases:
```
>>> compile('english', 'synset)
>>> compile('italian', 'synset)
```
To make full use of the semantic data that is included in the MultiWordNet, you will also want to compile the list of common relations and semfield hierarchy:
```
>>> compile('common', 'relations', 'semfield', 'semfield_hierarchy')
```

### Basic usage
```
>>> from multiwordnet.wordnet import WordNet

>>> LWN = WordNet('latin')
>>> LWN.lemmas # all the lemmas currently in the WordNet
...
>>> abalieno = LWN.get_lemma('abalieno', 'v') # this returns a single lemma
>>> words = LWN.get('alien', strict=False) # this returns possibly multiple lemmas matching a wildcard string
>>> for word in words:
... print(word.lemma, word.pos)
...
alienus n
alieno v
alienigena n
alienatio n
abalieno v
abalienatio n
>>> abalieno.synonyms # all lemmas that share a synset with 'abalieno'
>>> abalieno.antonyms
>>> abalieno.synsets
...

>>> synset = LWN.get_synset('n#07462736') # you can find a synset directly, if you know its offset ID
>>> synset.lemmas
...

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

multiwordnet-0.0.1.post1.tar.gz (11.2 MB view details)

Uploaded Source

File details

Details for the file multiwordnet-0.0.1.post1.tar.gz.

File metadata

  • Download URL: multiwordnet-0.0.1.post1.tar.gz
  • Upload date:
  • Size: 11.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.4

File hashes

Hashes for multiwordnet-0.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 aa382b59e1bf5ae6f9102ed4e88f538d752b11d12222b7bcaa069f19750c23ed
MD5 4f17e1f1c38dd558e12b1086cf96200a
BLAKE2b-256 84222cc94008a21f0915d20cded9d302f218470149be118b6bc5685a3ca76c77

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