Skip to content

Commit ce1f1ec

Browse files
authored
Merge pull request #29 from tokuhirom/romkan
import romkan to the repo
2 parents 483dd25 + ddcb257 commit ce1f1ec

File tree

4 files changed

+607
-4
lines changed

4 files changed

+607
-4
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ github actions で wikipedia から定期的にデータを取得して https://
1414
* pytests
1515
* Levenshtein
1616
* janome
17-
* romkan
1817
* bunzip2
1918
* gnu make
2019
* gnu grep

jawiki/post_validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Optional
44

55
import jaconv
6-
import romkan
6+
from jawiki.romkan import to_roma
77

88
from jawiki.jachars import HIRAGANA_BLOCK, KATAKANA_BLOCK, \
99
is_hiragana, HIRAGANA_NORMALIZER, \
@@ -98,7 +98,7 @@ def __validate_basic(self, kanji, yomi):
9898
# など。
9999
return f'yomi is tooooo long! {len(yomi)}<2'
100100

101-
if len(romkan.to_roma(yomi)) * 1.5 < len(kanji):
101+
if len(to_roma(yomi)) * 1.5 < len(kanji):
102102
return 'yomi is too short...'
103103

104104
if not is_hiragana(yomi):

0 commit comments

Comments
 (0)