@jser/classifier-item-category

2.0.0 • Public • Published

@jser/classifier-item-category

Classifier category from JSer item or text.

テキストからJSer.infoにおけるカテゴライズをベイズ推論して、カテゴリ名を返します。

カテゴリは次の通りです。

var Category = {
    Headline: "ヘッドライン",
    Article: "アーティクル",
    SlideVideo: "スライド、動画関係",
    WebsiteDocument: "サイト、サービス、ドキュメント",
    SoftwareLibrary: "ソフトウェア、ツール、ライブラリ関係",
    Book: "書籍関係"
};

Install

Install with npm:

npm install @jser/classifier-item-category

Usage

import { fetchPostDetails } from "@jser/data-fetcher";
import { JSerClassifier, CategoryKey } from "@jser/classifier-item-category";
(async () => {
   const postDetails = await fetchPostDetails();
   const classifier = new JSerClassifier({
       postDetails
   });
   classifier.classifyText("これはGitHubで公開されている言語処理のライブラリです。");
   // === CategoryKey.SoftwareLibrary
})()

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Readme

Keywords

Package Sidebar

Install

npm i @jser/classifier-item-category

Weekly Downloads

12

Version

2.0.0

License

MIT

Unpacked Size

37.2 kB

Total Files

15

Last publish

Collaborators

  • azu
  • jser-user