Ajatt-Tools / gd-tools

🍣 A set of tools to enhance GoldenDict.
https://tatsumoto.neocities.org/blog/setting-up-goldendict#gd-tools
GNU General Public License v3.0
35 stars 6 forks source link

Gd-mecab #5

Closed trak43 closed 7 months ago

trak43 commented 1 year ago

Gd-mecab is saying 'not enough parameters' when I am copying subtitles to goldendict through mpvacious. I have installed the corrent dependencies, installed gd-tools and sometimes mecab works however in this case it does not work. I have configured mecab correctly and put this: gd-mecab --word %GDWORD% --sentence %GDSENTENCE% I get exit code 1 not enough parameters

tatsumoto-ren commented 1 year ago

Do you get the same exit code when running gd-mecab from the terminal?

Change %GDSENTENCE% to %GDSEARCH%.

screenshot-2023-04-29-00-55-14

trak43 commented 1 year ago

It works when I use the terminal, I used the test bash script to test it and it works. The program works when I type it in manually however it gets stuck on that one and the input from mpvacious does not get put into mecab while it does work on the pics

trak43 commented 1 year ago

image The issue still persists with %GDSEARCH%

tatsumoto-ren commented 1 year ago

The issue still persists with %GDSEARCH%

Does your version of GoldenDict support %GDSEARCH%? It's a recently added feature.

trak43 commented 1 year ago

So I found a work around, if I just click on the history it will show the mecab perfectly. However while if I directly send a send a sentence through mpvacious it will say there are not enough parameters and it floods my notifications. Mecab definitely works but there is a bug. Also I just did yay -Syu and there are no updates. image

tatsumoto-ren commented 1 year ago

I'll test it with mpvacious. For now if you're having trouble, replace gd-mecab with gd-marisa.

trak43 commented 1 year ago

To try and explain the current issue I have in more detail, the goldendict pop up doesn't automatically update so it's tedious since I have to go to another window, click on the history and then make a new card. Gd-pics, on the other hand, updates so I think it's a mecab specific problem.

trak43 commented 1 year ago

It's worth mentioning that I'm using mecab-git and mecab-ipadic from archlinux-cn. mecab-ipadic-git from the aur recently stopped installing and I confirmed this is not an aur manager problem as I tried installing it manually. They're both the same program though so this probably isn't the issue but it's worth testing if you don't find anything.

tatsumoto-ren commented 1 year ago

I can't reproduce this behavior on my machine (with mpvacious or without). But I also have mecab-git from archlinuxcn.

MicrochipQ commented 1 year ago

I'll test it with mpvacious. For now if you're having trouble, replace gd-mecab with gd-marisa.

gd-marisa also does not work in goldendict secondary windows. I'm using mecab-git from AUR and marisa from arch official repo image

Goldendict-ng 23.07.25.e44a259e at 2023-08-17T16:40:03 Qt 6.5.2 GCC 13.2.1 20230801 arch linux 6.4.10-zen2-1-zen x86_64-little_endian-lp64 Flags:USE_XAPIAN MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT

MicrochipQ commented 1 year ago

I checked and found out that there is something wrong with %GDSEARCH% passed from goldendict

tatsumoto-ren commented 1 year ago

I checked and found out that there is something wrong with %GDSEARCH% passed from goldendict

Did you pass wrong arguments? If so, make sure that %GDSEARCH% is preceded by --sentence. For example, gd-marisa --word %GDWORD% --sentence %GDSEARCH%

MicrochipQ commented 1 year ago

I checked and found out that there is something wrong with %GDSEARCH% passed from goldendict

Did you pass wrong arguments? If so, make sure that %GDSEARCH% is preceded by --sentence. For example, gd-marisa --word %GDWORD% --sentence %GDSEARCH%

I think this is a bug of the new version of Goldendict. Everything works in the main window, but as soon as I open the secondary window (e.g. scanner), %GDSEARCH% is passed empty

MicrochipQ commented 1 year ago

@trak43, another way to fix: image