• Stars
    star
    147
  • Rank 243,823 (Top 5 %)
  • Language
    Python
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Description Describes the IndicNLP corpus and associated datasets

AI4Bharat-IndicNLP Dataset

The AI4Bharat-IndicNLP dataset is an ongoing effort to create a collection of large-scale, general-domain corpora for Indian languages. Currently, it contains 2.7 billion words for 10 Indian languages from two language families. We share pre-trained word embeddings trained on these corpora. We create news article category classification datasets for 9 languages to evaluate the embeddings. We evaluate the IndicNLP embeddings on multiple evaluation tasks.

You can read details regarding the corpus and other resources HERE. We showcased the AI4Bharat-IndicNLP dataset at REPL4NLP 2020 (collocated with ACL 2020) (non-archival submission as extended abstract). You can see the talk here: VIDEO.

You can use the IndicNLP corpus and embeddings for multiple Indian language tasks. A comprehensive list of Indian language NLP resources can be found in the IndicNLP Catalog. For processing the Indian language text, you can use the Indic NLP Library.

Table of contents

Text Corpora

The text corpus for 12 languages.

Language # News Articles* Sentences Tokens Link
as 0.60M 1.39M 32.6M link
bn 3.83M 39.9M 836M link
en 3.49M 54.3M 1.22B link
gu 2.63M 41.1M 719M link
hi 4.95M 63.1M 1.86B link
kn 3.76M 53.3M 713M link
ml 4.75M 50.2M 721M link
mr 2.31M 34.0M 551M link
or 0.69M 6.94M 107M link
pa 2.64M 29.2M 773M link
ta 4.41M 31.5M 582M link
te 3.98M 47.9M 674M link

Note

  • The vocabulary frequency files contain the frequency of all unique tokens in the corpus. Each line contains one word along with frequency delimited by tab.
  • For convenience, the corpus is already tokenized using the IndicNLP tokenizer. You can use the IndicNLP detokenizer in case you want a detokenized version.

Pre-requisites

To replicate the results reported in the paper, training and evaluation scripts are provided.

To run these scripts, the following tools/packages are required:

For Python packages to install, see requirements.txt

Word Embeddings

DOWNLOAD

Version 1

language pa hi bn or gu mr kn te ml ta
vectors link link link link link link link link link link
model link link link link link link link link link link

Training word embeddings

$FASTTEXT_HOME/build/fasttext skipgram \
	-epoch 10 -thread 30 -ws 5 -neg 10    -minCount 5 -dim 300 \
	-input $mono_path \
	-output $output_emb_prefix 

Evaluation on word similarity task

Evaluate on the IIIT-H Word Similarity Database: DOWNLOAD

The above mentioned link is a cleaned version of the same database found HERE.

Evaluation Command

python scripts/word_similarity/wordsim.py \
	<embedding_file_path> \
	<word_sim_db_path> \
	<max_vocab>

Evaluation on word analogy task

Evaluate on the Facebook word analogy dataset.

Evaluation Command

First, add MUSE root directory to Python Path

export PYTHONPATH=$PYTHONPATH:$MUSE_PATH
python  scripts/word_analogy/word_analogy.py \
    --analogy_fname <analogy_fname> \
    --embeddings_path <embedding_file_path> \
    --lang 'hi' \
    --emb_dim 300 \
    --cuda

IndicNLP News Article Classification Dataset

We used the IndicNLP text corpora to create classification datasets comprising news articles and their categories for 9 languages. The dataset is balanced across classes. The following table contains the statistics of our dataset:

Language Classes Articles per Class
Bengali entertainment, sports 7K
Gujarati business, entertainment, sports 680
Kannada entertainment, lifestyle, sports 10K
Malayalam business, entertainment, sports, technology 1.5K
Marathi entertainment, lifestyle, sports 1.5K
Oriya business, crime, entertainment, sports 7.5K
Punjabi business, entertainment, sports, politics 780
Tamil entertainment, politics, sport 3.9K
Telugu entertainment, business, sports 8K

DOWNLOAD

Evaluation Command

python3 scripts/txtcls.py --emb_path <path> --data_dir <path> --lang <lang code>

Publicly available Classification Datasets

