AnkiDroid flashcard integration: some issues and suggestions

davylue

秀才
Hello everyone,

First let me say that I searched the forums and couldn't find any discussion on the topics that I raise here.

I've discovered the AnkiDroid integration feature recently and I really enjoy the swiftness of card creation that it allows. Nevertheless, here are a few issues in order of importance:

1) Not possible to choose which dictionary is used upon card creation
When I press the plus symbol inside pleco it will always use the dictionary that's closest to the top. For me that's the pleco dictionary. While this is mostly fine, there are many times when other dictionaries give better information. There should be a button for card creation or an option in the settings that let's users choose which dictionary they want to use. Maybe even multiple. Of course I realise that there are some copyright restrictions.
What's funny about this problem is that when I use the screen reader function of pleco and create a card, the card's information will be based on the dictionary that I have currently enabled, and as it is easy to switch between dictionaries while using the screen reader, the feature that's missing inside the pleco app is working in the screen reader extension.

2) Cannot edit newly created cards from screen reader
The button on the bottom left is just not there. I'm assuming there are some technical reasons for this.

3) Not possible to disable pinyin for example sentences
Just that. It's possible to disable pinyin inside pleco itself, so this feature really should be easy to implement.

4) Not possible to disable translation for example sentences
Not a big deal, but sometimes figuring out the meaning of an example sentence without any translation is just what you want on a good flashcard.

5) Not possible to disable all formating exept line breaks
I appreciate that pleco gives me the option to copy information as plaintext, but then there's no line breaks, so it's really not readable anymore; On the other hand, default layout especially for example sentences looks pretty, but it also takes up too much space.

6) No option for frozen fields
I often like to add a small note on top about how I came across the word on the flashcard on my "Annotation" field. This is where I f.i. put the name of the article I'm reading. When I'm adding cards inside pleco, I can edit the corresponding field manually for each new card that I create. When I'm using the screen reader function, though, it is not possible to edit the card right away (see point above). This means that I would have to switch to AnkiDroid, search for the word, and manually enter the information for each flashcard I create using the screen reader. Along with point 2), an option for frozen fields would really make card creation a lot quicker.

7) No option not to import part of speech
I guess this might be impossible to implement, I'm assuming the part of speech part of the dictionary entries don't have a specific ID. Nevertheless, this would help tidying up the flashcards.

8) Default tags seems to be buggy sometimes
In order to work around 2) and 6), before reading an article yesterday I added a tag that contains the information I want to put in my "Annotation" field as a "Default Tag". After some time, however, these default tags wouldn't disappear, even when I had already removed the tags from the "Available Tags" list. In the end, these faulty default tags appeared on any new card I created and in addition, I couldn't edit the cards from inside pleco anymore (pressing the plus symbol just gave me a message that the default tags where added to the note). At any rate, after restoring my settings to default status and toggling on "Show flashcard status [+] in lists", "Change on tap-hold" and "Always prompt" the problem disappeared.

8) Colours are imported according to current colour scheme
This became an issue when my light blue pleco colour scheme was used to create cards for my light blue Anki note types. I discovered that this is entirely dependent on the current colour scheme and during night mode, text like example sentences will always become blue on the flashcards. Changing my colour scheme to something that has enough contrast for Anki's day and night mode was easy enough, but there should still be an option for this.

I am attaching some images to show what a pleco flashcard looks like for me (1) directly after importing it, (2) after removing all <p> tags, (3) after styling it completely to my likes. It might not look like a big deal on PC, but on my phone formating makes the difference of being able to three or five example sentences without scrolling, even more if I remove emtpy lines.

I would greatly appreciate support for any of the abovementioned issues.
Thanks

plecoflashcard1.png
plecoflashcard2.png
plecoflashcard3.png
 
Last edited:

mikelove

皇帝
Staff member
Thanks!

1) Not possible to choose which dictionary is used upon card creation

