GATE
Version 3.1-2270

gate.annotation
Class AnnotationDiff

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by gate.creole.AbstractVisualResource
                      extended by gate.annotation.AnnotationDiff
All Implemented Interfaces:
Resource, FeatureBearer, NameBearer, VisualResource, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

Deprecated. This functionality is provided by the AnnotationDiffer class as of GATE version 3.0.

public class AnnotationDiff
extends AbstractVisualResource
implements Scrollable

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

Nested Class Summary
 class AnnotationDiff.AnnotationDiffCellRenderer
          Deprecated. This class defines a Cell renderer for the AnnotationDiff table
protected  class AnnotationDiff.AnnotationDiffTableModel
          Deprecated. A custom table model used to render a table containing the two annotation sets.
protected  class AnnotationDiff.DiffSetElement
          Deprecated. This class is used for internal purposes.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int CORRECT_TYPE
          Deprecated. A correct type when all annotation are corect represented by Green color
static int DEFAULT_TYPE
          Deprecated. A default type when all annotation are the same represented by White color
protected static NumberFormat formatter
          Deprecated. A number formater for displaying precision and recall
static int MAX_TYPES
          Deprecated. Field designated to represent the max nr of annot types and coolors for each type
protected  int maxUnitIncrement
          Deprecated.  
static int MISSING_TYPE
          Deprecated. A missing type when annotations in key were not present in response Represented by Yellow color
static int PARTIALLY_CORRECT_TYPE
          Deprecated. A partially correct type when all annotation are corect represented by Blue color
static int SPURIOUS_TYPE
          Deprecated. A spurious type when annotations in response were not present in key.
static double weight
          Deprecated. The weight used in F-measure (see NLP Information Extraction)
 
Fields inherited from class gate.creole.AbstractVisualResource
features, handle
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AnnotationDiff()
          Deprecated. Constructs a AnnotationDif
 
Method Summary
protected  void arangeAllComponents()
          Deprecated. This method creates the graphic components and aranges them on this JPanel
 AnnotationSchema getAnnotationSchema()
          Deprecated.  
 Set getAnnotationsOfType(int annotType)
          Deprecated. Returns a set with all annotations of a specific type
 String getAnnotationTypeForFalsePositive()
          Deprecated. Gets the annotation type needed to calculate the falsePossitive measure
 long getCorrectCount()
          Deprecated.  
 double getFalsePositiveAverage()
          Deprecated.  
 double getFalsePositiveLenient()
          Deprecated.  
 double getFalsePositiveStrict()
          Deprecated.  
 double getFMeasureAverage()
          Deprecated.  
 double getFMeasureLenient()
          Deprecated.  
 double getFMeasureStrict()
          Deprecated.  
 String getKeyAnnotationSetName()
          Deprecated. Gets the keyAnnotationSetName.
 Document getKeyDocument()
          Deprecated.  
 Set getKeyFeatureNamesSet()
          Deprecated. Gets the keyFeatureNamesSet in AnnotDiff.
 long getMissingCount()
          Deprecated.  
 long getPartiallyCorrectCount()
          Deprecated.  
 double getPrecisionAverage()
          Deprecated.  
 double getPrecisionLenient()
          Deprecated.  
 double getPrecisionStrict()
          Deprecated.  
 Dimension getPreferredScrollableViewportSize()
          Deprecated.  
 double getRecallAverage()
          Deprecated.  
 double getRecallLenient()
          Deprecated.  
 double getRecallStrict()
          Deprecated.  
 String getResponseAnnotationSetName()
          Deprecated. gets the responseAnnotationSetName.
 String getResponseAnnotationSetNameFalsePoz()
          Deprecated. gets the responseAnnotationSetNameFalsePoz.
 int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          Deprecated.  
 boolean getScrollableTracksViewportHeight()
          Deprecated.  
 boolean getScrollableTracksViewportWidth()
          Deprecated.  
 int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          Deprecated.  
 long getSpuriousCount()
          Deprecated.  
 Resource init()
          Deprecated. This method does the diff, Precision,Recall,FalsePositive calculation and so on.
 boolean isTextMode()
          Deprecated. Gets the annot diff textmode.True means that the text mode is activated.
