WorksApplications / SudachiPy

Python version of Sudachi, a Japanese tokenizer.
Apache License 2.0
392 stars 50 forks source link

sudachipy command line not working with -a option #150

Closed hiroshi-matsuda-rit closed 3 years ago

hiroshi-matsuda-rit commented 3 years ago
$ sudachipy -a
テストする。
Traceback (most recent call last):
  File "/mnt/c/git/ginza/venv.wsl/bin/sudachipy", line 33, in <module>
    sys.exit(load_entry_point('SudachiPy==0.5.0', 'console_scripts', 'sudachipy')())
  File "/mnt/c/git/ginza/venv.wsl/lib/python3.9/site-packages/sudachipy/command_line.py", line 237, in main
    args.handler(args, args.print_usage)
  File "/mnt/c/git/ginza/venv.wsl/lib/python3.9/site-packages/sudachipy/command_line.py", line 175, in _command_tokenize
    run(tokenizer_obj, mode, input_, print_all, stdout_logger, enable_dump)
  File "/mnt/c/git/ginza/venv.wsl/lib/python3.9/site-packages/sudachipy/command_line.py", line 73, in run
    '[{}]'.format(','.join([str(synonym_group_id) for synonym_group_id in m.synonym_group_ids]))]
TypeError: 'method' object is not iterable

SudachiPy==0.5.0 SudachiDict-core==20201223.post1 Python 3.9.1 WSL2 Ubuntu 20.04

t-yamamura commented 3 years ago

@hiroshi-matsuda-rit Thank you for the report.

We have released a new version v0.5.1 to fix this issue.