whateverforever / epub2anki Goto Github PK
View Code? Open in Web Editor NEWWIP Semi-automatic sentence card creation from ePUB ebooks. Extracts multiple example sentences for each vocab, alternating between them during Anki review.
WIP Semi-automatic sentence card creation from ePUB ebooks. Extracts multiple example sentences for each vocab, alternating between them during Anki review.
For example when input is too large, the user doesn't notice that something happened
(base) ➜ epub2anki git:(main) ✗ python app.py
INFO: Searching for database. This might take some time. You can speed this up by specifying a search path or directly entering the path to your database.
WARNING: The search will stop at the first hit, so please verify that the result is correct (for example in case there might be more than one Anki installation)
INFO: Loaded db from /Users/max/Library/Application Support/Anki2/User 1/collection.anki2
INFO: Loaded db from /Users/max/Library/Application Support/Anki2/User 1/collection.anki2
[Cocoa] Not implemented: MultilineTextInput.set_on_change()
INFO: Loaded db from /Users/max/Library/Application Support/Anki2/User 1/collection.anki2
Error in async handler: [E088] Text of length 3435600 exceeds maximum of 400000. The v2.x parser and NER models require roughly 1GB of temporary memory per 100,000 characters in the input. This means long texts may cause memory allocation errors. If you're not using the parser or NER, it's probably safe to increase the `nlp.max_length` limit. The limit is in number of characters, so you can check whether your inputs are too long by checking `len(text)`.
Traceback (most recent call last):
File "/Users/max/anaconda3/lib/python3.7/site-packages/toga/handlers.py", line 25, in handler_with_cleanup
await handler(interface, *args, **kwargs)
File "app.py", line 270, in do_background_nlp_stuff
out = await loop.run_in_executor(None, step_fun, screen._state)
File "/Users/max/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "app.py", line 178, in step_nlp_epub
doc_epub = state["nlp_module"].lemmatize_doc(state["epub_contents"])
File "/Users/max/Coding/python/epub2anki/nlp/french/nlp_french.py", line 19, in lemmatize_doc
doc = model(partially_french_text)
File "/Users/max/anaconda3/lib/python3.7/site-packages/spacy/language.py", line 439, in __call__
Errors.E088.format(length=len(text), max_length=self.max_length)
ValueError: [E088] Text of length 3435600 exceeds maximum of 400000. The v2.x parser and NER models require roughly 1GB of temporary memory per 100,000 characters in the input. This means long texts may cause memory allocation errors. If you're not using the parser or NER, it's probably safe to increase the `nlp.max_length` limit. The limit is in number of characters, so you can check whether your inputs are too long by checking `len(text)`.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.