-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
希望能支援 在搜尋時 無視簡日漢字 #291
Comments
这像是查表出来的,有什么资料说明吗? |
資料說明是指什麼意思? 是指? https://github.com/bluelovers/cjk-convert/blob/master/lib/jp/table.ts 這個要實現的話 難度應該只有 是否要支援 能對 regex 作處理而以 在不考慮支援 regex 的情況下的話 大概就是分割 找出所有漢字 然後查表之後 製作成 regex 這種比較傻一點的方式 要 支援解析 regex 的話就比較麻煩 還得去找相關的庫 來使用避免解析錯誤 |
我看你给出的例子支持正则的方式就是分割查表啊,换掉正则支持的库有点难 |
恩 要能支援解讀 regex 來自動將裡面的漢字換掉比較難 但如果是在純文字搜尋這點上的話 就比較簡單實現 只需要注意 escape 就可以了 |
能说说这个的主要应用场景(user scenario)吗? |
在繁簡混雜的環境下 要搜尋字詞比較方便 也能便利的搜尋並且修正異體字 但會因此導致搜不到內容 |
希望能支援 在搜尋時 無視簡日漢字
例如像這個一樣 https://demonovel.netlify.com
可以在搜尋框內打上任何漢字 然後會自動配對簡繁日漢字
例如搜尋
無視簡日漢字
就會變成
/[无無][眎視视視][简簡]日[汉漢]字/u
The text was updated successfully, but these errors were encountered: