Commit bdfa81e3 authored by Nicolas Sannier's avatar Nicolas Sannier
Browse files

Pushing ARMLET for legislative text conversion

parent 8cbef046
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Phase: MarkPreambleSegment
Input: Preamble_start Article_Head Part_Head
Options: control = once
Rule: DoMarkPreambleSegment
(
({Preamble_start}):start
({Part_Head} | {Article_Head}):end
)
-->
{
Node start = ((AnnotationSet) bindings.get("start")).firstNode();
Node end = ((AnnotationSet) bindings.get("end")).firstNode();
String preamble = doc.getContent().toString().substring(start.getOffset().intValue(), end.getOffset().intValue());
//create the new token
FeatureMap features = Factory.newFeatureMap();
features.put("string", preamble);
outputAS.add(start, end, "Preamble_Segment", features);
}
//Clean the Alinea_Head annotations inside Preamble_Segment
Phase: MarkCleanAlineaAnnotationsInsidePreamble
Input: Alinea_Head Preamble_Segment
Options: control = appelt
Rule: DoMarkCleanAlineaInsidePreamble
(
{Alinea_Head within Preamble_Segment}
):reference
-->
{
AnnotationSet toRemove = (gate.AnnotationSet) bindings.get("reference");
outputAS.removeAll(toRemove);
inputAS.removeAll(toRemove);
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment