Skip to content

Commit

Permalink
Add mecab args option to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
polm committed Oct 8, 2023
1 parent cbfeb09 commit 3b71096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cutlet/cutlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def __init__(
system = 'hepburn',
use_foreign_spelling = True,
ensure_ascii = True,
mecab_args = "",
):
"""Create a Cutlet object, which holds configuration as well as
tokenizer state.
Expand Down Expand Up @@ -144,7 +145,7 @@ def __init__(
print("unknown system: {}".format(system))
raise

self.tagger = fugashi.Tagger()
self.tagger = fugashi.Tagger(mecab_args)
self.exceptions = load_exceptions()

# these are too minor to be worth exposing as arguments
Expand Down

0 comments on commit 3b71096

Please sign in to comment.