Japanese TN fix and improvement#444
Open
folivoramanh wants to merge 5 commits into
Open
Conversation
Signed-off-by: Mai Anh <palasek182@gmail.com>
for more information, see https://pre-commit.ci
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
Collaborator
|
please update jenkinsfile |
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
| @@ -0,0 +1 @@ | |||
| 0 零 | |||
Collaborator
There was a problem hiding this comment.
why is this different from zero.tsv and both from the ITN zero?
Collaborator
Author
There was a problem hiding this comment.
零 is kanji form, and in case of 0.5, 零 is preferred for shorten written, while normal cardinal can use direct kana form
mgrafu
reviewed
Jul 9, 2026
| graph_integer = ( | ||
| pynutil.insert('integer_part: \"') | ||
| + ( | ||
| pynini.cross("0", "零") |
Collaborator
There was a problem hiding this comment.
wouldn't this be zero_decimal?
mgrafu
reviewed
Jul 9, 2026
| def __init__(self, deterministic: bool = True): | ||
| super().__init__(name="punctuation", kind="classify", deterministic=deterministic) | ||
| s = "!#$%&'()*+,-./:;<=>?@^_`{|}。,;:《》“”·~【】!?、‘’.<>-——_、。.「」『』‘`/・;’”“”‷・〔〕々〃ゝゞヽ〲〱〳〴〵ヾ〆,~" | ||
| s = "!#$%&'()*+,-./:;<=>?@^_`{|}~" |
Collaborator
There was a problem hiding this comment.
are we sure we don't need this punctuation?
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
mgrafu
reviewed
Jul 9, 2026
| division = pynini.string_file(get_abs_path("data/time/division.tsv")) | ||
|
|
||
| division_component = pynutil.insert("suffix: \"") + division + pynutil.insert("\"") | ||
| hour_number = pynutil.add_weight(pynini.cross("0", "零"), -0.1) | graph_cardinal |
Collaborator
There was a problem hiding this comment.
again looks like zero_decimal?
mgrafu
reviewed
Jul 9, 2026
Signed-off-by: Mai Anh <palasek182@gmail.com>
for more information, see https://pre-commit.ci
Signed-off-by: Mai Anh <palasek182@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Before your PR is "Ready for review"
Pre checks:
git commit -sto sign.pytestor (if your machine does not have GPU)pytest --cpufrom the root folder (given you marked your test cases accordingly@pytest.mark.run_only_on('CPU')).bash tools/text_processing_deployment/export_grammars.sh --MODE=test ...pytestand Sparrowhawk here.__init__.pyfor every folder and subfolder, includingdatafolder which has .TSV files?Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.to all newly added Python files?Copyright 2015 and onwards Google, Inc.. See an example here.try import: ... except: ...) if not already done.PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.