Giter Site home page Giter Site logo

word_autocomplete's People

Contributors

phu54321 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

word_autocomplete's Issues

Deck whitelist / blacklist, same with tags

Feature request

Problem description

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.

Suggested solution

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!

Hotkey customization

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

request : refresh database every few cards

Feature request

Problem description

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.

Suggested solution

After adding each new card or every few minutes, add recents words to the word list db.

Thanks for taking a look!

n-gram completion

Feature request

Problem description

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.

Suggested solution

This might be very computationally expensive to implement! Need a better algorithm!

Additional context

It's possible. I've done this before.

pop up stays on

Bug report

Describe the bug

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)

Reproduction step

Steps to reproduce the behavior:

  1. start writing a card
  2. input the word "begin" (given you have the word beginning already somewhere in the db)
  3. select it
  4. cloze it
  5. undo
  6. the word is now unclozed but still selected, and the pop up is still on, and will stay on and impede reading as long as I don't click on it. If I click on it it disappears and nothing is input.

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.

Anki/OS versions

  • OS: Ubuntu 18.04
  • Anki version * 2.1.35*

numpad issue, window 10

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

web worker (performance!)

Feature request

Problem description

Use web worker for asynchronous autocompletion

Suggested solution

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.

setTimeout(checker, 1)

Question about html

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!

currently broken on 2.1.44?

Bug report

Describe the bug

image
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.

Reproduction step

  1. uninstall the addon
  2. reinstall it
  3. make sure you're on anki 2.1.44
  4. (edit the completion shortcut to "alt+tab")
  5. open add window, enter a few words then trigger the shortcut
  6. see bug

Anki/OS versions

  • OS: [Ubuntu 18.04]
  • Anki version [ex: 2.1.44]

Additional context

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?

request : display rank number just before suggested words

Feature request

Problem description

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 .

Suggested solution

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!

Implement caching

Feature request

Problem description

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)

Ignoring non-word

Feature request

Problem description

This addon suggests me some non-word

image

Suggested solution

    1. Ignore excessivly long word (maybe longer than 20 characters?)
    1. Ignore non-text elements, like image paths or so. For example, project kian adds each note's original markdown as base64 format, like this. Base64 part should not be used.
    <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>

Alternative solutions you've thought of

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.