Thu 16 Jul 2015 12:21:45 PM UTC, comment #2:
Using this result http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1ZDEglasses as sample reference example, I'd add a "translations" array having these fields:
"translations": [
{
"word": "アイケアグラス;アイケア・グラス",
"reading": "",
"tags": [ "n" ],
"translation": ["safety glasses (esp. more fashionable models used in public for protection against pollen, UV rays, etc.) (wasei: eye-care glass)"]
},
{
"word": "杯盤狼藉",
"reading": "はいばんろうぜき",
"tags": [ "adj-t,adv-to", "arch", "yoji" ]
"translation": [ "glasses and plates being scattered about after a party or banquet", "articles lying about in a jumble" ]
},
{
"word": "杯盤",
"reading": "はいばん",
"tags": [ "n" ]
"translation": ["glasses and plates"]
}
]
and so on... there are interesting and different possibilities and issues that may raise from the parsing. Consider the line below:
蔓 [つる] /(n) (1) (uk) vine/bine/tendril/runner/(2) bow/temple arm/sidepiece/lug arm/earpiece/part of a pair of glasses that goes over the ear/(3) connections/contacts/influence/financial supporter/
If I split on "/", the (1) definition will be split in four different translations while it's actually the same...
取る [とる] /(v5r,vt) (1) to take/to pick up/to harvest/to earn/to win/to choose/(2) (See 盗る) to steal/(3) (See 摂る) to eat/to have (a meal)/(4) (also written as 脱る) to remove (one's glasses, etc.)/(5) to compete (in sumo, cards, etc.)/to play/(P)/
For this, I have to consider "tags" for each part (1)...(5) of the translation since the "See" would be considered like an information tag.
メガネっ娘;眼鏡っ娘;メガネっ子;眼鏡っ子;めがねっ娘;眼鏡娘 [めがねっこ(眼鏡っ娘,眼鏡っ子,めがねっ娘,眼鏡娘);メガネっこ(メガネっ娘,メガネっ子)] /(n) (m-sl) girl (usu. attractive) with glasses/glasses-wearing girl/
What about multiple translations or even multiple readings spread in the translation? How should I care about ";" separators? Some readings are also in [] other in () ...
凹眼鏡 [おうがんきょう] /(n) concave glasses/
This is easy... eh eh eh. ;)
老眼鏡 [ろうがんきょう] /(n) reading (farsighted) glasses/spectacles for the aged/
Gosh, here the (farsighted) comment would be considered like a tag? It depends...
ALSO TO BE CONFIRMED: actual output and example from Japanese to another language!
What about a first rough step in which I cut the lines in a "translations" array?
|