Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definitions always display all languages. #795

Closed
edelkind opened this Issue Sep 19, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@edelkind
Copy link

edelkind commented Sep 19, 2017

This did not happen on my device (Nexus 5x) previously.

Note: i recently factory-reset my device. I initially restored the aedict3 app data via adb restore.

To address the issue, i tried the following:

  • cleared app cache and data
  • uninstalled app
  • moved old /sdcard/aedict3 directory to /sdcard/aedict3.not
  • reinstalled app

JMDICT, Tatoeba, and SOD were automatically re-downloaded when the app restarted. I ensured that English was selected for both "Language" and "Sample Sentences Dictionary Language" in the settings.

The following is a screenshot of the partway-scrolled-down entry for 表示.

screenshot_20170919-103831

Conjecture: is it possible that the language settings no longer get set correctly, but if they are already configured, they continue to function?

@mvysny mvysny self-assigned this Sep 19, 2017

@mvysny mvysny added the bug label Sep 19, 2017

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Sep 19, 2017

Thanks for letting me know. I'll look into this, I have reproduced it on my phone.

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Sep 20, 2017

I'm at loss as to what happened - the data files haven't changed structurally, also that particular UI code hasn't been touched. Reproducible for lots of words, for example 下さる as well. I need to investigate asap.

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Sep 20, 2017

Aha! The entry structure has been changed in JMdict. For example, the kudasaru entry:

<entry>
<ent_seq>1184280</ent_seq>
<k_ele>
<keb>下さる</keb>
<ke_pri>ichi1</ke_pri>
<ke_pri>news1</ke_pri>
<ke_pri>nf18</ke_pri>
</k_ele>
<r_ele>
<reb>くださる</reb>
<re_pri>ichi1</re_pri>
<re_pri>news1</re_pri>
<re_pri>nf18</re_pri>
</r_ele>
<sense>
<pos>&v5aru;</pos>
<misc>&hon;</misc>
<misc>&uk;</misc>
<gloss>to give</gloss>
<gloss>to confer</gloss>
<gloss>to bestow</gloss>
</sense>
<sense>
<misc>&hon;</misc>
<misc>&uk;</misc>
<gloss>to kindly do for one</gloss>
<gloss>to oblige</gloss>
<gloss>to favour</gloss>
<gloss>to favor</gloss>
</sense>
<sense>
<gloss xml:lang="dut">geven</gloss>
<gloss xml:lang="dut">schenken</gloss>
</sense>
<sense>
<gloss xml:lang="dut">eten</gloss>
<gloss xml:lang="dut">drinken</gloss>
</sense>
<sense>
<gloss xml:lang="dut">zo goed zijn te ~</gloss>
<gloss xml:lang="dut">zo vriendelijk zijn te ~</gloss>
<gloss xml:lang="dut">de welwillendheid hebben om ~</gloss>
</sense>
<sense>
<gloss xml:lang="fre">donner</gloss>
<gloss xml:lang="fre">conférer</gloss>
<gloss xml:lang="fre">accorder</gloss>
</sense>
<sense>
<gloss xml:lang="fre">daigner faire</gloss>
<gloss xml:lang="fre">avoir la bonté de</gloss>
</sense>
<sense>
<gloss xml:lang="ger">geben</gloss>
<gloss xml:lang="ger">schenken</gloss>
<gloss xml:lang="ger">spenden</gloss>
<gloss xml:lang="ger">gewähren</gloss>
<gloss xml:lang="ger">verleihen</gloss>
</sense>
<sense>
<gloss xml:lang="ger">etw. für jmdn. tun</gloss>
<gloss xml:lang="ger">so freundlich sein, … zu tun</gloss>
</sense>
<sense>
<gloss xml:lang="hun">ajándékoz</gloss>
<gloss xml:lang="hun">értésére ad</gloss>
<gloss xml:lang="hun">közöl</gloss>
<gloss xml:lang="hun">nyúlik</gloss>
<gloss xml:lang="hun">odaad</gloss>
<gloss xml:lang="hun">szolgál</gloss>
<gloss xml:lang="hun">átruház</gloss>
</sense>
<sense>
<gloss xml:lang="ita">dare</gloss>
<gloss xml:lang="ita">regalare</gloss>
<gloss xml:lang="ita">elargire</gloss>
<gloss xml:lang="ita">conferire</gloss>
<gloss xml:lang="ita">concedere</gloss>
</sense>
<sense>
<gloss xml:lang="rus">1) (вежливо о 2-м и 3-м лице) давать; дарить</gloss>
<gloss xml:lang="rus">2) (после деепр. указывает на действие 2-го или 3-го лица, совершаемое по отношению к 1-му или 3-го по отношению ко 2-му, или высшего к низшему:)</gloss>
<gloss xml:lang="rus">3) (в форме) ください (после деепр. образует вежливую форму повел. наклонения:)</gloss>
</sense>
<sense>
<gloss xml:lang="slv">dati {meni}</gloss>
</sense>
<sense>
<gloss xml:lang="spa">dar</gloss>
<gloss xml:lang="spa">conferir</gloss>
<gloss xml:lang="spa">hacer el favor</gloss>
<gloss xml:lang="spa">tener la amabilidad de</gloss>
</sense>
</entry>

Previously, there was just one <sense> element housing all glosses of similar meaning. Now, however it seems that there is a <sense> element for every language. I haven't anticipated this kind of structure, and I believe it violates the contract of the sense element as stated in the JMdict:

<!ELEMENT sense (stagk*, stagr*, pos*, xref*, ant*, field*, misc*, s_inf*, lsource*, dial*, gloss*)>
	<!-- The sense element will record the translational equivalent
	of the Japanese word, plus other related information. Where there
	are several distinctly different meanings of the word, multiple
	sense elements will be employed.
	-->

Quoting:

Where there are several distinctly different meanings of the word, multiple sense elements will be employed.

However, this is not true: apparently ger geben is the same as eng to give yet they are in different
sense elements. I need to ask Jim about this.

Currently Aedict expects that every sense element houses an important distinctive meaning of the word and thus tries very hard to display it. If the english (or otherwise configured) meaning is missing, then it tries to display the meaning in any other language, so that the meaning is displayed and is not lost. However, with the new structure Aedict is confused and basically prints out all meanings.

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Sep 20, 2017

Ok, so this JMdict change is intentional, quoting:

The non-English glosses are added as separate sets of senses, and as far as possible are broken into individual senses using tags within those files (typically (1) .... (2) ....., etc.) At present there is no attempt to align senses between the languages as there is no consistency between the dictionaries as to the sense splitting.

http://www.edrdg.org/wiki/index.php/JMdict-EDICT_Dictionary_Project#OTHER_LANGUAGES

@mvysny

This comment has been minimized.

Copy link
Owner

mvysny commented Sep 20, 2017

Fixed in Aedict 3.43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.