This is somewhat limited by what we can export - we're only able/permitted to export clear text from a few dictionaries, so we likely wouldn't be able to export form the dictionary of your choice even if you could choose.

2) Cannot edit newly created cards from screen reader

That one's technical, as you say - in Screen Reader we're running a very restricted UI.

3) Not possible to disable pinyin for example sentences
4) Not possible to disable translation for example sentences

These should be fixable, yes.

5) Not possible to disable all formating exept line breaks

That one might be a little more complicated programming-wise but we can consider it for the future.

6) No option for frozen fields

We actually may be able to do even better there: we're working to add an option in one of our 4.x updates to tag cards with the context they were created from. We're developing that iOS-first (since it's way, way easier to debug native code in Xcode than in Android Studio), so we haven't done anything with Anki integration yet, but once we do port that to Android it should be pretty easy to incorporate that into the AnkiDroid creation workflow too.

7) No option not to import part of speech

That one is semantically tagged, it would just be matter of adding a way to hide that field; at the moment it's not something we support anywhere even internally so it would take a good bit of coding to make it an option.

8) Default tags seems to be buggy sometimes

Will investigate, thanks.

8) Colours are imported according to current colour scheme

That may be dicey to fix coding-wise but we can investigate, yes.

It might not look like a big deal on PC, but on my phone formating makes the difference of being able to three or five example sentences without scrolling, even more if I remove emtpy lines.

Makes sense, but that would require a bigger rethink of how we interact with AnkiDroid, namely an option to tag everything semantically (relying on you to then style it the way you like in CSS) rather than dumping text with its styling right in the tags so that it should look respectable even if added to an existing note type.
 

davylue

秀才
Thanks for your reply :)

I'm looking forward to the changes future updates will bring to the flashcard system.

One thing that I forgot to mention is that I would like there to be a way to isolate example sentences as a field from the English definition. In my note type, I place the definition of the Chinese word in a different place from the examples. What ends up happening right now is that it shows the definition twice on the same card whenever there are no example sentences.

we're working to add an option in one of our 4.x updates to tag cards with the context they were created from
I don't quite understand what this means, but still, 拭目以待!

