bangla-dictionary

A Complete Bangla Dictionary PyPI Module.


Keywords
python, online, dictionary, bangla, bengali, bangla_dict, corpus
License
MIT
Install
pip install bangla-dictionary==0.0.2

Documentation

BanglaDictionary

BanglaDictionary is a Python package that provides a dictionary for the Bengali (Bangla) language. It allows you to retrieve meanings, pronunciations, examples, parts of speech, types, and sources of words in the Bengali language.

Installation

You can install the BanglaDictionary package using pip:

Usage

Here's an example of how to use the BanglaDictionary package:

# Create an instance of the BanglaDictionary
from BanglaDictionary import BanglaDictionary
bd = BanglaDictionary()

# Get the meaning of a word
meaning = bd.get_meaning("āĻ…āĻ‡")
print(meaning)  # Output: "āĻĒāĻĻā§āĻ¯ā§‡ āĻ›āĻ¨ā§āĻĻā§‡āĻ° āĻ¨āĻŋāĻ°ā§āĻĻā§‡āĻļāĻ• āĻ¸ā§āĻŦāĻ°āĻŦāĻ°ā§āĻŖ"

# Get the pronunciation of a word
pronunciation = bd.get_pronunciation("āĻ…āĻ‚āĻ—ā§āĻˇā§āĻ āĻžāĻ¨āĻž")
print(pronunciation)  # Output: "āĻ“āĻ™ā§āĻ—ā§āĻļāĻ āĻžāĻ¨āĻž"

# Get an example sentence for a word
example = bd.get_example("āĻ…āĻ•āĻžāĻœ")
print(example)  # Output: "āĻ¸ā§‡ āĻšāĻ˛ā§‹ āĻ…āĻ•āĻžāĻœā§‡āĻ° āĻ•āĻžāĻœā§€āĨ¤"

# Get the part of speech (POS) of a word
pos = bd.get_pos("āĻ…āĻ•āĻžāĻŸā§āĻ¯")
print(pos)  # Output: "āĻŦāĻŋāĻŖ"

# Get the type of word
word_type = bd.get_type("āĻ…āĻ‹āĻŖ") 
print(word_type)  # Output: "āĻ…āĻ°ā§āĻĨ [āĻ…āĻ°ā§āĻĨāĻ¨ā§ˆāĻ¤āĻŋāĻ•]"

# Get the source of a word
source = bd.get_source("āĻ…āĻ•āĻžāĻŖā§āĻĄ")
print(source)  # Output: "āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ°āĻŋāĻ• āĻŦāĻžāĻ‚āĻ˛āĻž āĻ…āĻ­āĻŋāĻ§āĻžāĻ¨" 
# Get multiple meanings
meanings = bd.get_multiple_meanings("āĻ…āĻ‚āĻļāĻ­āĻžāĻ—ā§€", "āĻ…āĻ‚āĻļāĻ˛", "āĻ…āĻ‚āĻļāĻšāĻžāĻ°ā§€")
print(meanings)  # Output: {"āĻ…āĻ‚āĻļāĻ­āĻžāĻ—ā§€": "āĻ…āĻ‚āĻļ āĻĒāĻžāĻ“ā§ŸāĻžāĻ° āĻ¯ā§‹āĻ—ā§āĻ¯", "āĻ…āĻ‚āĻļāĻ˛": "āĻŦāĻ˛āĻŦāĻžāĻ¨", "āĻ…āĻ‚āĻļāĻšāĻžāĻ°ā§€": "āĻ…āĻ‚āĻļāĻ˛ā§‹āĻĒ"}

# Get multiple pronunciations
pronunciations = bd.get_multiple_pronunciations("āĻ…āĻ‚āĻļāĻšāĻžāĻ°ā§€", "āĻ…āĻ‚āĻļāĻžāĻ‚āĻļ", "āĻ…āĻ‚āĻļāĻžāĻ¨ā§‹")
print(pronunciations)  # Output: {"āĻ…āĻ‚āĻļāĻšāĻžāĻ°ā§€": "āĻ…āĻ™ā§â€ŒāĻļā§‹āĻšāĻ°", "āĻ…āĻ‚āĻļāĻžāĻ‚āĻļ": "āĻ…āĻ™ā§â€ŒāĻļāĻžāĻ™ā§â€ŒāĻļā§‹", "āĻ…āĻ‚āĻļāĻžāĻ¨ā§‹": "āĻ…āĻ™ā§â€ŒāĻļāĻžāĻ¨ā§‹"}

