Skip to content

Commit cfc9627

Browse files
pre-commit-ci[bot]ngachchi
authored andcommitted
[pre-commit.ci] pre-commit suggestions (NVIDIA#270)
* [pre-commit.ci] pre-commit suggestions updates: - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.3.0...v5.0.0) - [github.com/PyCQA/flake8: 7.1.1 → 7.2.0](PyCQA/flake8@7.1.1...7.2.0) - [github.com/PyCQA/isort: 5.12.0 → 6.0.1](PyCQA/isort@5.12.0...6.0.1) - [github.com/psf/black: 19.10b0 → 25.1.0](psf/black@19.10b0...25.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent db69b8e commit cfc9627

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

nemo_text_processing/text_normalization/fr/taggers/date.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515

1616
class DateFst(GraphFst):
17-
''' Finite state transducer for classyfing dates, e.g.:
18-
'02.03.2003' -> date {day: 'deux' month: 'mai' year: 'deux mille trois' preserve order: true}
17+
'''Finite state transducer for classyfing dates, e.g.:
18+
'02.03.2003' -> date {day: 'deux' month: 'mai' year: 'deux mille trois' preserve order: true}
1919
'''
2020

2121
def __init__(self, cardinal: GraphFst, deterministic: bool = True):

nemo_text_processing/text_normalization/hi/taggers/money.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
class MoneyFst(GraphFst):
2525
"""
2626
Finite state transducer for classifying money, suppletive aware, e.g.
27-
₹५० -> money { currency_maj: "रुपए" integer_part: "पचास" }
28-
₹५०.५० -> money { currency_maj: "रुपए" integer_part: "पचास" fractional_part: "पचास" currency_min: "centiles" }
29-
₹०.५० -> money { currency_maj: "रुपए" integer_part: "शून्य" fractional_part: "पचास" currency_min: "centiles" }
30-
Note that the 'centiles' string is a placeholder to handle by the verbalizer by applying the corresponding minor currency denomination
27+
₹1 -> money { currency: "रुपए" integer_part: "एक" }
28+
₹1.2 -> money { currency: "रुपए" integer_part: "एक" fractional_part: "दो" }
3129
3230
Args:
3331
cardinal: CardinalFst
@@ -42,7 +40,9 @@ def __init__(self, cardinal: GraphFst):
4240
cardinal_graph = cardinal.final_graph
4341

4442
optional_graph_negative = pynini.closure(
45-
pynutil.insert("negative: ") + pynini.cross("-", "\"true\"") + insert_space, 0, 1,
43+
pynutil.insert("negative: ") + pynini.cross("-", "\"true\"") + insert_space,
44+
0,
45+
1,
4646
)
4747
currency_major = pynutil.insert('currency_maj: "') + currency_graph + pynutil.insert('"')
4848
integer = pynutil.insert('integer_part: "') + cardinal_graph + pynutil.insert('"')

0 commit comments

Comments
 (0)