Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anpandu/indonesian-news-category-classifier
Classify category of an Indonesian news.
https://github.com/anpandu/indonesian-news-category-classifier
Last synced: about 2 months ago
JSON representation
Classify category of an Indonesian news.
- Host: GitHub
- URL: https://github.com/anpandu/indonesian-news-category-classifier
- Owner: anpandu
- License: mit
- Created: 2016-02-13T17:25:57.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-14T08:12:01.000Z (almost 9 years ago)
- Last Synced: 2024-09-19T02:25:05.424Z (3 months ago)
- Language: JavaScript
- Size: 1.1 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# indonesian-news-category-classifier
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
Classify category of an Indonesian news.
## Install
```sh
$ npm install --save indonesian-news-category-classifier
```## Usage
```js
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](http://github.com/anpandu)
[npm-image]: https://badge.fury.io/js/indonesian-news-category-classifier.svg
[npm-url]: https://npmjs.org/package/indonesian-news-category-classifier
[travis-image]: https://travis-ci.org/anpandu/indonesian-news-category-classifier.svg?branch=master
[travis-url]: https://travis-ci.org/anpandu/indonesian-news-category-classifier
[daviddm-image]: https://david-dm.org/anpandu/indonesian-news-category-classifier.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/anpandu/indonesian-news-category-classifier