phibr0 / obsidian-dictionary

Dictionary - Obsidian Plugin | This plugin adds a multilingual dictionary to the Obsidian note taking tool.
GNU Affero General Public License v3.0
346 stars 44 forks source link

[FEATURE] Create flashcards directly from meanings #36

Open dummifiedme opened 2 years ago

dummifiedme commented 2 years ago

Currently, I tried creating flashcards of the format

Word
#flashcard
Meaning

But the meaning it takes is a long form. With a lot of headers. If possible can we have a way to just create a flashcard with the most suitable meaning.

phibr0 commented 2 years ago

How would you determine the most suitable meaning? That would also take manual labor and thus wouldn't be automatic anymore.

dummifiedme commented 2 years ago

How would you determine the most suitable meaning? That would also take manual labor and thus wouldn't be automatic anymore.

Like the google generally provides with a meaning, then further elaborates. To make it fairly automatic we can have additional {{templates}} for short meanings. Currently there is only one {{meaning}} template, which is kind of extensive.

Eg we can have a card with the template

{{word}}
#flashcard
{{short meaning}}
{{synonym}}

Storing the whole dictionary page is anyway unintuitive when we are striving for smaller bit sized notes. :)

phibr0 commented 2 years ago

I understand, what {{meaning}} is depends on the API you are currently using and not on the Plugin itself, e.g. the default german API only provides a single meaning most of the time:

# Test

## Pronunciation

- Tést

## Meanings

### Substantiv, Maskulin

[wissenschaftlicher oder technischer] Versuch zur Feststellung bestimmter Eigenschaften, Leistungen o. Ä.

> ein wissenschaftlicher, klinischer, psychologischer Test
dummifiedme commented 2 years ago

I understand, what {{meaning}} is depends on the API you are currently using and not on the Plugin itself, e.g. the default german API only provides a single meaning most of the time:

# Test

## Pronunciation

- Tést

## Meanings

### Substantiv, Maskulin

[wissenschaftlicher oder technischer] Versuch zur Feststellung bestimmter Eigenschaften, Leistungen o. Ä.

> ein wissenschaftlicher, klinischer, psychologischer Test

Oh, I see. I am using the FreeDictionary as default. I will try others out.

Also, Someone did float a WordNet plugin and its GIF shows one meaning per word only, but that plugin seems to be broken. Makes by Obsidian hang and then force close.

phibr0 commented 2 years ago

Also, Someone did float a WordNet plugin and its GIF shows one meaning per word only, but that plugin seems to be broken. Makes by Obsidian hang and then force close.

Why not create an Issue on its Repo?


I will think about adding a new variable {{meaning}} or something like that which will only insert the first meaning, potentially as one line (I am not 100% sure how the Flashcard Plugins work) so that flashcards can be created more easily. What do you think of that?

kitaev-chen commented 2 years ago

To be compatible with flashcard, one additional suggestion is to be compatible with the symbols used in this plugin too: https://github.com/st3v3nmw/obsidian-spaced-repetition

kitaev-chen commented 2 years ago

cooperate with obsidian-spaced-repetition, it's easy to write a template in obsidian-dictionary settings:

a simple example is:

---
# {{notice}} 
aliases: ["{{word}}"]
---

# {{word}}
#flashcards

## {{pronunciationHeader}}

{{phoneticList}}

## {{meaningHeader}}

{{meanings}}

## {{originHeader}}

{{origin}}

## Flashcard

{{word}}
?
meanings description

what we need is to extract the corresponding answer part (e.g. "meanings description")