melink14/rikaikun

Rikaikun thinks って can be an inflection of く verbs

Closed this issue · 16 comments

For example, やって will give results for various やく verbs; this is probably not too commonly seen since if a kanji is used, it will never appear using the wrong inflection.

This is probably because an inflection was added for 行く which has an irregular conjugation to 行って and 行った.

って く 640 21

Instead, we should add the irregular conjugations as full lines like we do for 来る and する. i.e.:

いって いく

I don't think we need to update the type mask (explained in this post: #988 (comment)) since it still operates as a ru verb and isn't as irregular as suru/kuru.

Edit:

Found some other similar lines like:

っちゃう く 514 3

Which are different versions of って with auxillary verbs. Probably should check for all く lines and fix any that have small て in the first part.

So instead of being って く it should be って いく?

So instead of being って く it should be って いく?

Almost! The way these transforms work, is that it replaces the first part with the second part and then sees if it can find a match in the dictionary. So, in order to find いく we'll need to make the first part more specific as well:

いって いく

I updated the initial post as well for posterity to make this clearer (and also added an example of another case with the same problem though there may be others)

Got it, so these lines

って く 640 21

っちゃう く 514 3

should be removed and an exeption for iku should be created like:

いって いく
いっちゃう いく

Is that right?

I also found another line that I think it has the same problem

った く 640 14

@bruno-queiroz Yes, that's exactly right. And the other line you found should also be fixed. Good found!

Nice

I was reading the #988 post and I learned how the bitmask works and how the numbers are decided. But I still don't know the purpose of the bitmask, could you explain me?

another question:
The deinflect.dat file is not modified directly right?

I was reading the #988 post and I learned how the bitmask works and how the numbers are decided. But I still don't know the purpose of the bitmask, could you explain me?

The purpose is to succinctly describe how the words is conguated both before and after deinflecting the word. That part is definitely needless complex. It is used to tell if a given rule should apply to a word or not. (in data.ts)

The deinflect.dat file is not modified directly right?

It is modified directly for now though maybe it wasn't in the past before I started the project. The long term plan is to convert the file into a normal TS file where we can easily share code and generate the final object.

Can I try to solve this issue?

Please do! Let me know if you have any further questions.

Ok, thank you.

I'm having some problems with the git hooks, when I try to git push even without any changes my git push fails with some errors like:

❌ Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

husky - pre-push hook exited with code 1 (error)

error: failed to push some refs to 'github.com:bruno-queiroz/rikaikun.git'

When I tried to git push --no-verify everything worked, what should I do?

It seems like the location of google-chrome is not in the default place on your system; you can use no-verify but it would probably be annoying to not be able to run tests locally.

I believe you can use the environment variable RIKAIKUN_PUPPETEER_EXEC_PATH to set the path to your local chrome and make things work consistently.

What OS are you using btw?

I'm using windows with WSL2.
The problem was because I didn't have chrome installed inside my wsl so I did that and it worked.

But now when I try to git push with no changes 2 tests are failing for some reason, any guess?

it('triggers xsearch message when text area has custom width and scrollbars', function () {

triggers xsearch message when text area has custom width and scrollbars

expected sendMessage to have been called with arguments matching { text: >"日本語訳・**語訳にも", type: "xsearch" }
{ dictOption: "2", text: "訳・**語訳にも", type: "xsearch" } { text: "日本語訳・>**語訳にも", type: "xsearch" }
function () {}
at n. (extension/test/rikaicontent_test.ts:209:56)

it('does not trigger xsearch for text that should be truncated by custom height', function () {

does not trigger xsearch for text that should be truncated by custom height

expected sendMessage to not have been called
at n. (extension/test/rikaicontent_test.ts:233:60)

Both those tests are about correctness when hovering over text with scrollbars.

The first test seems to be wrapping at a different place.
The second test doesn't actually say what sendMessage was called with so it's harder to debug.

Can you say what version of chrome you're on? I wonder if the fresh install is newer and this is a problem that will be everywhere soon.

Oh! another possibility is you don't the right fonts installed in your WSL... it's possible it would only fail a few tests if you had an almost similar font.

The fonts the CI installs are as follows so it's worth trying:

 sudo apt-get update
 sudo apt-get install fonts-noto-cjk

This is useful feedback; and probably worth updating https://github.com/melink14/rikaikun/wiki/Setup-your-rikaikun-development-environment and/or https://github.com/melink14/rikaikun/blob/main/CONTRIBUTING.md#getting-started once everything is figured out!

Spot on, I installed the font and now all tests are passing.

Should another issue be created to fix the readme or should I fix that in the same pull request?

A separate pull request would be better to keep things focused. I'll make an issue for it.

Ok, thank you!

🎉 This issue has been resolved in version 2.5.45 🎉

The release is available on:

Your semantic-release bot 📦🚀