fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
179 stars 24 forks source link

Features requests and fixes #84

Open succil opened 4 years ago

succil commented 4 years ago

I'd like to make some suggestions.

1) Search box and keywords Whenever I'm looking for a card, and write in search box (Mode: Add-on) more than one keyword, it doesn't consider results with most keywords. For example: Writing "History of England" and "King James" as keywords, the search will return first results with more incidences of ""History of England" instead of "History of England" PLUS "King James"

Let's say I have two cards. This is how add-on works currently:

Result 1: Card 1 England is a country that is part of the United Kingdom. The Irish Sea lies west of England and the Celtic Sea to the southwest. England is separated from continental Europe by the North Sea to the east and the English Channel to the south. (3x England and no results for History or King James )

Result 2: Card 2 The King James Version (KJV), also known as the King James Bible (KJB) or simply the Authorized Version (AV), is an English translation of the Christian Bible for the Church of England. This version of the Bible became the most widely printed book in history. (1x England 2x King James 1x history ).

Card 2 should be at the top of results.

2) Relatable terms Is there a way for the search to consider terms that are related to the keyword, as well as how the stopwords work? For example, it would be interesting in the search for the word "England", for the terms "English" to appear, or for example, the words "History" and "Historically" I know that the synonyms function already exists, but what I propose is the creation of a more extensive list, if it exists on the internet or created by hand by the user, just as there are stopwords.

3) Keyword panel on right side The keyword panel on right side is considering "c1", "c2" as terms with more incidence, which is useless, considering it's just the way close deletions are coded.

4) Edition When I click on edit by the addon, and accidentally open more than one window, sometimes I end up editing the card in one of them and I don't realize that another one was left open. When I close the second open window, I lose the edition made in the first. Is there any way to prevent this?

5) Highlighting PDFs I'm a huge fan of your pdf incremental reading system, but I wonder if is possible to highlighting while using this tool.

6) Can your two add-ons work at same time? Dude, I appreciate your work so much, and I can't use Anki without this add-on that became essential on my routine. Anyways, I wonder if is possible to integrate both add-ons to work like this: SUGGESTION

Or at least implement some shortcut to swich between them. Thank you so much.

Uitalo commented 4 years ago

5) Highlighting PDFs I'm a huge fan of your pdf incremental reading system, but I wonder if is possible to highlighting while using this tool.

Just a tip, I know it wouldn't work entirely the way you want it, you can use some online editing service in Add Cards - Web Browser while this function is not available, like: https://online.foxitsoftware.com/.

Uitalo commented 4 years ago

Remembering here, Polar Bookshelf(https://getpolarized.io/) it seems to work very well with Add Cards - Web Browser, but as it is charging a monthly fee to use the web version and I am not having much time I have not yet analyzed how well the two work together.

fonol commented 4 years ago

Hi, thanks for the feedback, I'll just address your points one by one:

  1. To address this, I first need to know what it says about your SQlite FTS version in the "Info" dialog. The ranking is generally worse if it is not FTS5. FTS5 uses https://en.wikipedia.org/wiki/Okapi_BM25 which I think is a pretty widely-used, proven ranking algorithm. Sadly it is not available in the older FTS versions. Here the solution might be to upgrade your SQLite version.

  2. It is difficult. The best option to implement such a feature would be to use a lexical database like WordNet (https://wordnet.princeton.edu/) where you can find related words by looking for close nodes in the graph. It would be a lot of extra work though, and what about users that don't write their cards in english...

  3. Good note, I think I will simply exclude these in the next version.

  4. I'll look if I can easily catch if you already have the same note open in an edit window, and then prevent you from opening a second one.

  5. Highlighting will come for sure. Cannot tell you when exactly though, but don't expect it to be too far away, as it has been requested multiple times.

  6. I think squashing all three, fields, search results, and web browser in a single window will get impractical fast, especially when you have a smaller screen or many fields. So I think maybe your suggestion with a shortcut to toggle between them would be best, and not too hard to do. I'll put it on my list.

succil commented 4 years ago
  1. Highlighting PDFs I'm a huge fan of your pdf incremental reading system, but I wonder if is possible to highlighting while using this tool.

Just a tip, I know it wouldn't work entirely the way you want it, you can use some online editing service in Add Cards - Web Browser while this function is not available, like: https://online.foxitsoftware.com/.

Wow, awesome. Didn't know that. Thank you! Currently I'm using Foxit instead and I'm very familiar with this reader. Seeing It working through Anki is incredible!

Hi, thanks for the feedback, I'll just address your points one by one:

  1. To address this, I first need to know what it says about your SQlite FTS version in the "Info" dialog. The ranking is generally worse if it is not FTS5. FTS5 uses https://en.wikipedia.org/wiki/Okapi_BM25 which I think is a pretty widely-used, proven ranking algorithm. Sadly it is not available in the older FTS versions. Here the solution might be to upgrade your SQLite version.
  2. It is difficult. The best option to implement such a feature would be to use a lexical database like WordNet (https://wordnet.princeton.edu/) where you can find related words by looking for close nodes in the graph. It would be a lot of extra work though, and what about users that don't write their cards in english...
  3. Good note, I think I will simply exclude these in the next version.
  4. I'll look if I can easily catch if you already have the same note open in an edit window, and then prevent you from opening a second one.
  5. Highlighting will come for sure. Cannot tell you when exactly though, but don't expect it to be too far away, as it has been requested multiple times.
  6. I think squashing all three, fields, search results, and web browser in a single window will get impractical fast, especially when you have a smaller screen or many fields. So I think maybe your suggestion with a shortcut to toggle between them would be best, and not too hard to do. I'll put it on my list.
  1. How can I upgrade my SQL version? image

2, and 3. Ok.

  1. I see it sounds weird but sometimes this issue related on item 4 above happens haha. Thank you anyways.

  2. Ok.

  3. No problem. An easy shortcut to toggle between them would be superb.