Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SudachiError: Invalid i16 literal when building user dictionary #238

Closed
elda27 opened this issue Jan 2, 2024 · 1 comment
Closed

SudachiError: Invalid i16 literal when building user dictionary #238

elda27 opened this issue Jan 2, 2024 · 1 comment

Comments

@elda27
Copy link

elda27 commented Jan 2, 2024

I try to build user dictionary using ubuild on sudachipy (>= 0.6.8).
It hasn't provided any information in the error message for solving the problem.
I replace my work directory with "[root_dir]".

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "[root_dir]\.venv\Scripts\sudachipy.exe\__main__.py", line 7, in <module>
  File "[root_dir]\.venv\Lib\site-packages\sudachipy\command_line.py", line 270, in main
    args.handler(args, args.print_usage)
  File "[root_dir]\.venv\Lib\site-packages\sudachipy\command_line.py", line 192, in _command_user_build
    stats = sudachipy.build_user_dic(
            ^^^^^^^^^^^^^^^^^^^^^^^^^
sudachipy.errors.SudachiError: WindowsPath('[root_dir]/data/dictionary.csv'): [root_dir]\data\dictionary.csv:1      Invalid i16 literal 
@mh-northlander
Copy link
Collaborator

It seems that there are missing entries in the line 1 of your dictionary data CSV (column 1-3 are parsed as i16).
Please refer to this doument for the specification on creating a user dictionary (only available in Japanese).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants