Skip to main content

Python Dictionary (meaning, synonyms, antonyms, pos)

Project description

Pytionary - A cool 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

Project details


Release history Release notifications | RSS feed

This version

1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytionary-1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytionary-1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pytionary-1.tar.gz.

File metadata

  • Download URL: pytionary-1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for pytionary-1.tar.gz
Algorithm Hash digest
SHA256 f61799d7c0e848a0d47d7140adf81dc5a151d255abd6870ad5305d85562a378a
MD5 3aad059682f91165354764be5c6266dc
BLAKE2b-256 817be20ccdbaf03b06a48908e66d3b442ab11530a1d76e0c9670f89f0ff78685

See more details on using hashes here.

File details

Details for the file pytionary-1-py3-none-any.whl.

File metadata

  • Download URL: pytionary-1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for pytionary-1-py3-none-any.whl
Algorithm Hash digest
SHA256 76db6e7c60b5b5333b0ea8755ddfb16404bdf6b5ed3eb8ac24918c87beca4fa4
MD5 5650cd647f551081ecb2877798bc5c2c
BLAKE2b-256 7b4d4ce3117f8a740e83c906f2e80c564fde3252290ac3a64536f55e226ab388

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page