# Get multiple examples
examples = bd.get_multiple_examples("āĻ…āĻ•āĻ˛ā§āĻ¯āĻžāĻ¨", "āĻ…āĻ•āĻˇā§āĻŸāĻŦāĻĻā§āĻ§", "āĻ…āĻ•āĻ¸ā§āĻŽāĻžā§Ž")
print(examples)  # Output: {"āĻ…āĻ•āĻ˛ā§āĻ¯āĻžāĻ¨": "āĻ…āĻ•āĻ˛ā§āĻ¯āĻžāĻ¨ āĻāĻ‡ āĻ¸ā§āĻ°āĨ¤", "āĻ…āĻ•āĻˇā§āĻŸāĻŦāĻĻā§āĻ§": "āĻ¸āĻžāĻ§ā§ āĻŦāĻžāĻ‚āĻ˛āĻžāĻ° āĻŦāĻžāĻ•ā§āĻ¯ āĻ—āĻ āĻ¨ āĻĒāĻĻā§āĻ§āĻ¤āĻŋ āĻ…āĻ•āĻˇā§āĻŸāĻŦāĻĻā§āĻ§āĨ¤", "āĻ…āĻ•āĻ¸ā§āĻŽāĻžā§Ž": "āĻ›ā§‡ā§œā§‡āĻ›āĻŋ āĻ¸āĻŦ āĻ…āĻ•āĻ¸ā§āĻŽāĻžāĻ¤ā§‡āĻ° āĻ†āĻļāĻžāĨ¤"}

# Get multiple parts of speech (POS)
pos_list = bd.get_multiple_pos("āĻ…āĻ•āĻ˛ā§āĻ¯āĻžāĻŖāĻ•āĻ°", "āĻ…āĻ•āĻ˛ā§āĻŽāĻˇ", "āĻ…āĻ•āĻ¸ā§āĻŽāĻžā§Ž")
print(pos_list)  # Output: {"āĻ…āĻ•āĻ˛ā§āĻ¯āĻžāĻŖāĻ•āĻ°": "āĻŦāĻŋāĻŖ", "āĻ…āĻ•āĻ˛ā§āĻŽāĻˇ": "āĻŦāĻŋāĻŖ", "āĻ…āĻ•āĻ¸ā§āĻŽāĻžā§Ž": "āĻ•ā§āĻ°āĻŋāĻŦāĻŋāĻ¨"}

# Get multiple types
types = bd.get_multiple_types("āĻ…āĻ•āĻ°ā§‹āĻŸāĻŋ ", "āĻ…āĻ‹āĻŖā§€", "āĻ…āĻ‡āĻ°āĻžāĻ¨")
print(types)  # Output: {"āĻ…āĻ•āĻ°ā§‹āĻŸāĻŋ ": "āĻĒā§āĻ°āĻžāĻŖāĻŋ [āĻĒā§āĻ°āĻžāĻŖāĻŋāĻŦāĻŋāĻœā§āĻžāĻžāĻ¨]", "āĻ…āĻ‹āĻŖā§€": "āĻ…āĻ°ā§āĻĨ [āĻ…āĻ°ā§āĻĨāĻ¨ā§ˆāĻ¤āĻŋāĻ•]", "āĻ…āĻ‡āĻ°āĻžāĻ¨": "āĻĢāĻž. [āĻĢāĻžāĻ°āĻ¸āĻŋ]"}

# Get multiple sources
sources = bd.get_multiple_sources("āĻ…āĻ•āĻ°ā§‹āĻŸāĻŋ", "āĻ…āĻ‹āĻŖā§€", "āĻ…āĻ‡āĻ°āĻžāĻ¨")
print(sources)  # Output: {"āĻ…āĻ•āĻ°ā§‹āĻŸāĻŋ": "āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ°āĻŋāĻ• āĻŦāĻžāĻ‚āĻ˛āĻž āĻ…āĻ­āĻŋāĻ§āĻžāĻ¨", "āĻ…āĻ‹āĻŖā§€": "āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ°āĻŋāĻ• āĻŦāĻžāĻ‚āĻ˛āĻž āĻ…āĻ­āĻŋāĻ§āĻžāĻ¨", "āĻ…āĻ‡āĻ°āĻžāĻ¨": "āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ°āĻŋāĻ• āĻŦāĻžāĻ‚āĻ˛āĻž āĻ…āĻ­āĻŋāĻ§āĻžāĻ¨"}

Data Source

The data used by the BanglaDictionary package is sourced from Bangla Dictionary: Bangla Academy- āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ°āĻŋāĻ• āĻŦāĻžāĻ‚āĻ˛āĻž āĻ…āĻ­āĻŋāĻ§āĻžāĻ¨ . The dictionary provides meanings, pronunciations, examples, parts of speech, types, and sources for a wide range of Bengali words.

Contributing

If you find any issues or would like to contribute to the BanglaDictionary package, please feel free to open an issue or submit a pull request on the GitHub repository. You can contact via email: bip.sec22@gmail.com , afrarjahin@gmail.com

License

The BanglaDictionary package is released under the MIT License. You are free to use, modify, and distribute this package in your own projects.