trgkanki / word_autocomplete Goto Github PK
View Code? Open in Web Editor NEWYou know, fuzzy matching of sublime_text or vscode is amazing
License: GNU Affero General Public License v3.0
You know, fuzzy matching of sublime_text or vscode is amazing
License: GNU Affero General Public License v3.0
As mentionned in #7 , it would be great if I we could remove the suggestion from other languages. I often type medical stuff in french but have then somewhere in english in another deck, hence I have sympathetic suggested before sympathique nervous system. It's a very recurrent issue as english medical terms are often shorter than french ones.
I also fear my 2nd languages deck will increase the computation time even though I never type cards in those languages.
Implement whitelisting and blacklisting of either tags or decks. Blacklist = don't look for cards that correspond to the criteria Whitelist = only look for cards that fit the criteria.
They are not supposed to be used at the same time but I'm sure some people would find very useful to restrict the completion to only a certain deck.
Thanks!
Issue split from #2
Also it conflicted it with the quick navigation field add-on that also use ctrl +(i). Is it possible to add an option to configure the hotkeys in the configure menu? That would be awesome! Thank you
Need a way of configuring hotkeys
The add-on doesn't work for words with diacritical signs.
When creating hundreds of cards in a row on a new subjet, I have to close the current add window and reopen it to benefit from the autocompletion of recently added words.
After adding each new card or every few minutes, add recents words to the word list db.
Thanks for taking a look!
I've once implemented them in the past, but the code is lost :)
Basically it autocompletes if-g-r-a
to interferon-gamma release assay
. Character -
specifies either space between words or the hyphen itself.
This might be very computationally expensive to implement! Need a better algorithm!
It's possible. I've done this before.
Quite often when using your addon I end up with the pop up appearing when I am not supposed to be writing text, so it stays on indefinitely until I click on it (and it won't input a thing btw)
Steps to reproduce the behavior:
I have seen this happend in numerous other occasion, but this is easily reproducible.
A fix could be to add a dumb timeout, or a better one : to not make the popup appear if clicking on it would not result in input.
hi there,
my numpad does not work with this add-on (i have double checked the numlock key). the numpad is part of my laptop keyboard and is not bluetooth or separated.
On my laptop, ctrl + the top numbers row will work for populating the suggested word but will not work with my numpad.
Also it conflicted it with the quick navigation field add-on that also use ctrl +(i). Is it possible to add an option to configure the hotkeys in the configure menu?
That would be awesome!
Thank you
Use web worker for asynchronous autocompletion
The current version uses a series of await-timeout for querying words, which is kinda slow. This should be delegated to another thread. We're living in a multiprocess world.
word_autocomplete/jssrc/autocomplete.ts
Line 60 in 983e32e
Hi,
I was reading the new code and was wondering something about this line from wordset.py
:
field = re.sub(r'<.*?>', '', field)
Does this mean that it removes everything between < and > ? Because if it does it will also remove all mathematical formulation that contain comparison, as well as all cards containing the right combination of arrows =>
for example.
Also, I happen to often type information in html comments when researching cards and when I don't ever need to read the text (for example, the text content of a diagram I photographed into a card). I guess this would be removed too.
I don't really care for the html comment and understand it's very specific but I was wondering if it was really useful.
Thanks!
When triggering the shortcut, the pop up is empty, appears at the wrong place, does not complete anything and does not disappear until I close the window.
Trying to use the shortcut to autocomplete n'th suggestion does not change anything.
I tested with lots of words that are abundant in my decks.
I did not try to disable all the other addons. I had word autocomplete disabled for a while, then decided to give it another go, but had this issue.
Are you aware of this behavior? Any idea on how to fix it?
If I want to autocomplete with the 6th suggestion, I find that counting the words to be sure it's the 6th and not the 5th or 7th takes often longer than adding more letters, so I end up typing more of the word when I could have just autocompleted earlier. I think it defeats the purpose. It especially happens with very long words and very short ones, and I fear it will become even more of a problem once you implement n-gram completion #7 .
Display a small digit before the suggestion or just after like apolon / apologize / (3) apoplexia / (4) apoptosis / (5) apowordsomething
Ideally with a softer color, beige or something.
And I think it could skip the first and second number as counting those is instantaneous.
I'm using this addon a lot, thanks!
As mentionned in #7, it would be faster to implement a sort of caching.
The idea would be to remember each autocompleted word and add it to a list.
Only add to the list if the words is not already there. If it's already there : move the word to the top.
When typing a word : show the words from the list in order of appearance + look for words at the same time.
Of course care will have to be taken to avoid duplicates. Also, it could be interesting to allow fuzzy matching (example : show all words from the list that have a levhinstein distance of at most 2 between the already typed part of the word and the beginning of each listed word)
This addon suggests me some non-word
<script class="tui-md-b64" type="text/markdown" hash="694873658">SW1tdW5lIGNoZWNrLXBvaW50IGluaGliaXRvcuyZgCDsl7DqtIDrkJwgQUIvTGlnYW5kOiB7e2MxOjpDVExBLTQsIFBELTEsIFBELUwxfX0=</script>
<link rel="stylesheet" type="text/css" href="_kian_katex.min.css">
<link rel="stylesheet" type="text/css" href="_kian_github_markdown.css">
<div class="markdown-body tui-html"><p>Immune check-point inhibitor와 연관된 AB/Ligand: {{c1::CTLA-4, PD-1, PD-L1}}</p></div>
Maybe we can infer what is word and what is not, but that seems a bit dangerous option. We aren't doing machine learning so
appears as grey on white or something
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.