gf-wordnet


Namegf-wordnet JSON
Version 0.0.17 PyPI version JSON
download
home_pagehttps://github.com/GrammaticalFramework/gf-wordnet
SummaryAn API to the GF WordNet.
upload_time2024-04-03 09:30:14
maintainerNone
docs_urlNone
authorKrasimir Angelov
requires_pythonNone
licenseBSD
keywords gf wordnet
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # A Python Interface to GF WordNet

The [GF WordNet](https://cloud.grammaticalframework.org/wordnet/)
(on [GitHub](https://github.com/GrammaticalFramework/gf-wordnet)).
can be used as a regular GF grammar or you can also use
it as a standalone Python library similar in style to `nltk.corpus.wordnet`.
The added benefit is that contrary to the usual WordNets in GF WordNet
you also have the RGL abstract syntax trees which lets you to 
compose sentences in serveral languages.

The easiest way to get the library is via pip:
```console
$ pip3 install gf-wordnet
```
This will install the library with its dependencies but it will not install the WordNet grammar.
You can download the latest precompiled version of the grammar as follows:
```Python
>>> import wordnet
Either use wordnet.download(['ISO 639‑2 code1', ...]) to download the grammar,
or use wordnet.symlink('path to a folder') to link the library to an existing grammar.
If download() is called without an argument it will download all languages.
>>> wordnet.download(['eng'])
Download and boot the grammar 355MB (Expanded to 2637MB)
Download the semantics database 2733MB done
Reload wordnet
```
When there is no grammar installed, the library prints a warning and then the `download` function
is the only one that you can use. If you want more languages, add them in the list. If you call
`download` with no arguments, all languages will be downloaded. Expect the grammar to be
around 50GB in that case.

The wordnet library searches for a file called `Parse.pgf` or `Parse.ngf` in the path for Python modules and
uses it as a grammar. You can change the path by either manipulating `sys.path` from Python or by
setting the `PYTHONPATH` environment variable. This is useful if you already have the grammar
stored somewhere else and you need to tell Python where to find it.

**Note:** When you use the `download` function, the grammar will be downloaded in the folder where the Python
library is installed. This means that if you have installed the library globally, then it will try to
store the grammar under `/usr/local/lib/python3.X`. For that to work you need to run the python shell
as root during the download. After that you can use the library and the grammar from all users.
On the other hand, by default `pip` installs libraries under `/home/krasimir/.local/lib/python3.X`,
so you don't need to do anything special.

After the download is finished, you can import the library like this:
```Python
>>> import wordnet
```
For more compact code, we recommend:
```Python
>>> from wordnet import *
```

## Words

Look up the senses of a word form by using `synsets()`; this function
has an optional `cat` argument which lets you constrain the category of
the word:
```Python
>>> synsets('eng','dog')
[Synset('02086723-n'), Synset('10133978-n'), Synset('10042764-n'),
Synset('09905672-n'), Synset('07692347-n'), Synset('03907626-n'),
Synset('02712903-n'), Synset('02005890-v')]
>>> synsets('eng','dog', cat='V2')
[Synset('02005890-v')]
>>> synsets('eng','dogged')
[Synset('02005890-v')]
```

Since in GF WordNet we have inflection tables and not just lemmas,
the look up works on any inflection form and not only on the lemma.
On the other hand, some languages (Finnish, Zulu) store in the inflection tables
stems rather than full forms. In that case the lookup will work on the stems instead.

A synset is most often identified with its offset in Princeton WordNet 3.1,
other senses are identified by their Qid in WikiData. Some senses have
both WordNet offset and a Qid:
```Python
>>> synset('02086723-n')
Synset('02086723-n')
>>> print(synset('02086723-n').definition())
a member of the genus Canis (probably descended from the common wolf) that has been domesticated by man since prehistoric times; occurs in many breeds
>>> len(synset('02086723-n').examples())
21
>>> print(synset('02086723-n').examples()[0])
PhrUtt NoPConj (UttNP (AdvNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA absurd_2_A) (UseN excuse_1_N))) (SubjS that_Subj (UseCl (TTAnt TPast ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN dog_1_N)) (ComplSlash (SlashV2a eat_3_V2) (DetCN (DetQuant (PossPron he_Pron) NumSg) (UseN homework_N)))))))) NoVoc
>>> linearize('eng',synset('02086723-n').examples()[0])
the absurd excuse that the dog ate his homework
>>> synset('02086723-n').lexemes()
[Lexeme('dog_1_N')]
>>> [lexeme.linearization("eng") for lexeme in synset('02086723-n').lexemes()]
['dog']
>>> lexeme('dog_1_N').synset()
Synset('02086723-n')
>>> synset('Q1075128').lexemes()
[Lexeme('izvornik_8_LN')]
>>> synset('Q1075128').definition()
'village of Bulgaria'
```
Note that Princeton WordNet contains only one example for the sense dog_1_N. In GF WordNet, on the other hand,
the corpus is parsed and sense disambiguated. Thanks to that we have identified 22 examples, so far.

All functions and methods which work on a specific language take the language code as their first
argument. You can find the list of languages with the function `lang`. After that you can lookup a word,
in any of the languages:
```Python
>>> langs()
['afr', 'bul', 'cat', 'chi', 'dut', 'eng', 'est', 'fin', 'fre', 'ger', 'ita', 'kor', 'mlt', 'pol', 'por', 'ron', 'rus', 'slv', 'som', 'spa', 'swa', 'swe', 'tha', 'tur', 'zul']
>>> synsets('swe','hund')
[Synset('02086723-n'), Synset('10042764-n'), Synset('09905672-n'), Synset('02087384-n'), Synset('Q31385072'), Synset('Q37575615')]
>>> synset('02086723-n').linearizations('swe')
['hund']
>>> synset('02086723-n').linearizations('bul')
['куче']
>>> lexemes('bul','куче')
[Lexeme('canine_2_N'), Lexeme('dog_1_N'), Lexeme('dog_3_N'), Lexeme('dog_4_N'), Lexeme('pooch_N'), Lexeme('tike_1_N'), Lexeme('tyke_2_N'), Lexeme('cuche_7_SN'), Lexeme('kuče_3_LN'), Lexeme('küche_3_LN'), Lexeme('küche_4_SN')]
```

You can also search for synonyms which are returned as a list of sets for the different senses of the input word
in the given language, since these different senses are not mutual synonyms:
```Python
>>> synonyms('eng','car')
[{'machine', 'auto', 'automobile', 'motorcar'}, {'railcar'}, {'gondola'}, {'cable-car'}]
>>> synonyms('spa', 'coche')
[{'vagón'}, {'vagón'}, {'coche'}, {'auto', 'carro', 'máquina', 'automóvil'}, {'coche'}, {'carmelita', 'vagón'}]
```

## Synsets
Synset: a set of synonyms that share a common meaning.

```Python
>>> dog = synset('02086723-n')
>>> dog.hypernyms()
[Synset('02085998-n'), Synset('01320032-n')]
>>> dog.hyponyms()
[Synset('01325095-n'), Synset('02087384-n'), Synset('02087513-n'), Synset('02087924-n'), ...]

>>> dog.member_holonyms()
[Synset('02086515-n'), Synset('08011383-n')]
>>> cat = synset('02124272-n')
>>> lowest_common_hypernyms(dog, cat)
[Synset('02077948-n')]
>>> synset('02077948-n').definition()
a terrestrial or aquatic flesh-eating mammal
```

Note that some relations are defined in WordNet only over Lemmas:
```Python
>>> good = synset('01126910-a')
>>> good.antonyms()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Synset' object has no attribute 'antonyms'. Did you mean: 'hyponyms'?
>>> good.lemmas()[0].antonyms()
[Lexeme('bad_1_A')]
```
The relations that are currently defined in this way are antonyms, participle, alsosee, and derived.

## Lexemes

```Python
>>> for lexeme in synset('01182162-v').lexemes():
...     print(lexeme, lexeme.prob())
...
Lexeme('eat_3_V2') 8.415824890136719
Lexeme('feed_6_V') 8.981807708740234
>>> for lexeme in lexemes('eng', 'eat', 'V2'):
...     print(lexeme, lexeme.prob())
...
Lexeme('eat_1_V2') 7.722677707672119
Lexeme('eat_3_V2') 8.415824890136719
Lexeme('eat_4_V2') 9.802119255065918
Lexeme('eat_5_V2') 9.802119255065918
Lexeme('eat_6_V2') 9.802119255065918
Lexeme('eat_away_1_V2') 9.802119255065918
Lexeme('eat_away_2_V2') 9.802119255065918
Lexeme('eat_into_V2') 9.802119255065918
Lexeme('eat_up_1_V2') 9.802119255065918
Lexeme('eat_up_2_V2') 9.802119255065918
Lexeme('eat_up_3_V2') 9.802119255065918
>>> lexeme('jump_11_V2')
Lexeme('jump_11_V2')
```
Lexemes can also have relations between them:
```Python
>>> vocal = lexeme('vocal_1_A')
>>> vocal.derived()
[Lexeme('voice_2_N'), Lexeme('vocalize_2_V2')]
>>> vocal.antonyms()
[Lexeme('instrumental_1_A')]
```
The relations above exist only on lemmas, not on synsets.

Some lexemes are linked to a Wikidata Qid and Wikipedia pages:
```Python
>>> sweden = lexeme('sweden_LN')
>>> sweden.qid()
'Q34'
>>> sweden.links()
[('Q34', 'Sweden', 'commons/0/06/EU-Sweden.svg'), ('Q34', 'Sweden', 'commons/2/28/Sweden_on_the_globe_(Europe_centered).svg'), ('Q34', 'Sweden', 'commons/3/30/Sweden_(orthographic_projection).svg'), ('Q34', 'Sweden', 'commons/4/4c/Flag_of_Sweden.svg'), ('Q34', 'Sweden', 'commons/7/7a/LocationSweden.svg'), ('Q34', 'Sweden', 'commons/a/a1/Shield_of_arms_of_Sweden.svg'), ('Q34', 'Sweden', 'commons/e/e5/Great_coat_of_arms_of_Sweden.svg')]
```

## Similarity

Synsets can be compared for similarity:
```Python
>>> dog   = synset('02086723-n')
>>> cat   = synset('02124272-n')
>>> human = synset('02474924-n')
>>> shortest_path_distance(dog,cat)
4
>>> path_similarity(dog,cat)
0.2
>>> shortest_path_distance(dog,human)
6
>>> path_similarity(dog,human)
0.14285714285714285
```

You can also search for similar lexemes by first finding the lowest common
hypernum:
```Python
>>> dog = synset('02086723-n')
>>> cat = synset('02124272-n')
>>> [carnivore] = lowest_common_hypernyms(dog, cat)
>>> carnivore.definition()
'a terrestrial or aquatic flesh-eating mammal'
>>> similar = carnivore.full_hyponyms()
>>> len(similar)
370
>>> [synset.lexemes() for synset in similar]
[[Lexeme('dog_1_N')], [Lexeme('puppy_1_N')], 
 [Lexeme('bow_wow_2_N'), Lexeme('doggie_N'), Lexeme('doggy_N'), Lexeme('pooch_N'), ...]
 ...
]
```

## Syntax

You can use the lexicon to compose phrases:
```Python
>>> expr = mkCN(lexeme('red_1_A').expression(), lexeme('apple_1_N').expression())
>>> linearize('eng', expr)
'red apple'
>>> linearize('swe', expr)
'rött äpple'
```
Since looking up a lexeme and composing an expression with it is very common, there is also a simpler way:
```Python
>>> expr = mkCN(w.red_1_A, w.apple_1_N)
>>> linearize('eng', expr)
'red apple'
>>> linearize('swe', expr)
'rött äpple'
```

The API for building phrases is mostly the same as the [RGL API](https://www.grammaticalframework.org/lib/doc/synopsis/index.html).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GrammaticalFramework/gf-wordnet",
    "name": "gf-wordnet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "GF WordNet",
    "author": "Krasimir Angelov",
    "author_email": "kr.angelov@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/26/45/7f55e74e60a34a7954c39a09b0ef9e942b8f4b8cd9dd018c324501cbc900/gf-wordnet-0.0.17.tar.gz",
    "platform": null,
    "description": "# A Python Interface to GF WordNet\n\nThe [GF WordNet](https://cloud.grammaticalframework.org/wordnet/)\n(on [GitHub](https://github.com/GrammaticalFramework/gf-wordnet)).\ncan be used as a regular GF grammar or you can also use\nit as a standalone Python library similar in style to `nltk.corpus.wordnet`.\nThe added benefit is that contrary to the usual WordNets in GF WordNet\nyou also have the RGL abstract syntax trees which lets you to \ncompose sentences in serveral languages.\n\nThe easiest way to get the library is via pip:\n```console\n$ pip3 install gf-wordnet\n```\nThis will install the library with its dependencies but it will not install the WordNet grammar.\nYou can download the latest precompiled version of the grammar as follows:\n```Python\n>>> import wordnet\nEither use wordnet.download(['ISO 639\u20112 code1', ...]) to download the grammar,\nor use wordnet.symlink('path to a folder') to link the library to an existing grammar.\nIf download() is called without an argument it will download all languages.\n>>> wordnet.download(['eng'])\nDownload and boot the grammar 355MB (Expanded to 2637MB)\nDownload the semantics database 2733MB done\nReload wordnet\n```\nWhen there is no grammar installed, the library prints a warning and then the `download` function\nis the only one that you can use. If you want more languages, add them in the list. If you call\n`download` with no arguments, all languages will be downloaded. Expect the grammar to be\naround 50GB in that case.\n\nThe wordnet library searches for a file called `Parse.pgf` or `Parse.ngf` in the path for Python modules and\nuses it as a grammar. You can change the path by either manipulating `sys.path` from Python or by\nsetting the `PYTHONPATH` environment variable. This is useful if you already have the grammar\nstored somewhere else and you need to tell Python where to find it.\n\n**Note:** When you use the `download` function, the grammar will be downloaded in the folder where the Python\nlibrary is installed. This means that if you have installed the library globally, then it will try to\nstore the grammar under `/usr/local/lib/python3.X`. For that to work you need to run the python shell\nas root during the download. After that you can use the library and the grammar from all users.\nOn the other hand, by default `pip` installs libraries under `/home/krasimir/.local/lib/python3.X`,\nso you don't need to do anything special.\n\nAfter the download is finished, you can import the library like this:\n```Python\n>>> import wordnet\n```\nFor more compact code, we recommend:\n```Python\n>>> from wordnet import *\n```\n\n## Words\n\nLook up the senses of a word form by using `synsets()`; this function\nhas an optional `cat` argument which lets you constrain the category of\nthe word:\n```Python\n>>> synsets('eng','dog')\n[Synset('02086723-n'), Synset('10133978-n'), Synset('10042764-n'),\nSynset('09905672-n'), Synset('07692347-n'), Synset('03907626-n'),\nSynset('02712903-n'), Synset('02005890-v')]\n>>> synsets('eng','dog', cat='V2')\n[Synset('02005890-v')]\n>>> synsets('eng','dogged')\n[Synset('02005890-v')]\n```\n\nSince in GF WordNet we have inflection tables and not just lemmas,\nthe look up works on any inflection form and not only on the lemma.\nOn the other hand, some languages (Finnish, Zulu) store in the inflection tables\nstems rather than full forms. In that case the lookup will work on the stems instead.\n\nA synset is most often identified with its offset in Princeton WordNet 3.1,\nother senses are identified by their Qid in WikiData. Some senses have\nboth WordNet offset and a Qid:\n```Python\n>>> synset('02086723-n')\nSynset('02086723-n')\n>>> print(synset('02086723-n').definition())\na member of the genus Canis (probably descended from the common wolf) that has been domesticated by man since prehistoric times; occurs in many breeds\n>>> len(synset('02086723-n').examples())\n21\n>>> print(synset('02086723-n').examples()[0])\nPhrUtt NoPConj (UttNP (AdvNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA absurd_2_A) (UseN excuse_1_N))) (SubjS that_Subj (UseCl (TTAnt TPast ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN dog_1_N)) (ComplSlash (SlashV2a eat_3_V2) (DetCN (DetQuant (PossPron he_Pron) NumSg) (UseN homework_N)))))))) NoVoc\n>>> linearize('eng',synset('02086723-n').examples()[0])\nthe absurd excuse that the dog ate his homework\n>>> synset('02086723-n').lexemes()\n[Lexeme('dog_1_N')]\n>>> [lexeme.linearization(\"eng\") for lexeme in synset('02086723-n').lexemes()]\n['dog']\n>>> lexeme('dog_1_N').synset()\nSynset('02086723-n')\n>>> synset('Q1075128').lexemes()\n[Lexeme('izvornik_8_LN')]\n>>> synset('Q1075128').definition()\n'village of Bulgaria'\n```\nNote that Princeton WordNet contains only one example for the sense dog_1_N. In GF WordNet, on the other hand,\nthe corpus is parsed and sense disambiguated. Thanks to that we have identified 22 examples, so far.\n\nAll functions and methods which work on a specific language take the language code as their first\nargument. You can find the list of languages with the function `lang`. After that you can lookup a word,\nin any of the languages:\n```Python\n>>> langs()\n['afr', 'bul', 'cat', 'chi', 'dut', 'eng', 'est', 'fin', 'fre', 'ger', 'ita', 'kor', 'mlt', 'pol', 'por', 'ron', 'rus', 'slv', 'som', 'spa', 'swa', 'swe', 'tha', 'tur', 'zul']\n>>> synsets('swe','hund')\n[Synset('02086723-n'), Synset('10042764-n'), Synset('09905672-n'), Synset('02087384-n'), Synset('Q31385072'), Synset('Q37575615')]\n>>> synset('02086723-n').linearizations('swe')\n['hund']\n>>> synset('02086723-n').linearizations('bul')\n['\u043a\u0443\u0447\u0435']\n>>> lexemes('bul','\u043a\u0443\u0447\u0435')\n[Lexeme('canine_2_N'), Lexeme('dog_1_N'), Lexeme('dog_3_N'), Lexeme('dog_4_N'), Lexeme('pooch_N'), Lexeme('tike_1_N'), Lexeme('tyke_2_N'), Lexeme('cuche_7_SN'), Lexeme('ku\u010de_3_LN'), Lexeme('k\u00fcche_3_LN'), Lexeme('k\u00fcche_4_SN')]\n```\n\nYou can also search for synonyms which are returned as a list of sets for the different senses of the input word\nin the given language, since these different senses are not mutual synonyms:\n```Python\n>>> synonyms('eng','car')\n[{'machine', 'auto', 'automobile', 'motorcar'}, {'railcar'}, {'gondola'}, {'cable-car'}]\n>>> synonyms('spa', 'coche')\n[{'vag\u00f3n'}, {'vag\u00f3n'}, {'coche'}, {'auto', 'carro', 'm\u00e1quina', 'autom\u00f3vil'}, {'coche'}, {'carmelita', 'vag\u00f3n'}]\n```\n\n## Synsets\nSynset: a set of synonyms that share a common meaning.\n\n```Python\n>>> dog = synset('02086723-n')\n>>> dog.hypernyms()\n[Synset('02085998-n'), Synset('01320032-n')]\n>>> dog.hyponyms()\n[Synset('01325095-n'), Synset('02087384-n'), Synset('02087513-n'), Synset('02087924-n'), ...]\n\n>>> dog.member_holonyms()\n[Synset('02086515-n'), Synset('08011383-n')]\n>>> cat = synset('02124272-n')\n>>> lowest_common_hypernyms(dog, cat)\n[Synset('02077948-n')]\n>>> synset('02077948-n').definition()\na terrestrial or aquatic flesh-eating mammal\n```\n\nNote that some relations are defined in WordNet only over Lemmas:\n```Python\n>>> good = synset('01126910-a')\n>>> good.antonyms()\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\nAttributeError: 'Synset' object has no attribute 'antonyms'. Did you mean: 'hyponyms'?\n>>> good.lemmas()[0].antonyms()\n[Lexeme('bad_1_A')]\n```\nThe relations that are currently defined in this way are antonyms, participle, alsosee, and derived.\n\n## Lexemes\n\n```Python\n>>> for lexeme in synset('01182162-v').lexemes():\n...     print(lexeme, lexeme.prob())\n...\nLexeme('eat_3_V2') 8.415824890136719\nLexeme('feed_6_V') 8.981807708740234\n>>> for lexeme in lexemes('eng', 'eat', 'V2'):\n...     print(lexeme, lexeme.prob())\n...\nLexeme('eat_1_V2') 7.722677707672119\nLexeme('eat_3_V2') 8.415824890136719\nLexeme('eat_4_V2') 9.802119255065918\nLexeme('eat_5_V2') 9.802119255065918\nLexeme('eat_6_V2') 9.802119255065918\nLexeme('eat_away_1_V2') 9.802119255065918\nLexeme('eat_away_2_V2') 9.802119255065918\nLexeme('eat_into_V2') 9.802119255065918\nLexeme('eat_up_1_V2') 9.802119255065918\nLexeme('eat_up_2_V2') 9.802119255065918\nLexeme('eat_up_3_V2') 9.802119255065918\n>>> lexeme('jump_11_V2')\nLexeme('jump_11_V2')\n```\nLexemes can also have relations between them:\n```Python\n>>> vocal = lexeme('vocal_1_A')\n>>> vocal.derived()\n[Lexeme('voice_2_N'), Lexeme('vocalize_2_V2')]\n>>> vocal.antonyms()\n[Lexeme('instrumental_1_A')]\n```\nThe relations above exist only on lemmas, not on synsets.\n\nSome lexemes are linked to a Wikidata Qid and Wikipedia pages:\n```Python\n>>> sweden = lexeme('sweden_LN')\n>>> sweden.qid()\n'Q34'\n>>> sweden.links()\n[('Q34', 'Sweden', 'commons/0/06/EU-Sweden.svg'), ('Q34', 'Sweden', 'commons/2/28/Sweden_on_the_globe_(Europe_centered).svg'), ('Q34', 'Sweden', 'commons/3/30/Sweden_(orthographic_projection).svg'), ('Q34', 'Sweden', 'commons/4/4c/Flag_of_Sweden.svg'), ('Q34', 'Sweden', 'commons/7/7a/LocationSweden.svg'), ('Q34', 'Sweden', 'commons/a/a1/Shield_of_arms_of_Sweden.svg'), ('Q34', 'Sweden', 'commons/e/e5/Great_coat_of_arms_of_Sweden.svg')]\n```\n\n## Similarity\n\nSynsets can be compared for similarity:\n```Python\n>>> dog   = synset('02086723-n')\n>>> cat   = synset('02124272-n')\n>>> human = synset('02474924-n')\n>>> shortest_path_distance(dog,cat)\n4\n>>> path_similarity(dog,cat)\n0.2\n>>> shortest_path_distance(dog,human)\n6\n>>> path_similarity(dog,human)\n0.14285714285714285\n```\n\nYou can also search for similar lexemes by first finding the lowest common\nhypernum:\n```Python\n>>> dog = synset('02086723-n')\n>>> cat = synset('02124272-n')\n>>> [carnivore] = lowest_common_hypernyms(dog, cat)\n>>> carnivore.definition()\n'a terrestrial or aquatic flesh-eating mammal'\n>>> similar = carnivore.full_hyponyms()\n>>> len(similar)\n370\n>>> [synset.lexemes() for synset in similar]\n[[Lexeme('dog_1_N')], [Lexeme('puppy_1_N')], \n [Lexeme('bow_wow_2_N'), Lexeme('doggie_N'), Lexeme('doggy_N'), Lexeme('pooch_N'), ...]\n ...\n]\n```\n\n## Syntax\n\nYou can use the lexicon to compose phrases:\n```Python\n>>> expr = mkCN(lexeme('red_1_A').expression(), lexeme('apple_1_N').expression())\n>>> linearize('eng', expr)\n'red apple'\n>>> linearize('swe', expr)\n'r\u00f6tt \u00e4pple'\n```\nSince looking up a lexeme and composing an expression with it is very common, there is also a simpler way:\n```Python\n>>> expr = mkCN(w.red_1_A, w.apple_1_N)\n>>> linearize('eng', expr)\n'red apple'\n>>> linearize('swe', expr)\n'r\u00f6tt \u00e4pple'\n```\n\nThe API for building phrases is mostly the same as the [RGL API](https://www.grammaticalframework.org/lib/doc/synopsis/index.html).\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "An API to the GF WordNet.",
    "version": "0.0.17",
    "project_urls": {
        "Homepage": "https://github.com/GrammaticalFramework/gf-wordnet"
    },
    "split_keywords": [
        "gf",
        "wordnet"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26457f55e74e60a34a7954c39a09b0ef9e942b8f4b8cd9dd018c324501cbc900",
                "md5": "b359d78503eba9b770be4a291dde4633",
                "sha256": "be864bfa5f502d5c4cfd5bdb2d41e5d2f06604aa7112bc674dd83d757741d5c1"
            },
            "downloads": -1,
            "filename": "gf-wordnet-0.0.17.tar.gz",
            "has_sig": false,
            "md5_digest": "b359d78503eba9b770be4a291dde4633",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20609,
            "upload_time": "2024-04-03T09:30:14",
            "upload_time_iso_8601": "2024-04-03T09:30:14.356341Z",
            "url": "https://files.pythonhosted.org/packages/26/45/7f55e74e60a34a7954c39a09b0ef9e942b8f4b8cd9dd018c324501cbc900/gf-wordnet-0.0.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-03 09:30:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GrammaticalFramework",
    "github_project": "gf-wordnet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gf-wordnet"
}
        
Elapsed time: 0.42751s