protected  void printStructure(Set aDiffSet)
          Deprecated. Used internally for debugging
 void setAnnotationSchema(AnnotationSchema anAnnotationSchema)
          Deprecated.  
 void setAnnotationTypeForFalsePositive(String anAnnotType)
          Deprecated. Sets the annotation type needed to calculate the falsePossitive measure
 void setKeyAnnotationSetName(String aKeyAnnotationSetName)
          Deprecated. Sets the keyAnnotationSetName in AnnotDiff
 void setKeyDocument(Document aKeyDocument)
          Deprecated. Sets the keyDocument in AnnotDiff
 void setKeyFeatureNamesSet(Set aKeyFeatureNamesSet)
          Deprecated. Sets the keyFeatureNamesSet in AnnotDiff.
 void setResponseAnnotationSetName(String aResponseAnnotationSetName)
          Deprecated. Sets the responseAnnotationSetName in AnnotDiff
 void setResponseAnnotationSetNameFalsePoz(String aResponseAnnotationSetNameFalsePoz)
          Deprecated. Sets the responseAnnotationSetNameFalsePoz in AnnotDiff
 void setResponseDocument(Document aResponseDocument)
          Deprecated.  
 void setTextMode(Boolean aTextMode)
          Deprecated. Sets the annot diff to work in the text mode.This would not initiate the GUI part of annot diff but it would calculate precision etc
 
Methods inherited from class gate.creole.AbstractVisualResource
cleanup, getFeatures, getParameterValue, setFeatures, setHandle, setParameterValue, setParameterValues, setTarget
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Field Detail

maxUnitIncrement

protected int maxUnitIncrement
Deprecated. 

weight

public static double weight
Deprecated. 
The weight used in F-measure (see NLP Information Extraction)


formatter

protected static NumberFormat formatter
Deprecated. 
A number formater for displaying precision and recall


MAX_TYPES

public static final int MAX_TYPES
Deprecated. 
Field designated to represent the max nr of annot types and coolors for each type

See Also:
Constant Field Values

DEFAULT_TYPE

public static final int DEFAULT_TYPE
Deprecated. 
A default type when all annotation are the same represented by White color

See Also:
Constant Field Values

CORRECT_TYPE

public static final int CORRECT_TYPE
Deprecated. 
A correct type when all annotation are corect represented by Green color

See Also:
Constant Field Values

PARTIALLY_CORRECT_TYPE

public static final int PARTIALLY_CORRECT_TYPE
Deprecated. 
A partially correct type when all annotation are corect represented by Blue color

See Also:
Constant Field Values

SPURIOUS_TYPE

public static final int SPURIOUS_TYPE
Deprecated. 
A spurious type when annotations in response were not present in key. Represented by Red color

See Also:
Constant Field Values

MISSING_TYPE

public static final int MISSING_TYPE
Deprecated. 
A missing type when annotations in key were not present in response Represented by Yellow color

See Also:
Constant Field Values
Constructor Detail

AnnotationDiff

public AnnotationDiff()
Deprecated. 
Constructs a AnnotationDif

Method Detail

setAnnotationTypeForFalsePositive

public void setAnnotationTypeForFalsePositive(String anAnnotType)
Deprecated. 
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()
Deprecated. 
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)
Deprecated. 
Sets the keyDocument in AnnotDiff

Parameters:
aKeyDocument - The GATE document used as a key in annotation diff.

getKeyDocument

public Document getKeyDocument()
Deprecated. 
Returns:
the keyDocument used in AnnotDiff process

setKeyAnnotationSetName

public void setKeyAnnotationSetName(String aKeyAnnotationSetName)
Deprecated. 
Sets the keyAnnotationSetName in AnnotDiff

Parameters:
aKeyAnnotationSetName - The name of the annotation set from the keyDocument.If aKeyAnnotationSetName is null then the default annotation set will be used.

getKeyAnnotationSetName

public String getKeyAnnotationSetName()
Deprecated. 
Gets the keyAnnotationSetName.

Returns:
The name of the keyAnnotationSet used in AnnotationDiff. If returns null then the the default annotation set will be used.

setKeyFeatureNamesSet

public void setKeyFeatureNamesSet(Set aKeyFeatureNamesSet)
Deprecated. 
Sets the keyFeatureNamesSet in AnnotDiff.

Parameters:
aKeyFeatureNamesSet - a set containing the feature names from key that will be used in isPartiallyCompatible()

getKeyFeatureNamesSet

public Set getKeyFeatureNamesSet()
Deprecated. 
Gets the keyFeatureNamesSet in AnnotDiff.

Returns:
A set containing the feature names from key that will be used in isPartiallyCompatible()

setResponseAnnotationSetName

public void setResponseAnnotationSetName(String aResponseAnnotationSetName)
Deprecated. 
Sets the responseAnnotationSetName in AnnotDiff

Parameters:
aResponseAnnotationSetName - The name of the annotation set from the responseDocument.If aResponseAnnotationSetName is null then the default annotation set will be used.

