Skip to content

Commit

Permalink
added instruction for juman++
Browse files Browse the repository at this point in the history
  • Loading branch information
Kensuke-Mitsuzawa committed Feb 24, 2017
1 parent 3d5aa4f commit 06feae9
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.*~
.python-version
.idea/
.idea/
neologd-user-dict.dic
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ install:
xz -dc ./neologd-mecab-ipadic-neologd-*/seed/mecab-user-dict-seed.*.csv.xz > ./mecab-user-dict-seed.csv
bash neologd2juman.sh mecab-user-dict-seed.csv
bash install-dictionary.sh
mv mecab-user-dict-seed.csv.dic neologd-user-dict.dic

clean:
rm mecab-ipadic-neologd.tar
Expand Down
96 changes: 95 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# neologd2juman

Convert `mecab-ipadic-neologd` to Juman dictionary
Convert `mecab-ipadic-neologd` to [Juman](http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN) dictionary

You're able to use this dictionary file for [Juman++](http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN++) also.

## Required

Expand Down Expand Up @@ -75,9 +77,43 @@ You may create other `jumanrc` instead of default `.jumanrc`.
)
```

# Use dictionary for Juman++

Use `neologd-user-dict.dic` for Juman++.
`neologd-user-dict.dic` is generated your make process.

You're supposed to download [Juman++](http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN++) and install it.

When you made download Juman++ and made unzip, you see following directories.

```
% ls
COPYING VERSION configure.ac missing
INSTALL aclocal.m4 depcomp sample
Makefile.am compile dict-build script
Makefile.in config.guess install-sh src
README.md config.sub jumanpp-manual.pdf
README_ja.md configure jumanpp-resource
```

Go to `./dict-build`, and you see `userdic/` there.
You copy `neologd-user-dict.dic` into `userdic/`

After that, you make dictionary for juman++.
With this command, the script sets new dictioanry for your Juman++.

```
% cd dict-build
% cp [PATH-TO-YOUR neologd-user-dict.dic FILE] userdic/neologd-user-dict.dic
% make
% [sudo] ./install.sh
```


# Comparison of Juman output

## Juman

You can call new dictionary with `-r` flag of Juman

```
Expand Down Expand Up @@ -137,3 +173,61 @@ EOS
```

"エン・ジャパン(株)", "西新宿駅" and "新宿アイランドタワー" are regardes as one morphemes by neologd.

## Juman++

Before adding:

```
エン エン エン 名詞 6 人名 5 * 0 * 0 "代表表記:エン/エン 自動獲得:Wikipedia Wikipedia人名 Wikipedia名 カタカナ 記英数カ"
・ ・ ・ 特殊 1 記号 5 * 0 * 0 "代表表記:・/・"
ジャパン じゃぱん ジャパン 名詞 6 地名 4 * 0 * 0 "代表表記:ジャパン/じゃぱん 地名:国:別称:日本 カタカナ 記英数カ"
( ( ( 特殊 1 括弧始 3 * 0 * 0 "代表表記:(/( 記号 記英数カ"
株 かぶ 株 名詞 6 普通名詞 1 * 0 * 0 "代表表記:株/かぶ 漢字読み:訓 カテゴリ:抽象物 ドメイン:ビジネス;無し 多義 漢字"
) ) ) 特殊 1 括弧終 4 * 0 * 0 "代表表記:)/) 記号 記英数カ"
は は は 助詞 9 副助詞 2 * 0 * 0 NIL
、 、 、 特殊 1 読点 2 * 0 * 0 "代表表記:、/、 記号 記英数カ"
西 にし 西 名詞 6 普通名詞 1 * 0 * 0 "代表表記:西/にし 漢字読み:訓 カテゴリ:場所-機能 漢字"
新宿 しんじゅく 新宿 名詞 6 地名 4 * 0 * 0 "代表表記:新宿/しんじゅく 地名:日本:東京都:区 漢字"
駅 えき 駅 名詞 6 普通名詞 1 * 0 * 0 "代表表記:駅/えき 漢字読み:音 地名末尾 カテゴリ:場所-施設 ドメイン:交通 漢字"
の の の 助詞 9 接続助詞 3 * 0 * 0 NIL
近く ちかく 近く 名詞 6 普通名詞 1 * 0 * 0 "代表表記:近く/ちかく カテゴリ:場所-機能;時間 反義:名詞-普通名詞:遠く/とおく 形容詞派生:近い/ちかい"
に に に 助詞 9 格助詞 1 * 0 * 0 NIL
ある ある ある 動詞 2 * 0 子音動詞ラ行 10 基本形 2 "代表表記:有る/ある 補文ト 反義:形容詞:無い/ない"
新宿 しんじゅく 新宿 名詞 6 地名 4 * 0 * 0 "代表表記:新宿/しんじゅく 地名:日本:東京都:区 漢字"
アイランドタワー アイランドタワー アイランドタワー 未定義語 15 カタカナ 2 * 0 * 0 "代表表記:アイランドタワー/アイランドタワー 品詞推定:名詞 カタカナ 記英数カ"
内 ない 内 接尾辞 14 名詞性名詞接尾辞 2 * 0 * 0 "代表表記:内/ない 漢字"
の の の 助詞 9 接続助詞 3 * 0 * 0 NIL
会社 かいしゃ 会社 名詞 6 普通名詞 1 * 0 * 0 "代表表記:会社/かいしゃ カテゴリ:組織・団体;場所-施設 ドメイン:ビジネス 漢字"
だ だ だ 判定詞 4 * 0 判定詞 25 基本形 2 NIL
。 。 。 特殊 1 句点 1 * 0 * 0 "代表表記:。/。 記号 記英数カ"
EOS
```


After Adding:

```
% echo "エン・ジャパン(株)は、西新宿駅の近くにある新宿アイランドタワー内の会社だ。" | jumanpp
エン・ジャパン(株) えんじゃぱんかぶしきがいしゃ エン・ジャパン(株) 名詞 6 組織名 6 * 0 * 0 "代表表記:エン・ジャパン/えんじゃぱんかぶしきがいしゃ"
は は は 助詞 9 副助詞 2 * 0 * 0 NIL
、 、 、 特殊 1 読点 2 * 0 * 0 NIL
西新宿駅 にししんじゅくえき 西新宿駅 名詞 6 固有名詞 3 * 0 * 0 "代表表記:西新宿駅/にししんじゅくえき"
の の の 助詞 9 接続助詞 3 * 0 * 0 NIL
近く ちかく 近く 名詞 6 普通名詞 1 * 0 * 0 "代表表記:近く/ちかく カテゴリ:場所-機能;時間 反義:名詞-普通名詞:遠く/とおく 形容詞派生:近い/ちかい"
に に に 助詞 9 格助詞 1 * 0 * 0 NIL
ある ある ある 動詞 2 * 0 子音動詞ラ行 10 基本形 2 "代表表記:有る/ある 補文ト 反義:形容詞:無い/ない"
新宿 しんじゅく 新宿 名詞 6 地名 4 * 0 * 0 "代表表記:新宿/しんじゅく 地名:日本:東京都:区"
アイランドタワー アイランドタワー アイランドタワー 未定義語 15 その他 1 * 0 * 0 "品詞推定:名詞"
内 ない 内 接尾辞 14 名詞性名詞接尾辞 2 * 0 * 0 "代表表記:内/ない"
の の の 助詞 9 接続助詞 3 * 0 * 0 NIL
会社 かいしゃ 会社 名詞 6 普通名詞 1 * 0 * 0 "代表表記:会社/かいしゃ カテゴリ:組織・団体;場所-施設 ドメイン:ビジネス"
だ だ だ 判定詞 4 * 0 判定詞 25 基本形 2 NIL
。 。 。 特殊 1 句点 1 * 0 * 0 NIL
EOS
```

You see following improvement,

- `エン・ジャパン(株)`
- `西新宿駅`

0 comments on commit 06feae9

Please sign in to comment.