zhifu gao
2024-04-24 861147c7308b91068ffa02724fdf74ee623a909e
fun_text_processing/inverse_text_normalization/ko/utils.py
@@ -1,4 +1,3 @@
import csv
import os
from typing import Union
@@ -6,6 +5,7 @@
import inflect
_inflect = inflect.engine()
def num_to_word(x: Union[str, int]):
    """
@@ -19,6 +19,7 @@
        x = _inflect.number_to_words(str(x)).replace("-", " ").replace(",", "")
    return x
def get_abs_path(rel_path):
    """
    Get absolute path
@@ -28,7 +29,7 @@
        
    Returns absolute path
    """
    return os.path.dirname(os.path.abspath(__file__)) + '/' + rel_path
    return os.path.dirname(os.path.abspath(__file__)) + "/" + rel_path
def load_labels(abs_path):