diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-02-03 18:39:25 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-02-03 18:39:25 +0200 |
| commit | f9464ecb28b536a0ef17202552204c77aba5ee94 (patch) | |
| tree | c17dfd82d740e64e1a37d858c141043dc39ddf1c /kanji_info_fetcher | |
| parent | 0bc0462b37b45ce5534208e068b701e3471813f2 (diff) | |
Improve parsingmaster
Diffstat (limited to 'kanji_info_fetcher')
| -rw-r--r-- | kanji_info_fetcher/jisho_client.py | 1 | ||||
| -rw-r--r-- | kanji_info_fetcher/wadoku_client.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/kanji_info_fetcher/jisho_client.py b/kanji_info_fetcher/jisho_client.py index 5dca87b..d6e7272 100644 --- a/kanji_info_fetcher/jisho_client.py +++ b/kanji_info_fetcher/jisho_client.py @@ -13,6 +13,7 @@ def _meaning_tag_to_abbrev(tag: str) -> str: if "Na-adjective" in tag: return "な-adj." if "No-adjective" in tag: return "の-adj." if "Adverb" in tag: return "adv." + if "Expression" in tag: return "expr." return tag def inject_kanji_meanings(entries: list) -> list: diff --git a/kanji_info_fetcher/wadoku_client.py b/kanji_info_fetcher/wadoku_client.py index 550f801..39d5c7e 100644 --- a/kanji_info_fetcher/wadoku_client.py +++ b/kanji_info_fetcher/wadoku_client.py @@ -35,7 +35,9 @@ def inject_hiragana_with_accents(entries: list) -> list: result = first_reading \ .replace("~", "") \ .replace("|", "") \ - .replace("・", "") + .replace("│", "") \ + .replace("・", "") \ + .replace("・", "") entry.hiragana = result entries_with_readings.append(entry) |
