Skip to content

Commit

Permalink
fix: remove --path option to g2p convert, which does not work anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
joanise committed May 1, 2023
1 parent e61daa4 commit f99774f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions g2p/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,6 @@ def generate_mapping( # noqa: C901
is_flag=True,
help="Tokenize INPUT_TEXT before converting.",
)
@click.option(
"--path",
type=click.Path(exists=True, file_okay=True, dir_okay=False),
help="Read text to convert from FILE.",
)
@click.option(
"--config",
type=click.Path(exists=True, file_okay=True, dir_okay=False),
Expand Down Expand Up @@ -564,10 +559,8 @@ def convert( # noqa: C901
if tok and tok_lang is None:
tok_lang = "path"
# Transduce!!!
if in_lang and out_lang:
transducer = make_g2p(in_lang, out_lang, tok_lang=tok_lang)
elif path:
transducer = Transducer(Mapping(path))
assert in_lang and out_lang
transducer = make_g2p(in_lang, out_lang, tok_lang=tok_lang)
tg = transducer(input_text)
if check:
transducer.check(tg, display_warnings=True)
Expand Down

0 comments on commit f99774f

Please sign in to comment.