Glossary.py
Glossary.py is a Python module that interacts with an online dictionary API. It's designed to fetch and manage word descriptions, phonetics, and semantics in a structured way.
Key Features:
- Fetches word descriptions, phonetics, and semantics from an online dictionary API.
- Implements a class-based approach for managing fetched data.
- Allows to set a limit for the number of descriptions per part of speech for a word.
- Provides audio transcription and audio file link for the fetched word.
- Allows to get all definitions or definitions based on a part of speech.
How to Use:
from glossary import Glossary
rules = Glossary.Rules()
rules.set_limit_of_descriptions(3)
word = Glossary.Word('example', rules)
if word.exists():
print(word.get_transcription())
print(word.get_audio())
print(word.get_all_definitions())
print(word.get_definitions_of_part_of_speech('noun'))
Requirements:
Please note, this module relies on the API at https://api.dictionaryapi.dev/api/v2/entries/en/{input_word}
for fetching word data. Ensure you have a stable internet connection while using this module.