lib/opener/kaf/document.rb in opener-chained-daemon-3.3.20 vs lib/opener/kaf/document.rb in opener-chained-daemon-3.3.21
- old
+ new
@@ -54,26 +54,26 @@
sent: params.sid,
para: params.para,
offset: params.offset,
length: params.length,
head: params.head,
- xpos: params.xpos
+ xpos: params.xpos.to_s
}
wf.attr attrs
end
def add_term params
text = @document.at('terms') || @document.root.add_child('<terms/>').first
term = text.add_child("<term/>")
attrs = {
tid: "t#{params.tid}",
type: params.type,
- lemma: params.lemma,
+ lemma: params.lemma || params.text,
text: params.text,
pos: params.pos,
morphofeat: params.morphofeat,
head: params.head,
- xpos: params.xpos
+ xpos: params.xpos.to_s
}
term.attr attrs
term.first.add_child("<span><target id='w#{params.wid}'/></span>")
end