/nlp-for-bengali

State of the Art Language models and Classifier for Bengali, which is primarily spoken by the Bengalis in South Asia.

Primary LanguageJupyter NotebookMIT LicenseMIT

NLP for Bengali

This repository contains State of the Art Language models and Classifier for Bengali language, which is primarily spoken by the Bengalis in South Asia.

The models trained here have been used in Natural Language Toolkit for Indic Languages (iNLTK)

Dataset

Created as part of this project

  1. Bengali Wikipedia Articles

Open Source Datasets

  1. Bengali News Articles (Soham Articles)

Results

Language Model Perplexity (on validation set)

Architecture/Dataset Bengali Wikipedia Articles
ULMFiT 41.2
TransformerXL 39.3

Classification Metrics

ULMFiT
Dataset Accuracy MCC Notebook to Reproduce results
Bengali News Articles (Soham Articles) 90.71 87.92 Link

Visualizations

Word Embeddings
Architecture Visualization
ULMFiT Embeddings projection
TransformerXL Embeddings projection

Results of using Transfer Learning + Data Augmentation from iNLTK

On using complete training set (with Transfer learning)
Dataset Dataset size (train, valid, test) Accuracy MCC Notebook to Reproduce results
Bengali News Articles (Soham Articles) (11284, 1411, 1411) 90.71 87.92 Link
On using 1% of training set (with Transfer learning)
Dataset Dataset size (train, valid, test) Accuracy MCC Notebook to Reproduce results
Bengali News Articles (Soham Articles) (112, 1411, 1411) 69.88 61.56 Link
On using 1% of training set (with Transfer learning + Data Augmentation)
Dataset Dataset size (train, valid, test) Accuracy MCC Notebook to Reproduce results
Bengali News Articles (Soham Articles) (112, 1411, 1411) 74.06 65.08 Link

Pretrained Models

Language Model

Download pretrained Language Model from here

Tokenizer

Trained tokenizer using Google's sentencepiece

Download the trained model and vocabulary from here