We also evaluated the IndicNLP embeddings on many publicly available classification datasets.

  • ACTSA Corpus: Sentiment analysis corpus for Telugu sentences.
  • BBC News Articles: Text classification corpus for Hindi documents extracted from BBC news website.
  • IIT Patna Product Reviews: Sentiment analysis corpus for product reviews posted in Hindi.
  • INLTK Headlines Corpus: Obtained from inltk project. The corpus is a collection of headlines tagged with their news category. Available for langauges: gu, ml, mr and ta.
  • IIT Patna Movie Reviews: Sentiment analysis corpus for movie reviews posted in Hindi.
  • Bengali News Articles: Contains Bengali news articles tagged with their news category.

We have created standard test, validation and test splits for the above mentioned datasets. You can download them to evaluate your embeddings.

DOWNLOAD

Evaluation Command

To evaluate your embeddings on the above mentioned datasets, first download them and then run the following command:

python3 scripts/txtcls.py --emb_path <path> --data_dir <path> --lang <lang code>

License

These datasets are available under original license for each public dataset.

Morphanalyzers

IndicNLP Morphanalyzers are unsupervised morphanalyzers trained with morfessor.

DOWNLOAD

Version 1

pa hi bn or gu mr kn te ml ta

Training Command

## extract vocabulary from embedings file
zcat $embedding_vectors_path |  \
    tail -n +2 | \
    cut -f 1 -d ' '  > $vocab_file_path

## train morfessor 
morfessor-train -d ones \
        -S $model_file_path \
        --logfile  $log_file_path \
        --traindata-list $vocab_file_path \
        --max-epoch 10 

Citing

If you are using any of the resources, please cite the following article:

@article{kunchukuttan2020indicnlpcorpus,
    title={AI4Bharat-IndicNLP Corpus: Monolingual Corpora and Word Embeddings for Indic Languages},
    author={Anoop Kunchukuttan and Divyanshu Kakwani and Satish Golla and Gokul N.C. and Avik Bhattacharyya and Mitesh M. Khapra and Pratyush Kumar},
    year={2020},
    journal={arXiv preprint arXiv:2005.00085},
}

We would like to hear from you if:

  • You are using our resources. Please let us know how you are putting these resources to use.
  • You have any feedback on these resources.

License

Creative Commons License
IndicNLP Corpus is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contributors

  • Anoop Kunchukuttan
  • Divyanshu Kakwani
  • Satish Golla
  • Gokul NC
  • Avik Bhattacharyya
  • Mitesh Khapra
  • Pratyush Kumar

This work is the outcome of a volunteer effort as part of AI4Bharat initiative.

Contact

More Repositories

1

indicnlp_catalog

A collaborative catalog of NLP resources for Indic languages
526
star
2

Indic-BERT-v1

Indic-BERT-v1: BERT-based Multilingual Model for 11 Indic Languages and Indian-English. For latest Indic-BERT v2, check: https://github.com/AI4Bharat/IndicBERT
Python
271
star
3

IndicTrans2

Translation models for 22 scheduled languages of India
Python
181
star
4

indicTrans

indicTranslate v1 - Machine Translation for 11 Indic languages. For latest v2, check: https://github.com/AI4Bharat/IndicTrans2
Jupyter Notebook
110
star
5

Indic-TTS

Text-to-Speech for languages of India
Jupyter Notebook
91
star
6

OpenHands

👐OpenHands : Making Sign Language Recognition Accessible. | **NOTE:** No longer actively maintained. If you are interested to own this and take it forward, please raise an issue
Python
87
star
7

IndicLLMSuite

A blueprint for creating Pretraining and Fine-Tuning datasets for Indic languages
Python
72
star
8

IndicWav2Vec

Pretraining, fine-tuning and evaluation scripts for Indic-Wav2Vec2
Jupyter Notebook
71
star
9

IndicXlit

Transliteration models for 21 Indic languages
Python
64
star
10

NPTEL2020-Indian-English-Speech-Dataset

NPTEL2020: Speech2Text dataset for Indian-English Accent
Python
59
star
11

IndicBERT

Pretraining, fine-tuning and evaluation scripts for IndicBERT-v2 and IndicXTREME
Python
58
star
12

IndicNLP-Transliteration

Codebase for Indic-Transliteration using Seq2Seq RNN. For latest repo with Transformer-based models, check: https://github.com/AI4Bharat/IndicXlit
Python
57
star
13

Shoonya

Shoonya - Platform to Annotate and label data at scale.
46
star
14

indic-bart

Pre-trained, multilingual sequence-to-sequence models for Indian languages
Python
42
star
15

vistaar

