rdoeffinger / Dictionary

"QuickDic" offline Dictionary App for Android. Provided downloadable dictionaries are based on Wiktionaries but can also be created from other sources (see DictionaryPC). Remember to use --recursive when cloning! Fork of project that used to be hosted at code.google.com/p/quickdic-dictionary.
Apache License 2.0
325 stars 69 forks source link

Improvement: replace {{...}} #29

Open homersimpsons opened 8 years ago

homersimpsons commented 8 years ago

Let's replace the {{...}} to make a better dictionary, and easier reading

For example:

Ressources:

rdoeffinger commented 8 years ago

Yes, the fact that there are so many, and that they are different in each regional wiktionary and that they should be replaced depending on dictionary language makes this very problematic. Unfortunately it does not seem possible (easily/efficiently) to just use the engine that wiktionary uses, which seems the only "proper" solution to this. For those reasons personally I am not planning any work on this so far, though if someone has a particularly nice idea to solve this or wants to work on it that's of course welcome.

astoff commented 8 years ago

Are you aware of these scripts to dump Wiktionary into ding format?

Jibec commented 7 years ago

We probably should make lists of template replacement.

Somme examples:

I'll be glad help for french language.

Example "S" template, used in titles : {{S|(.)(|.)+}}

This website is great to make easy tests: https://regex101.com/#python

some automatic test would be great to make sure we can maintain it some automatic template detection (count results per language) would be great to know where to focus.

rdoeffinger commented 7 years ago

Now that I see it written, I also have a concern that the replacement must be done in a way that it's clear it's not actually part of the translation or so itself, since the user might not know some of those words in the language they are translating to. Unless you mean {S|étymologie} would be replaced by the matching word in whatever the user's system language is, which would be a lot more effort though.

Jibec commented 7 years ago

Some templates are only for cosmetics, some are for "inclusion" (to include content from a template or sub-page), some are internal links, some are external links. I did not mean to translate anything, "just" to create regex search and replace of text to make it clean when displayed to user.

Here is an article with an extensive usage of templates (63!): https://fr.wiktionary.org/wiki/encyclop%C3%A9die?action=edit&veswitched=1

But when talking about internal (inside wiktionary in same or different language) links, you may want to create an articulation with currently installed dictionaries in user's smartphone, but I have no ideas how to handle this.

happysmash27 commented 5 years ago

It would be nice if this could at least include conjugations, which is one of the main things I use Wiktionary for.

woj-tek commented 1 year ago

Are you aware of these scripts to dump Wiktionary into ding format?

Sorry for necro-responding but (1) QuickDic was recently updated on F-droid and (2) the wikionary formatting is somewhat annoying so while looking for a way to make it better I stumbled against this issue and above comment and it looks quite awesome. While having full-blown dictionary with translation is great, having readable simple dictionary.

DougInAMug commented 1 year ago

Big table of wiki markup parsers: https://www.mediawiki.org/wiki/Alternative_parsers