In the ./nemo_text_processing/inverse_text_normalization/zh/graph_utils.py line 79, load_labels() method is called but it is not imported, So it raises error. It could be simply resolved by adding the following method in ./nemo_text_processing/inverse_text_normalization/zh/utils.py:
def load_labels(abs_path):
"""
loads relative path file as dictionary
Args:
abs_path: absolute path
Returns dictionary of mappings
"""
with open(abs_path, encoding="utf-8") as label_tsv:
labels = list(csv.reader(label_tsv, delimiter="\t"))
return labels
and import it in ./nemo_text_processing/inverse_text_normalization/zh/graph_utils.py:
from nemo_text_processing.inverse_text_normalization.zh.utils import load_labels
Also there is another bug in arabic TN tagger:
In nemo_text_processing/text_normalization/ar/taggers/decimal.py line 40, quantities is not defined. So it could be resolved by adding the following line before it (in line 33):
quantities = pynini.string_file(get_abs_path("data/numbers/quantities.tsv"))
In the
./nemo_text_processing/inverse_text_normalization/zh/graph_utils.pyline 79,load_labels()method is called but it is not imported, So it raises error. It could be simply resolved by adding the following method in./nemo_text_processing/inverse_text_normalization/zh/utils.py:and import it in
./nemo_text_processing/inverse_text_normalization/zh/graph_utils.py:Also there is another bug in arabic TN tagger:
In
nemo_text_processing/text_normalization/ar/taggers/decimal.pyline 40,quantitiesis not defined. So it could be resolved by adding the following line before it (in line 33):