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
13 changes: 12 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pipeline {
JA_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/07-17-26-0'
KO_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/09-15-26-0'
HI_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/09-15-26-0'
TR_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/11-28-26-0'
DEFAULT_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-08-23-0'
}
stages {
Expand Down Expand Up @@ -176,7 +177,7 @@ pipeline {
}
}

stage('L0: Create FR TN/ITN & VI TN/ITN & HU TN & IT TN') {
stage('L0: Create FR TN/ITN & VI TN/ITN & HU TN & IT TN & TR TN') {
when {
anyOf {
branch 'main'
Expand Down Expand Up @@ -212,6 +213,11 @@ pipeline {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/text_normalization/normalize.py --lang=hu --text="100" --cache_dir ${HU_TN_CACHE}'
}
}
stage('L0: TR TN grammars') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/text_normalization/normalize.py --lang=tr --text="100" --cache_dir ${TR_TN_CACHE}'
}
}
stage('L0: IT TN grammars') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/text_normalization/normalize.py --lang=it --text="122" --cache_dir ${IT_TN_CACHE}'
Expand Down Expand Up @@ -483,6 +489,11 @@ pipeline {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/ko/ -m "not pleasefixme" --cpu --tn_cache_dir ${KO_TN_CACHE}'
}
}
stage('L1: Run all TR TN tests (restore grammars from cache)') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/tr/ -m "not pleasefixme" --cpu --tn_cache_dir ${TR_TN_CACHE}'
}
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion nemo_text_processing/text_normalization/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def __init__(
elif lang == 'hu':
from nemo_text_processing.text_normalization.hu.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.hu.verbalizers.verbalize_final import VerbalizeFinalFst
elif lang == 'tr':
from nemo_text_processing.text_normalization.tr.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.tr.verbalizers.verbalize_final import VerbalizeFinalFst
elif lang == 'zh':
from nemo_text_processing.text_normalization.zh.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.zh.verbalizers.verbalize_final import VerbalizeFinalFst
Expand Down Expand Up @@ -745,7 +748,7 @@ def parse_args():
parser.add_argument(
"--language",
help="language",
choices=["en", "de", "es", "fr", "hu", "sv", "zh", "ar", "it", "hy", "ja", "hi", "ko", "vi", "pt"],
choices=["en", "de", "es", "fr", "hu", "sv", "zh", "ar", "it", "hy", "ja", "hi", "ko", "vi", "pt", "tr"],
default="en",
type=str,
)
Expand Down
2 changes: 1 addition & 1 deletion nemo_text_processing/text_normalization/run_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parse_args():
parser.add_argument(
"--lang",
help="language",
choices=['ar', 'de', 'en', 'es', 'fr', 'hu', 'it', 'ru', 'sv', 'zh', 'hy', 'hi', 'ko', 'vi', 'pt'],
choices=['ar', 'de', 'en', 'es', 'fr', 'hu', 'it', 'ru', 'sv', 'zh', 'hy', 'hi', 'ko', 'vi', 'pt', 'tr'],
default="en",
type=str,
)
Expand Down
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/tr/__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/tr/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/tr/data/dates/__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,46 @@
Ocak ocak
Şubat şubat
Mart mart
Nisan nisan
Mayıs mayıs
Haziran haziran
Temmuz temmuz
Ağustos ağustos
Eylül eylül
Ekim ekim
Kasım kasım
Aralık aralık
ocak ocak
şubat şubat
mart mart
nisan nisan
mayıs mayıs
haziran haziran
temmuz temmuz
ağustos ağustos
eylül eylül
ekim ekim
kasım kasım
aralık aralık
Oca ocak
Oca. ocak
Şub şubat
Şub. şubat
Mar mart
Mar. mart
Nis nisan
Nis. nisan
Haz haziran
Haz. haziran
Tem temmuz
Tem. temmuz
Ağu ağustos
Ağu. ağustos
Eyl eylül
Eyl. eylül
Eki ekim
Eki. ekim
Kas kasım
Kas. kasım
Ara aralık
Ara. aralık
12 changes: 12 additions & 0 deletions nemo_text_processing/text_normalization/tr/data/dates/months.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
1 ocak
2 şubat
3 mart
4 nisan
5 mayıs
6 haziran
7 temmuz
8 ağustos
9 eylül
10 ekim
11 kasım
12 aralık
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,22 @@
bir birde
iki ikide
üç üçte
dört dörtte
beş beşte
altı altıda
yedi yedide
sekiz sekizde
dokuz dokuzda
on onda
yirmi yirmide
otuz otuzda
kırk kırkta
elli ellide
altmış altmışta
yetmiş yetmişte
seksen seksende
doksan doksanda
yüz yüzde
bin binde
milyon milyonda
milyar milyarda
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
½ 1 2
⅓ 1 3
⅔ 2 3
¼ 1 4
¾ 3 4
⅕ 1 5
⅛ 1 8
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.
67 changes: 67 additions & 0 deletions nemo_text_processing/text_normalization/tr/data/measures/units.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
km kilometre
m metre
cm santimetre
mm milimetre
km² kilometrekare
m² metrekare
m2 metrekare
m³ metreküp
m3 metreküp
ha hektar
kg kilogram
g gram
mg miligram
lt litre
l litre
L litre
ml mililitre
°C santigrat derece
° derece
kWh kilovatsaat
kW kilovat
W vat
V volt
mAh miliamper saat
GB gigabayt
MB megabayt
KB kilobayt
TB terabayt
dk dakika
sn saniye
ms milisaniye
gr gram
GHz gigahertz
MHz megahertz
Hz hertz
Gbps gigabit
Mbps megabit
IU ünite
ng/ml nanogram bölü mililitre
mg/dl miligram bölü desilitre
mg/kg miligram bölü kilogram
dk. dakika
sn. saniye
sa. saat
mmHg milimetre cıva
kcal kilokalori
g/dl gram bölü desilitre
IU/ml ünite bölü mililitre
nm nanometre
MP megapiksel
°c santigrat derece
kwh kilovatsaat
kw kilovat
mah miliamper saat
gb gigabayt
mb megabayt
kb kilobayt
tb terabayt
ghz gigahertz
mhz megahertz
hz hertz
gbps gigabit
mbps megabit
iu ünite
mmhg milimetre cıva
iu/ml ünite bölü mililitre
mp megapiksel
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/tr/data/money/__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,9 @@
TL lira kuruş
₺ lira kuruş
TRY lira kuruş
$ dolar sent
USD dolar sent
€ euro sent
EUR euro sent
£ sterlin peni
GBP sterlin peni
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/tr/data/number/__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,9 @@
1 bir
2 iki
3 üç
4 dört
5 beş
6 altı
7 yedi
8 sekiz
9 dokuz
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1 on
2 yirmi
3 otuz
4 kırk
5 elli
6 altmış
7 yetmiş
8 seksen
9 doksan
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 sıfır
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,25 @@
sıfır sıfırıncı
bir birinci
iki ikinci
üç üçüncü
dört dördüncü
beş beşinci
altı altıncı
yedi yedinci
sekiz sekizinci
dokuz dokuzuncu
on onuncu
yirmi yirminci
otuz otuzuncu
kırk kırkıncı
elli ellinci
altmış altmışıncı
yetmiş yetmişinci
seksen sekseninci
doksan doksanıncı
yüz yüzüncü
bin bininci
milyon milyonuncu
milyar milyarıncı
trilyon trilyonuncu
katrilyon katrilyonuncu
Loading