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
11 changes: 8 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline {
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'
JA_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/07-17-26-0'
HI_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-04-26-5'
KO_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-04-25-6'
DEFAULT_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-08-23-0'
Expand Down Expand Up @@ -332,7 +332,7 @@ pipeline {
}
}
}
stage('L0: Create JA ITN Grammars') {
stage('L0: Create JA TN/ITN Grammars') {
when {
anyOf {
branch 'main'
Expand All @@ -348,6 +348,11 @@ pipeline {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/inverse_text_normalization/inverse_normalize.py --lang=ja --text="100" --cache_dir ${JA_TN_CACHE}'
}
}
stage('L0: JA TN grammars') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/text_normalization/normalize.py --lang=ja --text="100" --cache_dir ${JA_TN_CACHE}'
}
}
}
}
stage('L0: Create KO TN/ITN Grammars') {
Expand Down Expand Up @@ -481,7 +486,7 @@ pipeline {
}
}

stage('L2: EN Sparrowhawk Tests') {
stage('L2: EN Sparrowhawk Tests') {
when {
anyOf {
branch 'main'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
二十二 22
二十三 23
二十四 24
0
ゼロ 0
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, cardinal: GraphFst, decimal: GraphFst):
e.g.,
四分の三 -> fraction { denominator: "4" numerator: "3" }
一と四分の三 -> fraction { integer: "1" denominator: "4" numerator: "3" }
一荷四分の三 -> fraction { integer: "1" denominator: "4" numerator: "3" }
一と四分の三 -> fraction { integer: "1" denominator: "4" numerator: "3" }
ルート三分の一 -> fraction { denominator: "√3" numerator: "1" }
一点六五分の五十 -> fraction { denominator: "1.65" numerator: "50" }
二ルート六分の三 -> -> fraction { denominator: "2√6 " numerator: "3" }
Expand All @@ -40,7 +40,7 @@ def __init__(self, cardinal: GraphFst, decimal: GraphFst):
pynutil.delete("分の") | pynutil.delete(" 分 の ") | pynutil.delete("分 の ") | pynutil.delete("分 の")
)

integer_word = pynutil.delete("と") | pynutil.delete("荷")
integer_word = pynutil.delete("と")
root_word = pynini.accep("√") | pynini.cross("ルート", "√")

graph_sign = (
Expand Down
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 @@
〒 郵便番号
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
号室
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- の
- の
ー の
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
28 二十八
29 二十九
30 三十
31 三十一
31 三十一
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
グレゴリオ暦
紀元前
紀元
紀元後
紀元後
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ R. 令和
H. 平成
S. 昭和
T. 大正
M. 明治
M. 明治
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
9 九
10 十
11 十一
12 十二
12 十二
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
year 年
month 月
day 日
century 世紀
decade 年代
early_ten_days 上旬
middle_ten_days 中旬
late_ten_days 下旬
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
木曜日
金曜日
土曜日
日曜日
日曜日
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 @@
カード末尾
カード番号
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
カード下
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.jpg ドット jpg
.JPG ドット JPG
.png ドット png
.PNG ドット PNG
.pdf ドット pdf
.PDF ドット PDF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
http
https
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
01 ゼロイチ
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@ アット
. ドット
- ハイフン
/ スラッシュ
: コロン
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 @@
fraction 分の
root_written √
root_spoken ルート
mixed と
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/ja/data/latin/__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.
26 changes: 26 additions & 0 deletions nemo_text_processing/text_normalization/ja/data/latin/letters.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
A エー
Comment thread
folivoramanh marked this conversation as resolved.
B ビー
C シー
D ディー
E イー
F エフ
G ジー
H エイチ
I アイ
J ジェー
K ケー
L エル
M エム
N エヌ
O オー
P ピー
Q キュー
R アール
S エス
T ティー
U ユー
V ブイ
W ダブリュー
X エックス
Y ワイ
Z ゼット
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 @@
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
h 時
h 時
hour 時
hours 時
s 秒
s 秒
sec 秒
second 秒
seconds 秒
min 分
min 分
minute 分
minutes 分
kg キロ
kg キロ
g グラム
g グラム
m メートル
m メートル
km キロ
km キロ
cm センチメートル
cm センチメートル
mm ミリメートル
mm ミリメートル
L リットル
L リットル
l リットル
l リットル
ml ミリリットル
mL ミリリットル
ml ミリリットル
mL ミリリットル
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
km キロ
km キロ
m メートル
m メートル
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
キロ 時 時速
メートル 秒 秒速
79 changes: 79 additions & 0 deletions nemo_text_processing/text_normalization/ja/data/measure/unit.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
kg キロ
kg キロ
キロ キロ
キログラム キログラム
g グラム
g グラム
グラム グラム
mg ミリグラム
mg ミリグラム
ミリグラム ミリグラム
μg マイクログラム
µg マイクログラム
マイクログラム マイクログラム
km キロ
km キロ
キロメートル キロ
m メートル
m メートル
メートル メートル
cm センチ
cm センチ
センチ センチ
センチメートル センチメートル
mm ミリメートル
mm ミリメートル
ミリメートル ミリメートル
m2 平方メートル
m² 平方メートル
m2 平方メートル
m² 平方メートル
平方メートル 平方メートル
cm2 平方センチメートル
cm² 平方センチメートル
平方センチメートル 平方センチメートル
L リットル
l リットル
L リットル
l リットル
リットル リットル
mL ミリリットル
ml ミリリットル
mL ミリリットル
ml ミリリットル
ミリリットル ミリリットル
% パーセント
% パーセント
パーセント パーセント
° 度
º 度
度 度
°C 度
℃ 度
ºC 度
°F 度エフ
℉ 度エフ
W ワット
w ワット
ワット ワット
kW キロワット
kw キロワット
キロワット キロワット
V ボルト
v ボルト
ボルト ボルト
Hz ヘルツ
hz ヘルツ
ヘルツ ヘルツ
kHz キロヘルツ
khz キロヘルツ
MHz メガヘルツ
mhz メガヘルツ
GHz ギガヘルツ
ghz ギガヘルツ
GB ギガバイト
gb ギガバイト
ギガバイト ギガバイト
MB メガバイト
mb メガバイト
メガバイト メガバイト
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/ja/data/money/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.
Comment thread
folivoramanh marked this conversation as resolved.
#
# 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.
Loading