sagorbrur/bnlp

BNLP is a natural language processing toolkit for Bengali Language.

What it solves

Bengali is one of the most widely spoken languages, yet NLP resources for it are limited. BNLP provides a complete toolkit for common natural language processing tasks in Bengali, so developers don't have to piece together fragile custom scripts for tokenization, word embeddings, tagging, text cleaning, and more.

How it works

The library bundles multiple tokenizers (basic, NLTK-based, SentencePiece), several pre-trained word embedding models (Word2Vec, FastText, GloVe) plus document embeddings (Doc2Vec), and CRF-based models for part-of-speech tagging and named entity recognition. It also includes text cleaning, a corpus class with common linguistic resources (letters, vowels, stopwords, punctuation), a spell checker based on SymSpell, and a language detector powered by FastText's 176-language model. Beyond the Python API, it offers a command-line interface for quick tasks, a pipeline API to chain operations, batch processing for efficiency, and both async and lazy model loading so large models don't block your application.

Who it's for

Researchers, students, and developers building Bengali-language applications—chatbots, search tools, text analysis systems—who need a reliable, pre-built NLP layer. It's also useful for anyone who wants to experiment with Bengali text without training models from scratch.

Highlights

  • Multiple tokenizers: basic, NLTK, SentencePiece
  • Pre-trained embeddings: Word2Vec, FastText, GloVe (word) and Doc2Vec (document)
  • CRF-based POS tagging and named entity recognition
  • Spell checking using SymSpell, with custom dictionary support
  • Language detection for 176 languages via FastText
  • CLI, pipeline API, batch processing, async & lazy model loading
  • Includes Bengali corpus data: letters, vowels, punctuation, stopwords

Related

  • Project
  • Project
  • Project
  • Project