/indonesian-news-category-classifier

Classify category of an Indonesian news.

Primary LanguageJavaScriptMIT LicenseMIT

indonesian-news-category-classifier

NPM version Build Status Dependency Status

Classify category of an Indonesian news.

Install

$ npm install --save indonesian-news-category-classifier

Usage

var cls = require('indonesian-news-category-classifier')
var text = 'Southampton - Liverpool menang besar kala bertandang ke Southampton di babak kelima Piala Liga Inggris.'

cls.predict(text)
/*
{
  "text": "Southampton - Liverpool menang besar kala bertandang ke Southampton di babak kelima Piala Liga Inggris.",
  "scores": [
    ["edukasi", 0],
    ["health", 0],
    ["otomotif", 0.01105690398096329],
    ["travel", 0],
    ["lifestyle", 0.005535347700350083],
    ["techno", 0],
    ["internasional", 0.017679008325458944],
    ["entertainment", 0.037913594950406894],
    ["ibukota", 0.009704732756494333],
    ["bisnis", 0.003148003916906026],
    ["sport", 0.9030505827942292],
    ["nasional", 0.011911825575191133]
  ],
  "prediction": "sport"
}
*/

License

MIT © Pandu