Hi everyone,

I'm using Mnemosyne to study Arabic and I love the simple interface. So no 
distraction while studying :).

Our professor provided us with several plugins to remove and add crêrtain 
information from the cards.

One of the plugins removes the vocalization from all the arabic words, so we 
can improve our word recognition skills.

Anyhow there is one problem with this plugin and that is that it removes the 
vocalization from every word for the entire study session and there is no way 
of checking if you remember all the kasras and fathas (vocalization) when 
checking the translation (by pressing the "Show answer"-Button).

So long story short I'm wondering if there is a way to reverse the filter that 
removes the vocalization everytime I press the "show answer"-button and adds 
the filter again for the next word and so on...

Thanks in advance.

Kind regards,

Jonas

Below the filter plugin code:


from mnemosyne.libmnemosyne.filter import Filter
from mnemosyne.libmnemosyne.plugin import Plugin
import re

class Vokalisierung_entfernen(Filter):
    def run(self, text, card, fact_key, **render_args):
        text = 
re.sub(ur'\u064B|\u064C|\u064D|\u064E|\u064F|\u0650|\u0652|\u0670', r'', text) 
# Entfernt Vokale, vergleiche http://www.alanwood.net/unicode/arabic.html
        return text
class Vokalisierung_entfernenPlugin(Plugin):

    name = "Vokalisierung entfernen"
    description = "Entfernt Vokalisierung ausser Schadda"
    components = [Vokalisierung_entfernen]

    def activate(self):
        Plugin.activate(self)
        self.render_chain("default").\
            register_filter(Vokalisierung_entfernen, in_front=False)

    def deactivate(self):
        Plugin.deactivate(self)
        self.render_chain("default").\
            unregister_filter(Vokalisierung_entfernen)

from mnemosyne.libmnemosyne.plugin import register_user_plugin
register_user_plugin(Vokalisierung_entfernenPlugin)

-- 
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mnemosyne-proj-users/15db90df-cac6-4d11-b97c-e8326eb4f4cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to