gate.annotation
Class AnnotationDiff
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--gate.creole.AbstractVisualResource
|
+--gate.annotation.AnnotationDiff
- All Implemented Interfaces:
- Accessible, FeatureBearer, ImageObserver, MenuContainer, Resource, Serializable, VisualResource
- public class AnnotationDiff
- extends AbstractVisualResource
This class compare two annotation sets on annotation type given by the
AnnotationSchema object. It also deals with graphic representation of the
result.
- See Also:
- Serialized Form
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
weight
public static double weight
MAX_TYPES
public final int MAX_TYPES
- Fields used to describe the type of annotations
NULL_TYPE
public final int NULL_TYPE
DEFAULT_TYPE
public final int DEFAULT_TYPE
CORRECT_TYPE
public final int CORRECT_TYPE
PARTIALLY_CORRECT_TYPE
public final int PARTIALLY_CORRECT_TYPE
SPURIOUS_TYPE
public final int SPURIOUS_TYPE
MISSING_TYPE
public final int MISSING_TYPE
AnnotationDiff
public AnnotationDiff()
- Constructs a AnnotationDif
setAnnotationTypeForFalsePositive
public void setAnnotationTypeForFalsePositive(String anAnnotType)
- Sets the annotation type needed to calculate the falsePossitive measure
- Parameters:
anAnnotType
- is the annotation type needed to calculate a special
mesure called falsePossitive. Usualy the value is "token", but it can be
any other string with the same semantic.
getAnnotationTypeForFalsePositive
public String getAnnotationTypeForFalsePositive()
- Gets the annotation type needed to calculate the falsePossitive measure
- Returns:
- annotation type needed to calculate a special
mesure called falsePossitive.
setKeyDocument
public void setKeyDocument(Document aKeyDocument)
- Sets the keyDocument in AnnotDiff
- Parameters:
aKeyDocument
- The GATE document used as a key in annotation diff.
getKeyDocument
public Document getKeyDocument()
- Returns:
- the keyDocument used in AnnotDiff process
getPrecisionStrict
public double getPrecisionStrict()
- Returns:
- the precisionStrict field
getPrecisionLenient
public double getPrecisionLenient()
- Returns:
- the precisionLenient field
getPrecisionAverage
public double getPrecisionAverage()
- Returns:
- the precisionAverage field
getFMeasureStrict
public double getFMeasureStrict()
- Returns:
- the fMeasureStrict field
getFMeasureLenient
public double getFMeasureLenient()
- Returns:
- the fMeasureLenient field
getFMeasureAverage
public double getFMeasureAverage()
- Returns:
- the fMeasureAverage field
getRecallStrict
public double getRecallStrict()
- Returns:
- the recallStrict field
getRecallLenient
public double getRecallLenient()
- Returns:
- the recallLenient field
getRecallAverage
public double getRecallAverage()
- Returns:
- the recallAverage field
getFalsePositiveStrict
public double getFalsePositiveStrict()
- Returns:
- the falsePositiveStrict field
getFalsePositiveLenient
public double getFalsePositiveLenient()
- Returns:
- the falsePositiveLenient field
getFalsePositiveAverage
public double getFalsePositiveAverage()
- Returns:
- the falsePositiveAverage field
setResponseDocument
public void setResponseDocument(Document aResponseDocument)
- Parameters:
aResponseDocument
- the GATE response Document
containing the annotation Set being compared against the annotation from
the keyDocument.
setAnnotationSchema
public void setAnnotationSchema(AnnotationSchema anAnnotationSchema)
- Parameters:
anAnnotationSchema
- the annotation type being compared.
This type is found in annotationSchema object as field
AnnotationSchema.getAnnotationName()
. If is null
then AnnotDiff will throw an exception when it comes to do the diff.
getAnnotationSchema
public AnnotationSchema getAnnotationSchema()
- Returns:
- the annotation schema object used in annotation diff process
init
public Resource init()
throws ResourceInstantiationException
- This method does the diff, Precision,Recall,FalsePositive
calculation and so on.
- Overrides:
init
in class AbstractVisualResource