Skip to content

A neural network based text classification system for Burmese

License

Notifications You must be signed in to change notification settings

eimg/burmese-text-classifier

Repository files navigation

Burmese Text Classifier

A neural network based text classification system for Burmese. Implemented in JavaScript. See hello-nn-js for the techniques used in this system.

Usage

  • Edit data.js and ignore.js with your training data
  • Run train.js to train
$ node train.js
// ------
// 92 sentences in training data
// ------
// 92 documents
// 12 classes
// 124 unique words
// ------
// training with 20 neurons, alpha: 0.1
// input matrix: 92x124
// output matrix: 1x12
// ------
// delta after 10000 iterations:0.002545468273469531
// delta after 20000 iterations:0.0017300341895297772
// delta after 30000 iterations:0.0013860167538267646
// delta after 40000 iterations:0.0011858891220595713
// delta after 50000 iterations:0.001051459703515515
// delta after 60000 iterations:0.0009533639577651252
// delta after 70000 iterations:0.0008778035696994181
// delta after 80000 iterations:0.000817337497039643
// delta after 90000 iterations:0.0007675568174097644
// delta after 100000 iterations:0.0007256632173564647
// ------
// saved synapses to:synapses.json
// ------
  • Use classify() Function from classify.js
classify("နေကောင်းရဲ့လား");
// မိတ်ဆက်စကား, 0.9966511576460717

classify("ဒီကနေ့ဘယ်လိုလဲ");
// မေးခွန်း, 0.8306422363405445, အချိန်ပြစကား, 0.5086220260231158

classify("မနေ့ကကိစ္စစိတ်မဆိုးပါနဲ့");
// တောင်းပန်စကား, 0.9905498251445556, အချိန်ပြစကား, 0.589295553261357

classify("နားလည်ပေးတာကျေးဇူးတင်ပါတယ်");
// ကျေးဇူးစကား, 0.9970516008529035

classify("သွားလိုက်ဦးမယ်၊ နောက်မှတွေ့မယ်နော်");
// နှုတ်ဆက်စကား, 0.9998168889730704

Todo

  • Add sentence segmentation
  • Extract subject, object and action in sentence
  • Highlight classified words

Credit

About

A neural network based text classification system for Burmese

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •