Skip to content

Basic Usage


WordHoard is a Python 3 module that was designed using the rules of simplicity, which try to limit overly complex configuration requirements and keeps backend user intervention to the bare minimum.

Antonyms Module Usage🔗

An antonym is word that has the exact opposite meaning of another word or its antonym.

Antonym examples:

  • good and bad
  • slow and fast
  • stop and go
from wordhoard import Antonyms

antonym = Antonyms(search_string='mother')
antonym_results = antonym.find_antonyms()
print(antonym_results)
['dad', 'daddy', 'father', 'old man', 'pa', 'papa', 'pop', 'poppa']

Synonyms Module Usage🔗

A synonym is a word or phrase that means exactly or nearly the same as another word or phrase in the same language.

Synonym examples:

  • happy, joyful, elated, cheerful
  • bad, evil, rotten, corrupt
  • cold, chilly, freezing, frosty
from wordhoard import Synonyms

synonym = Synonyms(search_string='mother')
synonym_results = synonym.find_synonyms()
print(synonym_results)
['ancestor', 'biological mother', 'birth mother', 'child-bearer', 'creator', 
'dam', 'female parent', 'forebearer', 'foster mother', 'ma', 'mama', 'mamma', 
'mammy', 'mater', 'mom', 'momma', 'mommy', 'mother-in-law', 'mum', 'mummy', 
'old lady', 'old woman', 'origin', 'para i', 'parent', 'predecessor', 
'primipara', 'procreator', 'progenitor', 'puerpera', 'quadripara', 
'quintipara', 'source', 'supermom', 'surrogate mother']

Definitions Module Usage🔗

A definition is a statement of the exact meaning of a word, especially in a dictionary.

from wordhoard import Definitions

definition = Definitions(search_string='mother')
definition_results = definition.find_definitions()
print(definition_results)
["a person's own mother", 'a woman who has given birth to a child (also used as a term of address to your mother)',
'female person who has borne children']

Homophones Module Usage🔗

A homophone is a word that is pronounced the same as another word but differs in meaning.

Homophone examples:

  • one is a homophone of won
  • ate is a homophone of eight
  • meet is a homophone of meat
from wordhoard import Homophones

homophone = Homophones(search_string='horse')
homophone_results = homophone.find_homophones()
print(homophone_results)
['horse is a homophone of hoarse']

Hypernyms Module Usage🔗

Hypernym: (semantics) A word or phrase whose referents form a set including as a subset the referents of a subordinate term. Musical instrument is a hypernym of "guitar" because a guitar is a musical instrument.

A hypernym is a word with a broad meaning that more specific words fall under. Other names for hypernym include umbrella term and blanket term.

Hypernym examples:

  • diamond is a hypernym of gem
  • eagle is a hypernym of bird
  • red is a hypernym of color
from wordhoard import Hypernyms

hypernym = Hypernyms(search_string='red')
hypernym_results = hypernym.find_hypernyms()
print(hypernym_results)
['amount', 'amount of money', 'card games', 'chromatic color', 'chromatic colour', 
'color', 'colour', 'cooking', 'geographical name', 'hair', 'hair color', 'lake', 
'person', 'radical', 'rainbow', 'river', 'spectral color', 'spectral colour', 
'sum', 'sum of money']

Hyponyms Module Usage🔗

A hyponym is a word of more specific meaning than a general or superordinate term applicable to it.

Hyponym examples:

  • horse is a hyponym of animal
  • table is a hyponym of furniture
  • maple is a hyponym of tree
from wordhoard import Hyponyms

hyponym = Hyponyms(search_string='horse')
hyponym_results = hyponym.find_hyponyms()
print(hyponym_results)
['american saddlebred', 'andalusian horse', 'arabian horse', 'azteca horse', 
'barb horse', 'belgian horse','belgian warmblood', 'clydesdale horse', 
'coldblood trotter', 'curly horse', 'dutch warmblood', 'ethiopian horses',
'falabella', 'fjord horse', 'friesian horse', 'gypsy horse', 'lusitano',
"przewalski's horse", 'shire horse', 'wild horse']

Last update: February 13, 2023