Aglish - YouGlish Widget for Anki [Official Thread]

This is the official support thread for Aglish - YouGlish Widget for Anki - AnkiWeb

If you have any issues using the add-on or feedback, you can post here.

Alternatively, if you use GitHub, you can open an issue in GitHub - abdnh/aglish: Anki add-on for YouGlish

3 Likes

Hey!
This is an amazing addon :smiley:
Wondering if it can fetch a random pronunciation each time I study the same note/card?
Have a great day

I also wrote a Random Word Generator add-on a while ago.
It can be combined with Aglish like so:

{{aglish lang=en:randlist words=en length=1:}}

EDIT: You may want to use the start and end options of the randlist filter to avoid getting pretty obscure and rare words.

1 Like

{{aglish lang=chinese:randlist accent=cn autoplay=FocusMorph length=1 words:cn}}

This gives me a:
not enough values to unpack (expected 2, got 1)

What am I doing wrong?

Some notes:

  • accent belongs to the aglish filter; it should go before :randlist
  • autoplay belongs to aglish, and it doesn’t take a value like other options, so you should just write autoplay without the =FocusMorph part (not sure what you’re trying to do here).
  • words takes a wordlist’s name. E.g. words=en.
  • Since you want random words, you don’t have to use a field name after the filters. So the last cn part is unnecessary.
  • If the last cn is meant as a wordlist name, make sure you actually have the file under the wordlists subfolder in the Random Word Generator add-on folder, as such a list is not provided by default.

Try this instead:

{{aglish lang=chinese accent=cn autoplay:randlist length=1 words=cn:}}
1 Like

The filter syntax is similar to the one used in Anki’s tts filter. See the examples in the manual: Field Replacements - Anki Manual

1 Like

By the way, I just realized you may be asking about seeing random videos of the same word instead of different random words each time. I’ll look into implementing this feature.

1 Like

Hi,

It’s a wonderful feature, thanks a lot!

What about adding the feature ‘turn off loop mode’?
I would like to create a Card (front) with a video and a back card with the transcript of this.
Extra feature inside: random video every time to review the card :slight_smile:

Francesco

Do you mean you want the widget to start with the last shown video in the last review?

This is a really nice feature to have, but implementing it correctly will require a change from YouGlish’s side. I’ve asked YouGlish’s authors to support this, but haven’t got a reply yet.

Do you mean you want the widget to start with the last shown video in the last review?

No, I don’t.
I mean That could be useful to enable ‘turn off loop mode’ option to use only one RANDOM video (in loop in the front Card) and Retrieve related transcript (in the back Card).

It’s a nice feature to improve your listening (guessing the phrase) and different context of the use of that word :wink:

I’ve added experimental support for YouGlish login. This should allow premium users to use their subscriptions with the add-on for an increased search quota. Details in the AnkiWeb description. If anyone has a premium subscription, I would appreciate testing this feature and letting me of any issues.

Dear Abdo,

I LOVE your brilliant YouGlish add-on!

Is there any chance you would be open to adding an EXACT phrase search option? (Currently, if I set my cards to search “where are we” vs. “where we are” in order to learn English “wh-” question vs. statement intonation, the results highlight EVERY instance of all constituent words I have searched—i.e., instead of highlighting ONLY my target phrase “where are we” or “where we are,” the individual word “are” appearing before or after by itself is also highlighted.

Thanks for your consideration of this request!

Monica

That would be very nice to have, but the add-on relies on the functions provided by YouGlish in their API and unfortunately this can’t be implemented without the YouGlish developers adding such an option first. I suggest sending a feature request to YouGlish via their contact page. You can link to this post for context.

Hi, I really love the addon! However as I do all my reviews on iOS I can’t really use it, but you mentioned on the addon page that you were planning on adding a feature to allow users to opt in to include code in templates to have the widget work also on mobile. I was wondering if that’s still being considered or if a user would want to make the widget work on mobile themselves, are there any general steps one could take? Again, this is a really useful addon!

It’s on the todo list. For now, you can customize your widget, copy the code from this page and replace the search phrase with a field reference: YouGlish Widget

Example:

<a id="yg-widget-0" class="youglish-widget" data-query="{{Word}}" data-lang="english" data-components="8415" data-bkg-color="theme_light"  rel="nofollow" href="https://youglish.com">Visit YouGlish.com</a>
<script async src="https://youglish.com/public/emb/widget.js" charset="utf-8"></script>

The part you need to manually change is data-query="{{Word}}".

Hey abdo, thanks for your hard work.

I am having a problem that some words (like “sufficient”) don’t work and it says “span style=” how I can fix it?

Can you post the text you’re using in your card template?

Try using {{text::Front}} instead of {{Front}}

{{aglish:text::Front}}

1 Like