relying on you to then style it the way you like in CSS
I personally reckon that most people like myself who go as far as to use Pleco to create flashcards in AnkiDroid (and not rely on Pleco's flashcard system only) are relatively experienced Anki users. Hell, after browsing the internet I felt like most people haven't even realised that this is a thing. So I think that there's only a very small group of people who are using this feature yet haven't created their own note types in Anki.
Another possibility would be to split the styling behaviour into two categories, making my suggestion just a different mode of how the two apps interact. Then again, this might make for confusing design and create technical issues.

Keep up the good work
 

mikelove

皇帝
Staff member
One thing that I forgot to mention is that I would like there to be a way to isolate example sentences as a field from the English definition. In my note type, I place the definition of the Chinese word in a different place from the examples.

Makes sense.

I don't quite understand what this means, but still, 拭目以待!

Basically it means we'd specifically output the name document or whatever you were reading when you created the word to the card.

I personally reckon that most people like myself who go as far as to use Pleco to create flashcards in AnkiDroid (and not rely on Pleco's flashcard system only) are relatively experienced Anki users. Hell, after browsing the internet I felt like most people haven't even realised that this is a thing. So I think that there's only a very small group of people who are using this feature yet haven't created their own note types in Anki.

Perhaps, but even with experienced users our thinking was that you probably already had Anki decks and note types you were happy with and that your goal with Pleco would be on adding one-off individual words to those decks. (whereas creating a new note type could create issues with duplicate checking plus you'd have another thing to go in and customize to give yourself the right font sizes etc)
 

davylue

秀才
Hello again,

There is are two more things that I would like to address.

First, I have noticed that sometimes when I manually add text to a Pleco generated Anki flashcard, the text originating from the original Pleco entry will be strangely strechted out. I'm assuming there are some fairly simple HTML reasons for this, so I am posting the HTML from my "Examples" field here (although I don't think I've changed it in any way). Please let me know if you can figure out a fix for this.

<div align="left"><p><b><span style="font-size:0.80em;"><span style="color:#B4B4B4;">VERB</span></span></b><br><br>bear grudges; harbour bitter resentment<br><br></p><br><blockquote style="border-left: 2px solid #f57c00; margin-left: 3px; padding-left: 1em; margin-top: 0px; margin-bottom: 0px;"><p><span style="color:#F57C00;">他可不</span><span style="color:#F57C00;"><b>记仇</b></span><span style="color:#F57C00;">。</span><br><br><span style="font-weight:600;">Tā kěbu </span><b>jìchóu</b><span style="font-weight:600;">.</span><br><br>He’s not the sort of person to bear a grudge.<br><br></p><br></blockquote><br><blockquote style="border-left: 2px solid #f57c00; margin-left: 3px; padding-left: 1em; margin-top: 0px; margin-bottom: 0px;"><p><span style="color:#F57C00;">心胸狭隘的人容易</span><span style="color:#F57C00;"><b>记仇</b></span><span style="color:#F57C00;">。</span><br><br><span style="font-weight:600;">xīnxiōng xiá'ài de rén róngyì </span><b>jìchóu</b><span style="font-weight:600;">.</span><br><br>A narrow-minded person tends to bear grudges.</p><br></blockquote><br></div><plecoentry c="00000000" d="50414345" e="01670e00" x="-1"></plecoentry>

Second, concerning my first point
1) Not possible to choose which dictionary is used upon card creation
I have one more thing to say.
I talked about how it is possible to choose the dictionary for card creation in reader mode, but not from the dictionary screen. The funny thing that I found out is that it is actually possible to choose one's desired dictionary when adding a flashcard even from the dictionary screen through a workaround. When viewing a dictionary entry, I simply tap on the headword (which activates the small reader box) and choose a dictionary from the bottom right corner. If I then press the plus button, the flashcard will use the information of the dictionary that is active in the reader box.
Now, you're right in saying that not all dictionaries are available for card creation due to legal reasons (for instance, OCC will never work). However, the KEY dictionary for instance will always work. If I just press the plus button without following this procedure, on the other hand, it will always use PLE, unless there is no PLE entry. This works fine for me, but in a future update, you could try to make choosing from the available dictionaries easier understandable.
 

mikelove

皇帝
Staff member
I'm not seeing anything in that HTML that would explain the stretched out text, though TBH I'm not really an expert on that. Maybe there's something in your template CSS that's shrinking an element's width in some way?

If you long-press on the dictionary abbreviation button at the top right corner of its definition on the definition screen, there's an 'add to flashcards' menu item there that should let you add a card from that specific dictionary.
 

davylue

秀才
Hello,
I just ran into the default tag issue again for the ankidroid integration. when tags are deleted while they are still chosen as default tags, the flashcard feature shows some bugs like you can't edit or delete cards anymore.
my suggestion is that you should make it impossible to delete tags from the available tags list when these are selected as default tags. I think this is all that it takes to solve the problems.
 

davylue

秀才
This is what the problem looks like. sometimes I can make it go away, but I haven't managed this time. The reason this becomes problematic is because when I tap on "card info" after a long tap on a dictionary entry, or when I tap or long tap the [+] button, it only says "Added tags ...", but it doesn't let me edit anything.

EDIT:
there's a little progress.

in my list of tags I had separated the tags with a comma + space + line break. apparantly, the line break is also counted towards the tag. writing:

Pleco,
Pleco, Pleco

in my list of available tags made the hidden
"
Pleco"
tag appear and I could now disable it. however, I still can't edit cards and when I press the button the "Added tags ..." does not correspond with the default tags set in my settings, which look normal now.
 

Attachments

  • Screenshot_20191111-134305.png
    Screenshot_20191111-134305.png
    140.2 KB · Views: 503
  • Screenshot_20191111-134259.png
    Screenshot_20191111-134259.png
    159 KB · Views: 495
Last edited:

davylue

秀才
this is what it looks like. the strange thing is that there's an extra comma before the first tag in the grey notification at the bottom which isn't there in the tag list.

anyway, I actually managed to get it to work by deleting my 0成语 tag. I do notice that the comma looks different after this tag (probably because it's a Chinese character), but there is no problem with my syntax and I didn't use the bigger chinese comma either. soo maybe you devs can look into separation of tag issues? I always get this other comma when I type after a chinese character, no matter what keyboard I use. and I'm assuming there's a bug connected to this. sooo please investigate this problem, thx!
 

Attachments

  • Screenshot_20191111-140022.png
    Screenshot_20191111-140022.png
    133.3 KB · Views: 507
  • Screenshot_20191111-140038.png
    Screenshot_20191111-140038.png
    180.1 KB · Views: 428
  • Screenshot_20191111-140129.png
    Screenshot_20191111-140129.png
    164.6 KB · Views: 483
  • Screenshot_20191111-140133.png
    Screenshot_20191111-140133.png
    151.4 KB · Views: 471

davylue

秀才
I'm not seeing anything in that HTML that would explain the stretched out text, though TBH I'm not really an expert on that. Maybe there's something in your template CSS that's shrinking an element's width in some way?

If you long-press on the dictionary abbreviation button at the top right corner of its definition on the definition screen, there's an 'add to flashcards' menu item there that should let you add a card from that specific dictionary.

when I long-press on a dictionary that allows flashcard creation (like the CC-CEDICT), I only get:

browser dictionary
search for headword
search for pronunciation
copy headword
copy full entry
manage dictionaries
send feedback

but no "add to flashcards" option. this is true for all of my dictionaries. could this be an android vs. iOS thing?
 

mikelove

皇帝
Staff member
Sounds like this all boils down to some sort of issue in the comma parsing, yes - we'll see what we can do about that. (we're going to be integrating a standard cross-platform version of ICU - with a few Pleco-specific modifications like our own Chinese segmentation - for our next major update, which should make it much easier to deal with issues like this since we won't have to worry about what specific text parsing code shipped in the OS)

Add command - sorry, on Android you can get that via Settings / Definition Screen / "+ for each entry".
 

davylue

秀才
Hello Mike,
Please allow me to ask whether there's any news regarding the further development of the AnkiDroid flashcard integration. In particular, I would like to know if some of these features will be available in the foreseeable future:
  • Option to remove the word definition from the example field (currently, even if there is only one meaning listed, Pleco will always list examples under those definitions).
  • Option not to add example sentences if no example sentences exist (currently, if there are no examples, then Pleco will just copy the definition to my "Examples" field).
  • Option to easily select which example sentences should be copied onto the flashcard (f.i. letting the use check the examples they want individually if s/he long presses on the word, or something). I imagine this would be quite a bit of extra work, though.
  • Option to append the context sentence in which the word was looked up in onto a designated field.
I would greatly appreciate it, if some of these could be implemented. As another tip: You should make it so that an error prevents users from deleting or changing any listed tags if the tag(s) is selected as a default tag. Otherwise buggy behaviour will ensue.
 

mikelove

皇帝
Staff member
To be honest, we're not really focusing on that right now because we're trying to finish off our big cross-platform 4.0 update; all of these are sensible ideas but we're reluctant to spend any time on them until 4.0 is out because we'd be adding on to something we're about to replace entirely.

However, for that update we've added an Anki format importer, and in subsequent updates we're thinking of building on that work to actually allow Pleco to act as a full-fledged Anki client and read/write the Anki database directly instead of through an API, which would make it much easier to support a lot of features like this. (we might even be able to let people perform Anki flashcard tests within Pleco, thus gaining access to our UI with direct popup lookup / cross-referencing / etc integration while still having the data live in your Anki database / remain usable in other Anki clients)
 
Top