-
Notifications
You must be signed in to change notification settings - Fork 1
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
Issues with Japanese model installation #7
Comments
Thanks so much for taking a look at this @thinkingbox12. I am currently trying to reproduce but it seems that on the latest version of Windows there is an issue with one of Spacy's dependencies
This appears to be an issue that is in the pipeline of being fixed by Microsoft. If I can work around it I will try to reproduce your issue. At first glance the error you are getting appears to be something missing on your Windows machine that is needed by sudachi
I will report back as soon as I figure something out. |
Had a little bit of time to get you the error I was having on Ubuntu when trying to install Japanese (large) model. Let me know if theres anything else I can do.
|
Oh that looks fun. So gcc is failing to compile sudachi on linux. Both of these issues seem to not necessarily be problems with this Anki addon but with OS related issues. It would be good to figure out how to workaround them though and document. |
I'd love to help. Where do I begin? |
Ok. I have seen three problems so far and here are the workarounds
Tomorrow I will look into the linux compiler issue.
See if you can get the Japanese working with the workarounds here. After that whatever things you can test out are appreciated. Chinese may be good because I believe it also requires extra 3rd party dependencies like Japanese. |
Did not mean to close this. Reopen. |
Japanese small model (windows) worked after these fixes (install and recalc). Went to install medium model right after. Got this exception
I noticed it reinstalls all the packages for each model (cython, sortedcontainers, dartsclone, sudachipy). Just something to note
An immediate recalc (large model) resulted in this error:
However, after a restart of Anki, I could again recalc using large model. Why is this behaviour occuring? |
Do you get this every time you repeat the same steps? I am wondering if it is similar to the permissions problem for symlinks. If you can reproduce this can you enable Settings -> Update & Security -> For Developers -> Developer Mode
This is known. The code to install via pip uses the
I am not sure what is happening here. I will try to reproduce this. |
I have reproduced this. If you install ja_core_news_md and recalc and then try to install any other model that has a dependency on dartsclone you will see this error. I believe it is because the file listed in the error is still being held open by the anki process. If you restart anki and try to install it again you won't see this error. I believe though that even when you see the error the model has properly been installed. You just need to restart. This is a byproduct of what you astutely observed that dependencies are reinstalled for each model. It is unfortunate. I will try to think of a fix but at this point I am not sure how to resolve this without restarting anki. |
I continue to run into problems. All around Chinese and Japanese and most in Windows. For example, it becomes impossible to remove some models or spacy if Morphman has already loaded the packages. This is because Windows will not allow you to delete files in use and anki has already loaded some DLLs from the packages. My intent all along was to create an easy to use package manager that did not require the user to install python. But trying to install packages and load them while anki is already running is turning out to be a large pain. I am partially considering ditching the GUI package manager and instead just giving users instructions on how to install packages via pip. |
I don't think it would be all that bad. I would imagine the users that would benefit from the more precise Japanese parsing wouldn't mind running cmd. I'd like to start investigating the other issue I posted. I am a beginner to troubleshooting/testing, what exactly does setting up a dev environment consist of and how is it different from just running Anki as a normal user? |
The simplest thing to do is to copy the contents of |
Okay. I think I've centered in on a problem I was having. For whatever reason, when using any Spacy-based morphemizer when recalculating cards (after generating a frequency list from a study plan in the Readability Analyzer), it is not reading from the frequency.txt file, and therefore no cards are tagged with the 'mm_FrequencyList' tag. It seems that this error occurs regardless of the morphemizer that I use, as it fails with both MeCab and Spacy. Moreover, Mecab has no trouble reading from a frequency.txt generated by Spacy. |
Ok. It seems the problem is, when using Spacy, the master_freq counter in frequency.txt is not updating. Still unsure as to why. |
Update #2. The new models (seem?) to be working when the frequency.txt is generated with the readability tool WITH THE MODEL that you want to read it with. This means previously generated frequency lists (typically made with MeCab) are incompatible. I'm not sure why this is. Probably something to do with how spacy lists results/classifies parses, but I haven't figured it out further. Despite this, morphman does not tag whether a card is on your frequency list or not. Additionally, it feels that the cards aren't adhering to the study plan as well as I might have remembered (this might totally be me though, I wasn't particularly familiar with the scoring algorithm before I looked at the code, so maybe it's working the same way as before). |
See this reply: kaegi/MorphMan#221 (comment)
The text was updated successfully, but these errors were encountered: