Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci

Signed-off-by: gayu-thri <[email protected]>
  • Loading branch information
pre-commit-ci[bot] authored and gayu-thri committed Jul 3, 2023
1 parent f9e5bde commit b0a6a98
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

import os

import pynini
from nemo_text_processing.inverse_text_normalization.en.utils import get_abs_path
from nemo_text_processing.text_normalization.en.graph_utils import (
Expand Down Expand Up @@ -46,10 +47,10 @@ def __init__(self, input_case: str = INPUT_LOWER_CASED, input_file: str = None):
# Profane Grammar
if input_file is None:
input_file = get_abs_path("data/swear_sequences.tsv")

if not os.path.exists(input_file):
raise ValueError(f"Profane words file {input_file} not found")

profane_graph = pynini.string_file(get_abs_path("data/swear_sequences.tsv"))

bowdlerize = (
Expand Down

0 comments on commit b0a6a98

Please sign in to comment.