Hi, I'm afraid that at the moment the code does not support this. However, at some point in the future I plan to add more language-specific features to Mnemosyne and this could be a good candidate for this (I'm studying Arabic myself :-) )
Cheers, Peter -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: 13 February 2017 20:19 To: mnemosyne-proj-users <[email protected]> Subject: [mnemosyne-proj-users] execute filter to remove arabic vocalization on "Show answer" 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. -- 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/21983f66b494453c8bb672e2c069e31a%40xmail102.UGent.be. For more options, visit https://groups.google.com/d/optout.
