Commit df993602 authored by Markus Krug's avatar Markus Krug

Merge branch 'redeWiedergabe_dev' into 'master'

Rede wiedergabe dev

See merge request !81
parents 25d5a4bd b3c532c6
Pipeline #12198 passed with stages
in 18 minutes and 19 seconds
......@@ -47,6 +47,9 @@ public class RwDrawingStrategy implements IAnnotationDrawingStrategy {
private Color gold = new Color (device, 255, 215, 0);
private Color goldenrod = new Color (device, 218, 165, 32);
//ruleFreeIndirect
private Color orangered = new Color (device, 255, 69, 0);
//ambig
private Color peachpuff = new Color (device, 255, 218, 185);
......@@ -99,6 +102,8 @@ public class RwDrawingStrategy implements IAnnotationDrawingStrategy {
if (anno.getFeatureValueAsString(rTypeFeat).equals("direct")
&& anno.getFeatureValueAsString(mediumFeat).equals("speech")) {
gc.setBackground(lightpink);
} else if (anno.getFeatureValueAsString(rTypeFeat).equals("ruleFreeIndirect")){
gc.setBackground(orangered);
} else if (anno.getFeatureValueAsString(rTypeFeat).equals("direct")
&& anno.getFeatureValueAsString(mediumFeat).equals("thought")) {
gc.setBackground(hotpink);
......
......@@ -106,7 +106,8 @@ public class RwFrameTableComposite extends Composite{
createTableViewerColumn("Frame", 45, 1, part::determineFrame);
createTableViewerColumn("Pos", 45, 2, part::determinePos);
createTableViewerColumn("ID", 45, 3, part::determineFrameID);
createTableViewerColumn("Note", 45, 4, part::determineFrameNote);
createTableViewerColumn("Speaker", 45, 4, part::determineFrameSpeaker);
createTableViewerColumn("Note", 45, 5, part::determineFrameNote);
}
private TableViewerColumn createTableViewerColumn(String viewer, int bound, final int colNumber,
......@@ -186,7 +187,7 @@ public class RwFrameTableComposite extends Composite{
List<AnnotationFS> selectedAnnos = getSelectedAnnotationsFromTable();
// add a note
if (e.keyCode == SWT.CR) {
if (e.keyCode == '+') {
part.addFrameNote(selectedAnnos);
}
......
package de.ids.tt.athen.rwview.ui;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
......@@ -110,12 +111,14 @@ public class RwStwrTableComposite extends Composite{
createTableViewerColumn("Medium", 45, 2, part::determineMedium);
createTableViewerColumn("Type", 45, 3, part::determineRType);
createTableViewerColumn("ID", 45, 4, part::determineStwrID);
createTableViewerColumn("Level", 45, 5, part::determineLevel);
createTableViewerColumn("NonFact", 45, 6, part::determineNonFact);
createTableViewerColumn("Prag", 45, 7, part::determinePrag);
createTableViewerColumn("Border", 45, 8, part::determineBorder);
createTableViewerColumn("Metaph", 45, 9, part::determineMetaph);
createTableViewerColumn("Note", 45, 10, part::determineStwrNote);
createTableViewerColumn("Speaker", 45, 5, part::determineStwrSpeaker);
createTableViewerColumn("Level", 45, 6, part::determineLevel);
createTableViewerColumn("NonFact", 45, 7, part::determineNonFact);
createTableViewerColumn("Prag", 45, 8, part::determinePrag);
createTableViewerColumn("Border", 45, 9, part::determineBorder);
createTableViewerColumn("Metaph", 45, 10, part::determineMetaph);
createTableViewerColumn("Note", 45, 11, part::determineStwrNote);
}
private TableViewerColumn createTableViewerColumn(String viewer, int bound, final int colNumber,
......@@ -218,6 +221,11 @@ public class RwStwrTableComposite extends Composite{
// on enter we allow the user to change the name feature
if (e.keyCode == SWT.CR) {
//part.addStwrNote(selectedAnnos);
part.goToAnnotation(getSelectedAnnotationsFromTable());
}
if (e.keyCode == '+'){
part.addStwrNote(selectedAnnos);
}
......@@ -253,6 +261,12 @@ public class RwStwrTableComposite extends Composite{
else if (e.keyCode == 'm') {
part.toggleMetaph(selectedAnnos);
}
else if (e.keyCode == KeyEvent.VK_SPACE){
part.changeToFreeIndirect(selectedAnnos);
}
else if (e.keyCode == KeyEvent.VK_DELETE){
part.deleteAnnotations(getSelectedAnnotationsFromTable());
}
}
private void handleTableDoubleClick (Event e)
......
......@@ -48,7 +48,8 @@ public class RwViewComposite extends Composite {
GridData gd = new GridData(GridData.GRAB_VERTICAL | GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
rwFrameTableComposite.setLayoutData(gd);
}
public void refresh(List<AnnotationFS> frameList, List<AnnotationFS> stwrList){
rwFrameTableComposite.refresh(frameList);
rwStwrTableComposite.refresh(stwrList);
......
......@@ -686,7 +686,7 @@
<typeDescription>
<name>de.idsma.rw.CabToken</name>
<description>CAB tokenizer</description>
<description/>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
......@@ -714,11 +714,11 @@
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>RfPos</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>RfPos</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
......@@ -750,13 +750,13 @@
<description/>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<typeDescription>
<name>de.idsma.rw.preprocessing.Token</name>
<description>openNLPTokenizer</description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<features>
<featureDescription>
<name>Lemma</name>
<description/>
......@@ -769,133 +769,93 @@
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>de.idsma.rw.preprocessing.OpenNLPSentence</name>
<description>OpenNLP sentence detector</description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.idsma.rw.AutoStwr</name>
<description>Stwr annotations created by a rule-based function / machine learning</description>
<typeDescription>
<name>de.idsma.rw.rule.StwWord</name>
<description>A word that indictates a speech, thought or writing event</description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>AutoMedium</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoRType</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoLevel</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoNonFact</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoPrag</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoBorder</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoMetaph</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoStwr</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoStwrID</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>uimarwprojekt.types.STWWord</name>
<description/>
<features>
<featureDescription>
<name>Lemma</name>
<description>Lemma of the STWWord</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Penalty</name>
<description>Penalty value, number between 0 and 5</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Medium</name>
<description>Likely medium of the STWWord</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Marker</name>
<description>Special marker for the STWWord,
at the moment: rep (likely reported) or nil (nothing)</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>de.idsma.rw.rule.RuleDirect</name>
<description>A word that indictates a speech, thought or writing event</description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>Lemma</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Source</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Penalty</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Category</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Marker</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Frequency</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>de.idsma.rw.AutoFrame</name>
<description/>
<typeDescription>
<name>de.idsma.rw.rule.RuleIndirect</name>
<description>A word that indictates a speech, thought or writing event</description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>AutoPos</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoFrame</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>AutoRwType</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
<features>
<featureDescription>
<name>Penalty</name>
<description>Penalty value for this instance</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
<featureDescription>
<name>IndType</name>
<description>Structural type of this instance: zu, conj, conjVerb</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>de.idsma.rw.preprocessing.riedlmaNamedEntity</name>
<description/>
<typeDescription>
<name>de.idsma.rw.rule.RuleFreeIndirect</name>
<description>A word that indictates a speech, thought or writing event</description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>NamedEntityTag</name>
<description/>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
<features>
<featureDescription>
<name>Score</name>
<description>Score for this fi instance</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
</types>
<typeDescription>
<name>de.idsma.rw.rule.RuleFrame</name>
<description/>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>Pos</name>
<description>- start
- mid
- end</description>
<rangeTypeName>uima.cas.String</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
</types>
</typeSystemDescription>
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