Commit 6b32967
fix(rule): Accept non-independent(非自立) verb that is previous of "たり" (#2)
Problem
--
Valid sentence is treated as invalid; for example `利用方法を学習したり、実際に試してみたりすることができる環境です`.
This example is analyzed as following;
```
[ { type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 894860,
word_type: 'KNOWN',
surface_form: '利用',
pos: '名詞',
pos_detail_1: 'サ変接続',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: '利用',
reading: 'リヨウ',
pronunciation: 'リヨー' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 1488950,
word_type: 'KNOWN',
surface_form: '方法',
pos: '名詞',
pos_detail_1: '一般',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: '方法',
reading: 'ホウホウ',
pronunciation: 'ホーホー' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 92880,
word_type: 'KNOWN',
surface_form: 'を',
pos: '助詞',
pos_detail_1: '格助詞',
pos_detail_2: '一般',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'を',
reading: 'ヲ',
pronunciation: 'ヲ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 496210,
word_type: 'KNOWN',
surface_form: '学習',
pos: '名詞',
pos_detail_1: 'サ変接続',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: '学習',
reading: 'ガクシュウ',
pronunciation: 'ガクシュー' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 3011810,
word_type: 'KNOWN',
surface_form: 'し',
pos: '動詞',
pos_detail_1: '自立',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: 'サ変・スル',
conjugated_form: '連用形',
basic_form: 'する',
reading: 'シ',
pronunciation: 'シ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 92960,
word_type: 'KNOWN',
surface_form: 'たり',
pos: '助詞',
pos_detail_1: '並立助詞',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'たり',
reading: 'タリ',
pronunciation: 'タリ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 51340,
word_type: 'KNOWN',
surface_form: '、',
pos: '名詞',
pos_detail_1: '数',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: '、',
reading: '、',
pronunciation: '、' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 2198950,
word_type: 'KNOWN',
surface_form: '実際',
pos: '名詞',
pos_detail_1: '一般',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: '実際',
reading: 'ジッサイ',
pronunciation: 'ジッサイ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 92030,
word_type: 'KNOWN',
surface_form: 'に',
pos: '助詞',
pos_detail_1: '格助詞',
pos_detail_2: '一般',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'に',
reading: 'ニ',
pronunciation: 'ニ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 550320,
word_type: 'KNOWN',
surface_form: '試し',
pos: '動詞',
pos_detail_1: '自立',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '五段・サ行',
conjugated_form: '連用形',
basic_form: '試す',
reading: 'タメシ',
pronunciation: 'タメシ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 92780,
word_type: 'KNOWN',
surface_form: 'て',
pos: '助詞',
pos_detail_1: '接続助詞',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'て',
reading: 'テ',
pronunciation: 'テ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 2943410,
word_type: 'KNOWN',
surface_form: 'み',
pos: '動詞',
pos_detail_1: '非自立',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '一段',
conjugated_form: '連用形',
basic_form: 'みる',
reading: 'ミ',
pronunciation: 'ミ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 92960,
word_type: 'KNOWN',
surface_form: 'たり',
pos: '助詞',
pos_detail_1: '並立助詞',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'たり',
reading: 'タリ',
pronunciation: 'タリ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 3011740,
word_type: 'KNOWN',
surface_form: 'する',
pos: '動詞',
pos_detail_1: '自立',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: 'サ変・スル',
conjugated_form: '基本形',
basic_form: 'する',
reading: 'スル',
pronunciation: 'スル' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 63910,
word_type: 'KNOWN',
surface_form: 'こと',
pos: '名詞',
pos_detail_1: '非自立',
pos_detail_2: '一般',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'こと',
reading: 'コト',
pronunciation: 'コト' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 92920,
word_type: 'KNOWN',
surface_form: 'が',
pos: '助詞',
pos_detail_1: '格助詞',
pos_detail_2: '一般',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: 'が',
reading: 'ガ',
pronunciation: 'ガ' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 3370300,
word_type: 'KNOWN',
surface_form: 'できる',
pos: '動詞',
pos_detail_1: '自立',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '一段',
conjugated_form: '基本形',
basic_form: 'できる',
reading: 'デキル',
pronunciation: 'デキル' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 361770,
word_type: 'KNOWN',
surface_form: '環境',
pos: '名詞',
pos_detail_1: '一般',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '*',
conjugated_form: '*',
basic_form: '環境',
reading: 'カンキョウ',
pronunciation: 'カンキョー' } },
{ type: 'WordNode',
children: [ [Object] ],
position: { start: [Object], end: [Object] },
data:
{ word_id: 23760,
word_type: 'KNOWN',
surface_form: 'です',
pos: '助動詞',
pos_detail_1: '*',
pos_detail_2: '*',
pos_detail_3: '*',
conjugated_type: '特殊・デス',
conjugated_form: '基本形',
basic_form: 'です',
reading: 'デス',
pronunciation: 'デス' } } ]
```
The verb that is previous of "たり", that is only allowed independent (自立) verb.
Solution
--
Allow non-independent (非自立) verb.1 parent 87a9ce8 commit 6b32967
File tree
2 files changed
+8
-4
lines changed- src
- test
2 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
0 commit comments