https://github.com/kruzezab/pytionary
Pytionary - A cool dictionary module for python to get meanings, pos, synonyms, antonyms of the given word.
https://github.com/kruzezab/pytionary
dictionary library module package python
Last synced: 9 months ago
JSON representation
Pytionary - A cool dictionary module for python to get meanings, pos, synonyms, antonyms of the given word.
- Host: GitHub
- URL: https://github.com/kruzezab/pytionary
- Owner: KruzeZab
- License: mit
- Created: 2020-03-27T03:10:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T03:40:57.000Z (over 6 years ago)
- Last Synced: 2025-03-30T15:47:53.128Z (over 1 year ago)
- Topics: dictionary, library, module, package, python
- Language: Python
- Homepage: https://pypi.org/project/pytionary/
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pytionary - A cool lightweight dictionary module for python to get meanings, pos, synonyms, antonyms of the given word.
It uses requests and BeautifulSoup as dependencies.
Installation
The easiest way to install is through pip:
```
pip install pytionary
```
With Easy_Install
```
easy_install pytionary
```
Usage
It is very easy to get started with pytionary. You just create an instance of the Pytionary class.
```
from pytionary import Pytionary #import module
gloss = Pytionary() #create object
```
This will create an instance of the pytionary class. Now, you have access to its methods.
To get the meaning of the word:
```
print(gloss.meanings('tuna'))
```
This returns a list of the meanings. For example:
```
['any of several large food and game fishes of the family Scombridae, inhabiting temperate and tropical seas.Compare albacore, bluefin tuna, yellowfin tuna.', 'any of various related fishes.', ' Also called tuna fish. the flesh of the tuna, used as food.', 'any of various prickly pears, especially either of two erect, treelike species, Opuntia tuna or O.
ficus-indica, of Mexico, bearing a sweet, edible fruit.', 'the fruit of these plants.', 'Also called: tunny any of various large marine spiny-finned fishes of the genus Thunnus, esp T. thynnus, chiefly of warm waters: family Scombridae .
They have a spindle-shaped body and widely forked tail, and are important food fishes', 'any of various similar and related fishes', 'any of various tropical American prickly pear cacti, esp Opuntia tuna, that are cultivated for their sweet edible fruits', 'the fruit of any of these cacti']
```
For pos (verb/adj/noun)
```
print(gloss.pos('tuna'))
```
For synonyms:
```
print(gloss.synonyms('tuna'))
```
For antonyms:
```
print(gloss.antonyms('tuna'))
```
Full Example
```
from pytionary import Pytionary
word = 'tuna'
gloss = Pytionary() #Create object
print(gloss.pos(word)) #return pos(noun/verb/adj)
print(gloss.meanings(word)) #return meanings
print(gloss.synonyms(word)) #return synonyms
print(gloss.antonyms(word)) #return antonyms
```