Skip to main content

A Complete Bangla Dictionary PyPI Module.

Project description

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. Also It is a package that allows to build dictionary from Bangla and all other contents from a Bangla dictionary. It allows user how to create online dictionary from scratch and use it to other language'

Installation

You can install the BanglaDictionary package using pip:

pip install bangla_dictionary

File Structure

bangla_dictionary/
├── bangla_dictionary/
│   ├── dictionary/
│      ├── __init__.py
│      ├── bangla_dictionary.py
│   ├── ipa/
│      ├── __init__.py
│      ├── ipa.py
│   ├── __init__.py
│   │
│   ├── model/
│      ├── ipa_model.pth
│   ├── data/
│      ├── bangla_dictionary_pkl
│      ├── ipa_vocab_data
│   ├── model/
│      ├── __init__.py
│      ├── database.py
│      └── session.py
│   ├── scripts/
│      ├── preprocess.py
│      ├── read_pickle.py
│      ├── translator.py
│      ├── translator_module.py
│      ├── words.py
│      ├── write_pickle.py
│   ├── tests/
│      ├── __init__.py
│      ├── test_bangla_ipa.py
│      ├── test_config.py
│      ├── test_dict.py
│      ├── test_runner.py
│      ├── test_suite.py
│      ├── test_translator.py
├── word_details/
│   ├── banglaWords.txt
├── __init__.py
├── .gitignore
├── LICENSE
├── setup.py
├── README.md
└── requirements.txt
├── todo.txt

Usage

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

# Create an instance of the BanglaDictionary
from bangla_dictionary.dictionary.bangla_dictionary 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. Feel free to create issues to contact.

License

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

Project details


Download files

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

Source Distribution

bangla_dictionary-0.0.2.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

bangla_dictionary-0.0.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file bangla_dictionary-0.0.2.tar.gz.

File metadata

  • Download URL: bangla_dictionary-0.0.2.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.0.4 CPython/3.10.12

File hashes

Hashes for bangla_dictionary-0.0.2.tar.gz
Algorithm Hash digest
SHA256 baa02be4069c6befd30891d3d2bd4587287a12e83c1c490a9c3c0e981b4e3935
MD5 06f8d4d789b194f774b419cc49de8951
BLAKE2b-256 af5bff8bae9c9c6858e2b96ad3ac2f9fce1c84aa78725a8f18dc1cd3c4122d08

See more details on using hashes here.

File details

Details for the file bangla_dictionary-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: bangla_dictionary-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.0.4 CPython/3.10.12

File hashes

Hashes for bangla_dictionary-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04128b06d725ef683d401270f9c6ec4bec037acb967175f233a8902d00f8854e
MD5 c97f66033f3f469eabbd9b1bcfc5a54a
BLAKE2b-256 e5c97d54723e239ade0d1aabf0d6c18f69774a28657f7bb218768a832c88cbd5

See more details on using hashes here.

Supported by

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