Skip to content

Commit

Permalink
Redukcijas virsotni redukcijas pieturzīmes gadījumā liek tieši aiz pi…
Browse files Browse the repository at this point in the history
…eturzīmes, #28
  • Loading branch information
lauma committed Apr 5, 2019
1 parent e0ccf48 commit 6ba699d
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package lv.ailab.lvtb.universalizer.transformator.syntax;

import lv.ailab.lvtb.universalizer.pml.LvtbRoles;
import lv.ailab.lvtb.universalizer.pml.PmlANode;
import lv.ailab.lvtb.universalizer.pml.utils.PmlANodeListUtils;
import lv.ailab.lvtb.universalizer.transformator.Sentence;
import lv.ailab.lvtb.universalizer.transformator.TransformationParams;
import lv.ailab.lvtb.universalizer.transformator.morpho.XPosLogic;
Expand Down Expand Up @@ -135,7 +137,13 @@ else if (aNode.isPureReductionNode())
// Create ellipsis node for enhanced dependencies, if allowed to do so.
// TODO more precise restriction?
if (redXPostag.matches("v..([^p].*|p[du].*)") || ! params.UD_STANDARD_NULLNODES)
s.createNewEnhEllipsisNode(aNode, newBasicRoot.getId(), params.ADD_NODE_IDS);
{
String newIdStub = newBasicRoot.getId();
List<PmlANode> tokenNodes = aNode.getChildren(LvtbRoles.ELLIPSIS_TOKEN);
if (tokenNodes != null && !tokenNodes.isEmpty())
newIdStub = PmlANodeListUtils.getFirstByDescOrd(tokenNodes).getId();
s.createNewEnhEllipsisNode(aNode, newIdStub, params.ADD_NODE_IDS);
}

}

Expand Down

0 comments on commit 6ba699d

Please sign in to comment.