Skip to content

Commit

Permalink
Merge pull request #29 from tokuhirom/romkan
Browse files Browse the repository at this point in the history
import romkan to the repo
  • Loading branch information
tokuhirom authored Aug 7, 2024
2 parents 483dd25 + ddcb257 commit ce1f1ec
Show file tree
Hide file tree
Showing 4 changed files with 607 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ github actions で wikipedia から定期的にデータを取得して https://
* pytests
* Levenshtein
* janome
* romkan
* bunzip2
* gnu make
* gnu grep
Expand Down
4 changes: 2 additions & 2 deletions jawiki/post_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Optional

import jaconv
import romkan
from jawiki.romkan import to_roma

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

if len(romkan.to_roma(yomi)) * 1.5 < len(kanji):
if len(to_roma(yomi)) * 1.5 < len(kanji):
return 'yomi is too short...'

if not is_hiragana(yomi):
Expand Down
Loading

0 comments on commit ce1f1ec

Please sign in to comment.