Skip to content
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

Unable to add kana terms after be36ac9 #133

Closed
Calvin-Xu opened this issue Nov 12, 2022 · 7 comments
Closed

Unable to add kana terms after be36ac9 #133

Calvin-Xu opened this issue Nov 12, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@Calvin-Xu
Copy link
Contributor

I could no longer add terms that are kana only. The widget displays the "find in Anki" icon, and clicking on it would reveal in Anki that there are not matching notes. Reverting to 07fe547 solved the issue. I wonder if there are some issues with the ensuing fixes. I am using the latest version of AnkiConnect from AnkiWeb.

@ripose-jp ripose-jp added the bug Something isn't working label Nov 12, 2022
@ripose-jp
Copy link
Owner

The fix will be up on master shortly. As always, thanks for the report.

While I have your attention, have you tried the OCR feature? If you have, what are you thoughts? I really want to figure out what to do with it in the next release.

@Calvin-Xu
Copy link
Contributor Author

Calvin-Xu commented Nov 12, 2022

Thank you as always!

While I have your attention, have you tried the OCR feature?

I have not. School's been a bit hectic for me lately and this is the first time I've used Memento in a while. You can tell because otherwise surely I'd encounter this bug earlier. But I'll try it out soon and think about it.

@ripose-jp
Copy link
Owner

Don't worry about it. No rush.

@Calvin-Xu
Copy link
Contributor Author

Calvin-Xu commented Nov 16, 2022

I saw that

Any problems you may have getting manga-ocr installed using pip is beyond the scope of this project. I wish you the best of luck.

But I am still wondering if I can have some pointers. I am getting the ModuleNotFoundError: No module named 'manga_ocr' error as mentioned in https://github.com/ripose-jp/libmocr README, but I know nothing about the build system to specify the Python version for building libmoc as a dependency of Memento.

On this specific system I should only have one installation of Python3.10 via homebrew, as Apple removed the default Python in macOS 12.3, so still getting this error was surprising to me.

@ripose-jp
Copy link
Owner

That's strange. I didn't do anything special to install it on macOS. I just installed manga-ocr via pip and it just worked. You could try forcing CMake to link to Python 3.10 by passing -DEXACT_PYTHON_VERSION=3.10 in the CMAKE_ARGS environment variable.

The problem is that the version of Python that Memento is linked to isn't the same version as the one with manga-ocr installed. There are a ton of reasons as to possibly why:

  • Multiple installed Python versions and Memento is linked to the wrong one
  • Some weird configurations with virtual environments
  • Something with envvars like PYTHON_HOME being set wrong (not likely)

I couldn't tell you which.

@Calvin-Xu
Copy link
Contributor Author

Thank you. I've been able to build Memento with OCR support. So far it the functionality works amazing. Currently though Memento does not seem to support associating an OCR (or manual lookup) result with a certain stretch of audio in the absence of a subtitle file, which feels like neglecting Memento's most important feature.

I think it would be great if Memento allows the user to choose a part of the current video as the current context. Some DWIM behavior I imagine is:

  • allow the user to continually mark points in the video with a hot key
    • when adding a card:
      • if there are no points past current playback time: extract context between the last two set points
      • if current playback time is between two points: extract context between the two points

Also this might not be possible, but I wonder if Memento could use the timing information from sub-seek to determine the current {sentence}. This feels inflexible and might be expensive, so I don't really know.

@ripose-jp
Copy link
Owner

Glad that you got it working. Since you're making a feature request, could you open a new issue so I can track it? You can copy and paste it.

My only major question regarding the feature is what is the use case? It makes sense to me that manual search may be associated with an audio clip if raster subtitles were OCR'd. Outside of that, OCR will usually be associated with visual context as opposed to audio context.

The reason I wanted to add OCR in the first place was due to Evangelion episode 14 using cards of text throughout to communicate information. The second use case I found after implementing it was using this script to turn Memento into a manga reader. For both of these cases, I don't see the benefit of extracting audio from the content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants