Mon 14 Sep 2015 12:43:31 PM UTC, comment #3:
maybe something simpler (also to manage from your side, like
{ "lines": [ "counter for occurrences", "counter for games, rounds, etc., counter for innings (baseball)", "(See 回教) Islam", "(See 回族) Hui (people)" ] }
So that you simply have to cope with a "lines" array of strings... and a .each in Ruby is simpler than everything else. :)
What do you think?
|
Mon 14 Sep 2015 12:42:47 PM UTC, comment #2:
I think your sugguestion of "simple-translation", and the way it should
look is great. I would recommend removing the "(1)" counters as well, if
possible.
For those array types of translations, I would love to see something like
this:
{
"word": "回"
translations: [
{
"meaning": "counter for occurrences"
},
{
"meaning": "counter for games, rounds, etc., counter for innings
(baseball)"
},
{
"meaning": "(See 回教) Islam"
},
{
"meaning": "(See 回族) Hui (people)"
},
]
|
Mon 14 Sep 2015 12:42:18 PM UTC, comment #1:
I understood your point but I think we have to find a way to simplify the results so that they are ok for you. I mean: considering the simple "astronaut" translation (or even "tokyo" and so on), it's not difficult.
What if I got back something like the translation of 回? I have many meanings and content:
(ctr) (1) counter for occurrences, (2) counter for games, rounds, etc., counter for innings (baseball), (n,n-pref) (3) (See 回教) Islam, (n) (4) (abbr) (See 回族) Hui (people), (P)
How can I manage them? What do you expect? I suppose most of the translations have something like "(type) (1) ..., (P)" (whatever (P) means) so I could strip from the first ") " to the ", (P)" so that we can keep everything in the middle. For 回, then, you'll see something like
(1) counter for occurrences, (2) counter for games, rounds, etc., counter for innings (baseball), (n,n-pref) (3) (See 回教) Islam, (n) (4) (abbr) (See 回族) Hui (people)
Is it ok?
Also, considering current wwwjdic gem structure, I'd add an additional field, something like { "simple-translation" : "..." } to keep backward compatibility and offer both full and simple translation to users.
|