Repository navigation
Conversation
Signed-off-by: Haridas Nishitha <[email protected]>
Signed-off-by: Haridas Nishitha <[email protected]>
Signed-off-by: Haridas Nishitha <[email protected]>
| has_ascii = pynini.closure(NEMO_CHAR) + NEMO_DIGIT + pynini.closure(NEMO_CHAR) | ||
| has_te = pynini.closure(NEMO_CHAR) + te_digit + pynini.closure(NEMO_CHAR) | ||
|
|
||
| def no_te(fst): |
There was a problem hiding this comment.
remove one-line function
There was a problem hiding this comment.
@folivoramanh no_te function is used 3 times in the script. Kept to avoid duplication.
| def no_te(fst): | ||
| return pynini.difference(fst, has_te).optimize() | ||
|
|
||
| def no_ascii(fst): |
There was a problem hiding this comment.
remove one-line function
There was a problem hiding this comment.
@folivoramanh no_ascii function is used 3 times in the script. Kept to avoid duplication.
| 1, | ||
| ) | ||
|
|
||
| def signed(graph): |
There was a problem hiding this comment.
remove one-line function
There was a problem hiding this comment.
@folivoramanh signed function is used 3 times in the script. Kept to avoid duplication.
| rational_tail = pynini.difference(same_script, common_in).optimize() | ||
| cross_tail = pynini.difference(pynini.difference(tail_in, common_in), same_script).optimize() | ||
|
|
||
| def mixed(int_script, com_script): |
There was a problem hiding this comment.
remove one-line function
There was a problem hiding this comment.
@folivoramanh mixed function is used 2 times. Kept to avoid duplication.
|
|
||
| optional_sign = pynini.closure(pynini.cross("negative: \"true\" ", minus + " "), 0, 1) | ||
|
|
||
| def field(name, end=""): |
There was a problem hiding this comment.
remove one-line function
There was a problem hiding this comment.
@folivoramanh field function is used 6 times. Kept to avoid duplication.
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.