Closed KonstantinDjairo closed 1 year ago
I can't download the file, but if its contents are identical to the linked github repo, it can be added as a submodule instead.
mandarim
probably should be mandarin
it's no identical, you would have to compile it from the repo
and also, the link words fine to me
GD-MANDARIN
gd-mandarin is a program for GoldenDict that uses the CC-CEDICT-MeCab dictionary to analyze and segment sentences and make the words clickable, just like the gd-mecab for Japanese.
Download link (ready files for Unix): FreeMdict Cloud Be sure you have mecab installed before installing gd-mandarin.
Script: https://pastebin.com/L9W5BDWN
Unpack the .zip file and move the folder "gd-mandarin" to ~/.local Move the script "gd-mandarin.sh" to ~/.local/bin and make it executable (on Ubuntu you can run "sudo chmod +x ~/.local/bin/gd-mandarin.sh")
The way it is, it automatically converts the sentence to Traditional Chinese. If you want it to convert to Simplified Chinese instead, open the dicrc file in ~/.local/gd-mandarin and replace \<a href="bword:%f[5]">%f[5]\</a> for \<a href="bword:%f[6]">%f[6]\</a>. It should look like this:
node-format-gdmandarin = %f[6] unk-format-gdmandarin = %f[6] bos-format-gdmandarin = eos-format-gdmandarin = \n
If you would like to disable the conversion feature, replace \<a href="bword:%f[5]">%f[5]\</a> for \<a href="bword:%m">%m\</a>. It should look like this:
node-format-gdmandarin = %m unk-format-gdmandarin = %m bos-format-gdmandarin = eos-format-gdmandarin = \n
On GoldenDict, go to "Edit", "Dictionaries", "Programs", click on "Add" and select "HTML" as type. In the "Name" field, write gd-mandarin or the name you would like to be displayed for the analyzer. In the "Command Line" field, write:
gd-mandarin.sh --word %GDWORD% --font-size 25px --sentence %GDSEARCH%
first of all, thanks for fixing my terrible code, appreciate your effort! i'll make some changes and merge it. notice that mecab-cache will conflict with the current japanese version of mecab, we have to change that variable
The gd-mandarin.zip file isn't used in the code. Did you forget to extract it?
This PR adds a modified version of gd-mecab, in fact it also uses mecab.
The data used to compile the dictionary was taken from that repository, and it's worthy noticing that this repository doesn't contain instructions on how to use it without needing to specify the directory everytime.
So basically what i did was compiling a "userdic" file, along with some other files, and with some trial and error i got it working. The folder that is mentioned inside the code will be available as a tarball, since i dont know what really is needed to accomplish what i did by accident.