Conversation
for more information, see https://pre-commit.ci
| @@ -1,5 +1,3 @@ | |||
| Avv.~avvocato | |||
| domain = pynutil.delete("domain: \"") + domain + pynutil.delete("\"") | ||
| domain = pynutil.delete('domain: "') + domain + pynutil.delete('"') | ||
| protocol = ( | ||
| pynutil.delete("protocol: \"") |
There was a problem hiding this comment.
just alias protocol as its own variable
| domain = convert_defaults + pynini.closure(insert_space + convert_defaults) | ||
| domain @= verbalize_characters | ||
|
|
||
| domain = pynutil.delete("domain: \"") + domain + pynutil.delete("\"") |
There was a problem hiding this comment.
alias domain as its own variable
|
|
||
| verbalize_characters = pynini.cdrewrite(graph_symbols | graph_digit, "", "", NEMO_SIGMA) | ||
|
|
||
| user_name = pynutil.delete("username: \"") + add_space_after_char() + pynutil.delete("\"") |
There was a problem hiding this comment.
alias username as its own variable
| + pynutil.insert("\"") | ||
| ) | ||
| username = pynutil.insert('username: "') + all_characters + pynutil.insert('"') + pynini.cross("@", " ") |
There was a problem hiding this comment.
alias username as its own variable
| protocol = protocol_start | protocol_end | (protocol_start + protocol_end) | ||
| protocol = pynutil.insert("protocol: \"") + protocol + pynutil.insert("\"") | ||
| graph |= protocol + insert_space + (domain_graph | domain_common_graph) | ||
| protocol = pynutil.insert('protocol: "') + protocol + pynutil.insert('"') |
There was a problem hiding this comment.
alias protocol as its own variab.e
Signed-off-by: Simon Zuberek <szuberek@nvidia.com>
for more information, see https://pre-commit.ci
| from nemo_text_processing.text_normalization.en.graph_utils import ( | ||
| NEMO_ALPHA, | ||
| NEMO_DIGIT, | ||
| NEMO_SPACE, | ||
| GraphFst, | ||
| at, | ||
| colon, | ||
| domain_string, | ||
| double_quotes, | ||
| double_slash, | ||
| file, | ||
| http, | ||
| https, | ||
| period, | ||
| protocol_string, | ||
| slash, | ||
| triple_slash, | ||
| username_string, | ||
| www, | ||
| ) |
Check notice
Code scanning / CodeQL
Unused import
Signed-off-by: Simon Zuberek <szuberek@nvidia.com>
for more information, see https://pre-commit.ci
|
@tbartley94 , @zoobereq this PR changes en/graph - CI folder for Eng should've been updated |
|
@ekmb How do I open a revert with a signature sign off? Trying to revert the branch but it's triggering Dco failures. |
* Fixes for #166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Alex Cui <alexcui1994@gmail.com>
* Fixes for #166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Alex Cui <alexcui1994@gmail.com>
* Fixes for #166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Alex Cui <alexcui1994@gmail.com>
* Fixes for #166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Alex Cui <alexcui1994@gmail.com>
* Fixes for #166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Alex Cui <alexcui1994@gmail.com>
* Fixes for NVIDIA#166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Namrata Gachchi <ngachchi@nvidia.com>
* Fixes for NVIDIA#166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixes for #166 Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implements aliases for common string literals Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleans up unused imports Signed-off-by: Simon Zuberek <szuberek@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: Simon Zuberek <szuberek@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
What does this PR do ?
A fix for issue #166 reported for Italian TN. Fixes the bug where the sentence-final period in sentences ending with domain is incorrectly normalized as part of the domain. The PR also includes support for social media tags, updated tests and a fix to
test_sparrowhawk_normalization.shwhich blocked Sparrowhawk testing.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.