-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Tokenizing Example with Kagome | ||
|
||
## Analyzing a Japanese text into words and parts of speech with Kagome | ||
|
||
This example demonstrates how to analyzes a sentence (tokenize) and get the part-of-speech (POS) of each word using Kagome. | ||
|
||
- Target text data is as follows: | ||
|
||
```text | ||
すもももももももものうち | ||
``` | ||
|
||
- Example output: | ||
|
||
```shellsession | ||
$ cd /path/to/kagome/_examples/tokenize | ||
$ go run . | ||
---tokenize--- | ||
すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ | ||
も 助詞,係助詞,*,*,*,*,も,モ,モ | ||
もも 名詞,一般,*,*,*,*,もも,モモ,モモ | ||
も 助詞,係助詞,*,*,*,*,も,モ,モ | ||
もも 名詞,一般,*,*,*,*,もも,モモ,モモ | ||
の 助詞,連体化,*,*,*,*,の,ノ,ノ | ||
うち 名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチ | ||
``` | ||
|
||
> __Note__ that tokenization varies depending on the dictionary used. In this example we use the IPA dictionary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Wakati Example with Kagome | ||
|
||
## Segmenting Japanese text into words with Kagome | ||
|
||
In this example, we demonstrate how to segment Japanese text into words using Kagome. | ||
|
||
- Target text data is as follows: | ||
|
||
```text | ||
すもももももももものうち | ||
``` | ||
|
||
- Example output: | ||
|
||
```shellsession | ||
$ cd /path/to/kagome/_examples/wakati | ||
$ go run . | ||
----wakati--- | ||
すもも/も/もも/も/もも/の/うち | ||
``` | ||
|
||
> __Note__ that segmentation varies depending on the dictionary used. | ||
> In this example we use the IPA dictionary. But for searching purposes, the Uni dictionary is recommended. | ||
> | ||
> - [What is a Kagome dictionary?](https://github.com/ikawaha/kagome/wiki/About-the-dictionary#what-is-a-kagome-dictionary) | Wiki | kagome @ GitHub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# WebAssembly Example of Kagome | ||
# WebAssembly Example with Kagome | ||
|
||
- Build | ||
|
||
|