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

panicked to_romaji "ウーッー" #13

Closed
kounoike opened this issue Apr 30, 2023 · 0 comments
Closed

panicked to_romaji "ウーッー" #13

kounoike opened this issue Apr 30, 2023 · 0 comments

Comments

@kounoike
Copy link

Thanks for provide useful library! I'm using this library with meilisearch.

❯ cargo install wana_kana
    Updating crates.io index
  Installing wana_kana v3.0.0
   Compiling either v1.8.1
   Compiling lazy_static v1.4.0
   Compiling fnv v1.0.7
   Compiling itertools v0.10.5
   Compiling wana_kana v3.0.0
    Finished release [optimized] target(s) in 2.97s
  Installing /home/kounoike/.cargo/bin/to_kana
  Installing /home/kounoike/.cargo/bin/to_romaji
   Installed package `wana_kana v3.0.0` (executables `to_kana`, `to_romaji`)

~ took 3s
❯ to_romaji "ウーッー"
thread 'main' panicked at 'could not find kana 'っ' in TO_ROMAJI map', /home/kounoike/.cargo/registry/src/github.com-1ecc6299db9ec823/wana_kana-3.0.0/src/utils/katakana_to_hiragana.rs:68:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

my requests are:

  1. support "ウーッー"
  2. shouldn't panic unexpected Japanse-sequence

first, maybe convert to "uu" or "uuu".

second is more important. I found this problem when using meilisearch indexing. When this issue occurs, indexing thread is panicked. then, updating document and index are lost.

Japanese notation has many variations and new ones can be created. For example, くぁwせdrftgyふじこlp is valid (slang) Japanese notation.

aipacommander pushed a commit to aipacommander/wana_kana_rust that referenced this issue Jun 17, 2023
@PSeitz PSeitz closed this as completed in 57547b7 Oct 1, 2024
meili-bors bot added a commit to meilisearch/charabia that referenced this issue Oct 14, 2024
312: Update wana_kana to 4.0.0 r=ManyTheFish a=tats-u

# Pull Request

## Related issue

- Fixes #313
- meilisearch/meilisearch#3588 (comment)
- PSeitz/wana_kana_rust#13
- meilisearch/meilisearch@0fbda63
- https://github.com/orgs/meilisearch/discussions/532#discussioncomment-9999921

## What does this PR do?

`wana_kana` used to easily panic. The panicability made it difficult to adopt it in the Meilisearch core. Update it to the latest version that [doesn't panic](https://github.com/orgs/meilisearch/discussions/532#discussioncomment-10814507).

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Tatsunori Uchino <[email protected]>
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

1 participant