Vistaar: Diverse Benchmarks and Training Sets for Indian Language ASR
Python
34
star
16

Chitralekha

Chitralekha - A video transcreation platform for Indic languages, supporting transcription, translation and voice-over
32
star
17

Indic-Input-Tool-UI

Web Interface for Transliteration for Indic languages.
JavaScript
22
star
18

Chitralekha-Backend

Transcribe your videos and translate it into Indic languages.
Python
21
star
19

Shoonya-Backend

DRF-based API server for Shoonya platform
Python
17
star
20

Svarah

Swarah: Indian-English speech dataset collected across the country
Python
16
star
21

INCLUDE

Code for INCLUDE paper with pre-trained models
Python
12
star
22

indic-asr-api-backend

Indic-Conformer models for ASR
Python
11
star
23

DocSim

Synthetically generate random text document images with ground-truth
Python
11
star
24

Dhruva-Platform

Dhruva is an open-source platform for serving language AI models at scale.
TypeScript
11
star
25

Shoonya-Frontend

JavaScript
10
star
26

Fonts-for-Indian-Scripts

Font style transfer for Devanāgarī script using GANs
Python
10
star
27

aacl23-mnmt-tutorial

Additional resources from our AACL tutorial
10
star
28

adapter-efficiency

Python
10
star
29

speech-transcript-cleaning

Perform cleaning and normalization to standardize speech transcripts (train and test) across datasets.
Python
8
star
30

ezAnnotate

Annotation Platform for Machine Learning / Data Science, forked from DataTurks
JavaScript
7
star
31

transactional-voice-ai

The code for transactional voice AI
Python
6
star
32

workshop-nlg-nlu-2022

Material for AI Workshop on Natural Language Understanding and Generation
6
star
33

Indic-Glossary-Explorer

Glossary service for Indian languages
JavaScript
6
star
34

Anudesh-Frontend

JavaScript
6
star
35

setu

HTML
6
star
36

IndicLID

Language Identification for Indian languages
Python
5
star
37

indicnlp.ai4bharat.org

Archived old website for AI4Bhārat Indic-NLP
HTML
5
star
38

Chitralekha-Frontend-Lite

Lightweight version of Chitralekha
JavaScript
5
star
39

sign-language.ai4bharat.org

Website for Indian Sign Language Recognition
4
star
40

INCLUDE-MS-Teams-Integration

An experimental Microsoft Teams integration of Sign Language models for word-level sign recognition
C#
4
star
41

Chitralekha-Frontend

Frontend for Chitralekha platform
JavaScript
4
star
42

Indic-Glossaries

Collection of datasets for glossaries in Indian languages
3
star
43

IndicSUPERB

Python
3
star
44

transactional-voice-ai_serving

Deployment code for all the Transactional Voice AI modules.
C++
3
star
45

CTQScorer

Python
3
star
46

Anudesh-Backend

Python
3
star
47

IndicMT-Eval

IndicMT Eval: A Dataset to Meta-Evaluate Machine Translation Metrics for Indian Languages, ACL 2023
HTML
3
star
48

indic-numtowords

Python
3
star
49

Indic-Swipe

IndicSwipe is a collection of datasets and neural model architectures for decoding swipe gesture inputs on touch-based Indic language keyboards across 7 languages.
Python
3
star
50

Indic-OCR

2
star
51

DMU-DataDaan

Codebase for NLTM DMU's Data Upload System
JavaScript
2
star
52

2022.ai4bharat.org

Old website of AI4Bhārat using TinaCMS
JavaScript
2
star
53

setu-translate

Python
2
star
54

Shoonya-Frontend-Old

Old version of Shoonya UI. Latest repo: https://github.com/AI4Bharat/Shoonya-Frontend
JavaScript
2
star
55

Varnam-Transliteration-UI

Transliteration Web Interface
JavaScript
1
star
56

models.ai4bharat.org

A website to showcase all the models built by the AI4Bharat team
JavaScript
1
star
57

Dhruva-Evaluation-Suite

A tool to perform functional testing and performance testing of the Dhruva Platform
Python
1
star
58

IndicVoices

1
star
59

indicnlp_suite

Natural Language Understanding resources for Indian languages
1
star
60

Input-Tools-By-AI4bharat

Enhance your typing experience in Chrome with AI4Bharat's Input Tools Chrome extension. This extension provides real-time transliteration suggestions for Indian languages, offering seamless integration into your typing workflow.
JavaScript
1
star