Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nemo_text_processing/text_normalization/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ def __init__(

if post_process:
self.post_processor = PostProcessingFst(cache_dir=cache_dir, overwrite_cache=overwrite_cache)
elif lang == 'pt':
from nemo_text_processing.text_normalization.pt.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.pt.verbalizers.verbalize_final import VerbalizeFinalFst
elif lang == 'ko':
from nemo_text_processing.text_normalization.ko.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.ko.verbalizers.verbalize_final import VerbalizeFinalFst
Expand Down
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/pt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use it except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/pt/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/pt/data/date/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
21 changes: 21 additions & 0 deletions nemo_text_processing/text_normalization/pt/data/date/months.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
1 janeiro
01 janeiro
2 fevereiro
02 fevereiro
3 março
03 março
4 abril
04 abril
5 maio
05 maio
6 junho
06 junho
7 julho
07 julho
8 agosto
08 agosto
9 setembro
09 setembro
10 outubro
11 novembro
12 dezembro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/
.
-
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preposition de
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
segundo meio
terceiro terço
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mil milésimo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
connector e
minus menos
plural_suffix s
avos_suffix avos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
connector e
thousand mil
hundred_100 cem
hundred_1 cento
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
001 mil e um
010 mil e dez
100 mil e cem
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
separator vírgula
minus menos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1 um
2 dois
3 três
4 quatro
5 cinco
6 seis
7 sete
8 oito
9 nove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
2 duzentos
3 trezentos
4 quatrocentos
5 quinhentos
6 seiscentos
7 setecentos
8 oitocentos
9 novecentos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mil
milhão
milhões
bilhão
bilhões
trilhão
trilhões
quatrilhão
quatrilhões
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
one_label plural_suffix magnitude_zeros
um milhão milhões 0
um bilhão bilhões 9
um trilhão trilhões 12
10 changes: 10 additions & 0 deletions nemo_text_processing/text_normalization/pt/data/numbers/teens.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
10 dez
11 onze
12 doze
13 treze
14 catorze
15 quinze
16 dezesseis
17 dezessete
18 dezoito
19 dezenove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
2 vinte
3 trinta
4 quarenta
5 cinquenta
6 sessenta
7 setenta
8 oitenta
9 noventa
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 zero
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
10 changes: 10 additions & 0 deletions nemo_text_processing/text_normalization/pt/data/ordinals/digit.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
primeiro um
segundo dois
terceiro três
quarto quatro
quinto cinco
sexto seis
sétimo sete
oitavo oito
nono nove
décimo dez
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
primeiro primeira
segundo segunda
terceiro terceira
quarto quarta
quinto quinta
sexto sexta
sétimo sétima
oitavo oitava
nono nona
décimo décima
ésimo ésima
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
centésimo cem
centésimo cento
ducentésimo duzentos
trecentésimo trezentos
quadringentésimo quatrocentos
quincentésimo quinhentos
sexcentésimo seiscentos
septingentésimo setecentos
octingentésimo oitocentos
noningentésimo novecentos
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connector_in e
connector_out
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
décimo primeiro onze
décimo segundo doze
décimo terceiro treze
décimo quarto catorze
décimo quinto quinze
décimo sexto dezesseis
décimo sétimo dezessete
décimo oitavo dezoito
décimo nono dezenove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vigésimo vinte
trigésimo trinta
quadragésimo quarenta
quinquagésimo cinquenta
sexagésimo sessenta
septuagésimo setenta
octogésimo oitenta
nonagésimo noventa
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/pt/data/time/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
manhã da manhã
tarde da tarde
noite da noite
madrugada da madrugada
Loading