Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Astro36 committed Jul 11, 2018
1 parent 454c61d commit c7be9c3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ See [CHANGELOG](./CHANGELOG.md)

## Demo

See [Demo](http://astro36.github.io/Kokoa/demo.html)
See [Demo](https://astro36.github.io/Kokoa/demo/index.html)

## Features

- Train your own model.
- Extract words from the document.
- Find keywords and keysentences from the document.
- Fix space on the sentences.

## Installation

Expand All @@ -43,10 +44,9 @@ See [API](http://astro36.github.io/Kokoa/api/index.html)
Extract words from the given document:

```javascript
const { Kokoa, KokoaUtil } = require('kokoanlp');
const kokoa = new Kokoa(yourModel);
const util = new KokoaUtil(kokoa);
const words = util.words('태평양 전쟁 개전 당시 일본 해군의 전략은 외곽 방어망 곳곳에 배치된 지상비행장이 방어의 근거지가 되고 유사시 적을 방어선 가까이 끌어들이는 동안 항공기를 집결하여 격퇴하는 것이었다.');
const Kokoa = require('kokoanlp');
const kokoa = Kokoa.load('./data/kokoa.*.csv');
const words = kokoa.words('태평양 전쟁 개전 당시 일본 해군의 전략은 외곽 방어망 곳곳에 배치된 지상비행장이 방어의 근거지가 되고 유사시 적을 방어선 가까이 끌어들이는 동안 항공기를 집결하여 격퇴하는 것이었다.');
console.log(words); // ['태평양', '전쟁', '개전', '당시', '일본', '해군', '전략', '외곽', '방어', '곳곳에', '배치', '방어', '되고', '방어', '가까이', '동안', '항공', '것이']
```

Expand Down
18 changes: 12 additions & 6 deletions data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ Crawl 조선일보 articles:
python news_crawler.py --type 조선일보 --start-id 0003369060
```

## Prebuilt Data
## Prebuilt Data for Node.js

- [words.7z](./words.7z)
- [kokoa-data.7z](./kokoa-data.7z)

Unzip `words.7z` as CSV file.
Unzip `kokoa-data.7z` as CSV file.

You can use the prebuilt model with [KokoaModel.loadFile(file)](https://astro36.github.io/Kokoa/api/KokoaModel.html#.loadFile) function:
You can use the prebuilt model with [Kokoa.load(file)](https://astro36.github.io/Kokoa/api/Kokoa.html#.load) function:

```javascript
const { KokoaModel } = require('kokoanlp');
const model = KokoaModel.loadFile('./data/words.csv');
const Kokoa = require('kokoanlp');
const kokoa = Kokoa.load('./data/kokoa.*.csv');
```

## Prebuilt Data for Web

- [kokoa-data.csv](./kokoa-data.csv)

See [Demo](../demo/scripts/load.js)
Binary file added data/kokoa-data.7z
Binary file not shown.

0 comments on commit c7be9c3

Please sign in to comment.