equal
deleted
inserted
replaced
52 if(annotation['content']['data']['transl']) { |
52 if(annotation['content']['data']['transl']) { |
53 annot['translation'] = annotation['content']['data']['transl']['@value']; |
53 annot['translation'] = annotation['content']['data']['transl']['@value']; |
54 } |
54 } |
55 if(annotation['content']['data']['words']) { |
55 if(annotation['content']['data']['words']) { |
56 var words = _.map(annotation['content']['data']['words'], function(word) { |
56 var words = _.map(annotation['content']['data']['words'], function(word) { |
|
57 |
|
58 var morphenes = _.map(word['morphenes'] || [], function(morph) { |
|
59 return { |
|
60 original: morph['content']['@value'] || morph['content'], |
|
61 translation: morph['transl']['@value'] || morph['transl'], |
|
62 begin: morph['begin'], |
|
63 end: morph['end'] |
|
64 }; |
|
65 }); |
57 return { |
66 return { |
58 'original': word['content'], |
67 original: word['content']['@value'] || word['content'], |
59 'translation': word['transl']['@value'] |
68 translation: word['transl']['@value'] || word['transl'], |
|
69 begin: word['begin'], |
|
70 end: word['end'], |
|
71 morphenes: morphenes |
60 }; |
72 }; |
61 }); |
73 }); |
62 annot['literal'] = words; |
74 annot['literal'] = words; |
63 } |
75 } |
64 if(annotation['content']['data']['speaker']) { |
76 if(annotation['content']['data']['speaker']) { |