BNLTK(Bangla Natural Language Processing Toolkit): a python package for NLP in Bangla
BNLTK(Bangla Natural Language Processing Toolkit) is open-source python package for Bengali Natural Language Processing. It includes modules for Tokenization, Stemming, Parts of speech tagging. I’m looking forward to helping form contributors to make this look far better than this.
pip install bnltk
from bnltk.tokenize import Tokenizers
t = Tokenizers()
print(t.bn_word_tokenizer(' আমার সোনার বাংলা । '))
from bnltk.stemmer import BanglaStemmer
bn_stemmer = BanglaStemmer()
print(bn_stemmer.stem('খেয়েছিলো'))
For using the Parts of Tagger you need to download some data files as follows:
from bnltk.bnltk_downloads import DataFiles
DataFiles().download()
After successfully downloading the files, then you can use this module.
from bnltk.pos_tagger import PosTagger
p_tagger = PosTagger()
p_tagger.loader()
sentences = 'দুশ্চিন্তার কোন কারণই নাই'
print(p_tagger.tagger(sentences))