getResponseAnnotationSetName

public String getResponseAnnotationSetName()
Deprecated. 
gets the responseAnnotationSetName.

Returns:
The name of the responseAnnotationSet used in AnnotationDiff. If returns null then the the default annotation set will be used.

setResponseAnnotationSetNameFalsePoz

public void setResponseAnnotationSetNameFalsePoz(String aResponseAnnotationSetNameFalsePoz)
Deprecated. 
Sets the responseAnnotationSetNameFalsePoz in AnnotDiff

Parameters:
aResponseAnnotationSetNameFalsePoz - The name of the annotation set from the responseDocument.If aResponseAnnotationSetName is null then the default annotation set will be used.

getResponseAnnotationSetNameFalsePoz

public String getResponseAnnotationSetNameFalsePoz()
Deprecated. 
gets the responseAnnotationSetNameFalsePoz.

Returns:
The name of the responseAnnotationSetFalsePoz used in AnnotationDiff. If returns null then the the default annotation set will be used.

setTextMode

public void setTextMode(Boolean aTextMode)
Deprecated. 
Sets the annot diff to work in the text mode.This would not initiate the GUI part of annot diff but it would calculate precision etc


isTextMode

public boolean isTextMode()
Deprecated. 
Gets the annot diff textmode.True means that the text mode is activated.


getAnnotationsOfType

public Set getAnnotationsOfType(int annotType)
Deprecated. 
Returns a set with all annotations of a specific type


getPrecisionStrict

public double getPrecisionStrict()
Deprecated. 
Returns:
the precisionStrict field

getPrecisionLenient

public double getPrecisionLenient()
Deprecated. 
Returns:
the precisionLenient field

getPrecisionAverage

public double getPrecisionAverage()
Deprecated. 
Returns:
the precisionAverage field

getFMeasureStrict

public double getFMeasureStrict()
Deprecated. 
Returns:
the fMeasureStrict field

getFMeasureLenient

public double getFMeasureLenient()
Deprecated. 
Returns:
the fMeasureLenient field

getFMeasureAverage

public double getFMeasureAverage()
Deprecated. 
Returns:
the fMeasureAverage field

getRecallStrict

public double getRecallStrict()
Deprecated. 
Returns:
the recallStrict field

getRecallLenient

public double getRecallLenient()
Deprecated. 
Returns:
the recallLenient field

getRecallAverage

public double getRecallAverage()
Deprecated. 
Returns:
the recallAverage field

getCorrectCount

public long getCorrectCount()
Deprecated. 

getPartiallyCorrectCount

public long getPartiallyCorrectCount()
Deprecated. 

getSpuriousCount

public long getSpuriousCount()
Deprecated. 

getMissingCount

public long getMissingCount()
Deprecated. 

getFalsePositiveStrict

public double getFalsePositiveStrict()
Deprecated. 
Returns:
the falsePositiveStrict field

getFalsePositiveLenient

public double getFalsePositiveLenient()
Deprecated. 
Returns:
the falsePositiveLenient field

getFalsePositiveAverage

public double getFalsePositiveAverage()
Deprecated. 
Returns:
the falsePositiveAverage field

setResponseDocument

public void setResponseDocument(Document aResponseDocument)
Deprecated. 
Parameters:
aResponseDocument - the GATE response Document containing the annotation Set being compared against the annotation from the keyDocument.

setAnnotationSchema

public void setAnnotationSchema(AnnotationSchema anAnnotationSchema)
Deprecated. 
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()
Deprecated. 
Returns:
the annotation schema object used in annotation diff process

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Deprecated. 
Specified by:
getPreferredScrollableViewportSize in interface Scrollable

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Deprecated. 
Specified by:
getScrollableUnitIncrement in interface Scrollable

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Deprecated. 
Specified by:
getScrollableBlockIncrement in interface Scrollable

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Deprecated. 
Specified by:
getScrollableTracksViewportWidth in interface Scrollable

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Deprecated. 
Specified by:
getScrollableTracksViewportHeight in interface Scrollable

init

public Resource init()
              throws ResourceInstantiationException
Deprecated. 
This method does the diff, Precision,Recall,FalsePositive calculation and so on.

Specified by:
init in interface Resource
Overrides:
init in class AbstractVisualResource
Throws:
ResourceInstantiationException

arangeAllComponents

protected void arangeAllComponents()
Deprecated. 
This method creates the graphic components and aranges them on this JPanel


printStructure

protected void printStructure(Set aDiffSet)
Deprecated. 
Used internally for debugging


GATE
Version 3.1-2270