deal with french version of wikipedia #92
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR solves (hopefully) many of the already issues and requests regarding the possibility to adapt the fantastic code by @suyash458 to other language.
The strategy I adopted is close to what @rroessler1 proposed in issue #55[https://github.com//issues/55], that is, a dictionary separated by
language
and having all the keywords in the previously separatedPRONUNCIATIONS
,PART_OF_SPEECH
,ETYMOLOGY
andRELATIONS
. All these fields are constructed in the sub-modulelanguages
in thewikitionaryparser
folder.Note that previously pronunciations and etymology keywords were combined together.
If one wants to adapt to a new language, one just has to add a new key in the
wikitionaryparser.langugages.LANGUAGES
dictionary. I add a french example inspired by @lashoun in the issue #56 and PR (56)[https://github.com//pull/56], under the keyfrançais
. I also add some tests for the french dictionary. There I may have done BS since I'm not well familiar with the mock and parameterized packages.Unfortunately, I developed all that without worrying much about my commits, so commits are few are perhaps too much entangle. I'll do my best in the future to make better job :-)
I hope this PR helps people who wants to work in other languages, and may serve as a basis for future developments.
Feel free to contact me via any other channel for simpler communications (I hate GitHub !),
please follow http://fraschelle.free.fr/ website.