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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-case-conflict
- id: detect-private-key
- id: requirements-txt-fixer

- repo: https://github.com/PyCQA/flake8
rev: 7.2.0
rev: 7.3.0
hooks:
- id: flake8
args:
- --select=W605

- repo: https://github.com/PyCQA/isort
rev: 6.0.1
rev: 6.1.0
hooks:
- id: isort
name: Format imports
args: [ --multi-line=3, --trailing-comma, --force-grid-wrap=0, --use-parentheses, --line-width=119, -rc, -ws ]
exclude: docs/

- repo: https://github.com/psf/black
rev: 25.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
hooks:
- id: black
name: Format code
Expand Down
30 changes: 26 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ pipeline {
agent {
docker {
image 'tnitn_ci_py310:24.07'
args '-v /mnt/jenkins/jenkinsci:/home/jenkins -v $HOME/.cache:/root/.cache --shm-size=4g --entrypoint=""'
args '-v /mnt/jenkins/jenkinsci/TestData:/home/jenkins/TestData -v $HOME/.cache:/root/.cache --shm-size=4g --entrypoint=""'
}
}
options {
timeout(time: 2, unit: 'HOURS')
disableConcurrentBuilds(abortPrevious: true)
}
environment {

AR_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/04-24-24-0'
DE_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/10-23-24-0'
EN_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/09-25-25-0'
Expand All @@ -24,10 +23,11 @@ pipeline {
SV_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-08-23-0'
ZH_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/11-13-24-0'
IT_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/08-22-24-0'
HE_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/09-24-25-0'
HY_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/03-12-24-0'
MR_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/03-12-24-1'
JA_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/10-17-24-1'
HI_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/04-22-25-0'
HI_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/10-31-25-0'
DEFAULT_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-08-23-0'
}
stages {
Expand Down Expand Up @@ -253,7 +253,24 @@ pipeline {
}
}
}

stage('L0: Create He TN/ITN Grammars & MR') {
when {
anyOf {
branch 'main'
branch 'staging/**'
branch 'staging_*'
changeRequest target: 'main'
}
}
failFast true
parallel {
stage('L0: HE ITN grammars') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/inverse_text_normalization/inverse_normalize.py --lang=he --text="ת " --cache_dir ${HE_TN_CACHE}'
}
}
}
}
stage('L0: Create HY TN/ITN Grammars & MR') {
when {
anyOf {
Expand Down Expand Up @@ -413,6 +430,11 @@ pipeline {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/hy/ -m "not pleasefixme" --cpu --tn_cache_dir ${HY_TN_CACHE}'
}
}
stage('L1: Run all HE TN/ITN tests (restore grammars from cache)') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/he/ -m "not pleasefixme" --cpu --tn_cache_dir ${HE_TN_CACHE}'
}
}
}
}

Expand Down
13 changes: 13 additions & 0 deletions nemo_text_processing/inverse_text_normalization/he/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2025, NVIDIA CORPORATION. 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 @@
חצי
רבע
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
°F פרנהייט
°C צלסיוס
° מעלות
°F מעלות פרנהייט
°C מעלות צלסיוס
K קלווין
% אחוז
% אחוזים
Hz הרץ
kW קילוואט
kW קילו ואט
kW קילו וואט
kWh קילו ואט לשעה
kWh קילוואט לשעה
Wh ואט לשעה
W ואט
ghz ג׳יגה הרץ
ghz גיגה הרץ
khz קילו הרץ
mhz מגה הרץ
v וולט
nm ננומטר
mA מילי אמפר
tW טרה ואט
mv מילי וולט
mW מגה ואט
μm מיקרומטר
" אינץ׳
cc סי סי
ω אוהם
db דציבל
db דציבלים
kb קילו ביט
mb מגה ביט
gb ג׳יגה ביט
gb גיגה ביט
tb טרה ביט
pb פטה ביט
mb מגה בייט
kb קילו בייט
gb ג׳יגה בייט
gb גיגה בייט
tb טרה בייט
pb פטה בייט
A אמפר
13 changes: 13 additions & 0 deletions nemo_text_processing/inverse_text_normalization/he/data/months.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ינואר
פברואר
מרץ
מרס
אפריל
מאי
יוני
יולי
אוגוסט
ספטמבר
אוקטובר
נובמבר
דצמבר
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ינואר 1
פברואר 2
מרץ 3
אפריל 4
מאי 5
יוני 6
יולי 7
אוגוסט 8
ספטמבר 9
אוקטובר 10
נובמבר 11
דצמבר 12
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ראשון 1
שני 2
שלישי 3
רביעי 4
חמישי 5
שישי 6
שביעי 7
שמיני 8
תשיעי 9
עשירי 10
אחת עשרה 11
שתיים עשרה 12
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2025, NVIDIA CORPORATION. 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,6 @@
חצי 5
רבע 25
שלושת רבעי 75
עשירית 1
שתי עשיריות 2
חמישית 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
אחד 1
שניים 2
שני 2
שלושה 3
ארבעה 4
חמישה 5
שישה 6
שבעה 7
שמונה 8
תשעה 9
אחת 1
שתיים 2
שתים 2
שתי 2
שלוש 3
ארבע 4
חמש 5
שש 6
שבע 7
תשע 9
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
מאה 1
מאתיים 2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
מיליון 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
עשר 10
אחד עשר 11
שניים עשר 12
שלושה עשר 13
ארבעה עשר 14
חמישה עשר 15
שישה עשר 16
שבעה עשר 17
שמונה עשר 18
תשעה עשר 19
עשרה 10
אחת עשרה 11
שתיים עשרה 12
שתים עשרה 12
שלוש עשרה 13
ארבע עשרה 14
חמש עשרה 15
שש עשרה 16
שבע עשרה 17
שמונה עשרה 18
תשע עשרה 19
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
שלושת 3
ארבעת 4
חמשת 5
ששת 6
שבעת 7
שמונת 8
תשעת 9
עשרת 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
אלף 1
אלפיים 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
עשרים 2
שלושים 3
ארבעים 4
חמישים 5
שישים 6
שבעים 7
שמונים 8
תשעים 9
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
אחד 1
אחת 1
שתיים 2
שתים 2
שלוש 3
ארבע 4
חמש 5
שש 6
שבע 7
שמונה 8
תשע 9
עשר 10
אחת עשרה 11
שתיים עשרה 12
שתים עשרה 12
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
אפס 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2025, NVIDIA CORPORATION. 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,10 @@
ראשון אחד
שני שניים
שלישי שלושה
רביעי ארבעה
חמישי חמישה
שישי שישה
שביעי שבעה
שמיני שמונה
תשיעי תשעה
עשירי עשרה
17 changes: 17 additions & 0 deletions nemo_text_processing/inverse_text_normalization/he/data/prefix.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
וה
שה
ב
כ
ל
מ
ה
ו
וב
ול
ש
מה
ומ
שכ
שב
בכ
לכ
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ק״מ קילומטר
ק״מ קילומטרים
מ׳ מטר
מ׳ מטרים
ס״מ סנטימטר
ס״מ סנטימטרים
מ״מ מילימטר
מ״מ מילימטרים
מ״ג מיליגרם
מ״ג מיליגרמים
מ״ל מיליליטר
ק״ג קילוגרם
ק״ג קילוגרמים
קמ״ש קילומטר לשעה
קמ״ש קילומטרים לשעה
ג׳ גרם
ג׳ גרמים
Loading