Classifier category from JSer item or text.
テキストからJSer.infoにおけるカテゴライズをベイズ推論して、カテゴリ名を返します。
カテゴリは次の通りです。
var Category = {
Headline: "ヘッドライン",
Article: "アーティクル",
SlideVideo: "スライド、動画関係",
WebsiteDocument: "サイト、サービス、ドキュメント",
SoftwareLibrary: "ソフトウェア、ツール、ライブラリ関係",
Book: "書籍関係"
};
- jser/jser-item-category-parser: JSer.info post item category parser.
- jser/stat-js: JSer.info stat library
- NaturalNode/natural: general natural language facilities for nodeK
Install with npm:
npm install @jser/classifier-item-category
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
})()
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu