public class CoreferenceDocument
extends de.ims.icarus.ui.text.BatchDocument
Modifier and Type | Class and Description |
---|---|
protected static class |
CoreferenceDocument.ClusterAttributes |
static class |
CoreferenceDocument.DisplayMode |
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
Modifier and Type | Field and Description |
---|---|
protected java.util.Stack<CoreferenceDocument.ClusterAttributes> |
attributeStack |
protected java.lang.StringBuilder |
builder |
static javax.swing.text.MutableAttributeSet |
CONTENT |
protected static CoreferenceDocument.ClusterAttributes |
emptyAttributes |
static javax.swing.text.MutableAttributeSet |
HEADER |
static int |
HIGHLIGHT_TYPE_BEGIN |
static int |
HIGHLIGHT_TYPE_END |
protected java.util.Stack<java.awt.Color> |
highlightStack |
static java.lang.String |
PARAM_ERROR_TYPE |
static java.lang.String |
PARAM_FILL_COLOR |
static java.lang.String |
PARAM_HIGHLIGHT_COLOR |
static java.lang.String |
PARAM_HIGHLIGHT_TYPE |
static java.lang.String |
PARAM_SPAN |
static java.lang.String |
PARAM_UNDERLINE_COLOR |
protected SpanBuffer |
spanBuffer |
protected java.util.Stack<Span> |
spanStack |
static javax.swing.text.MutableAttributeSet |
SUBSCRIPT |
static javax.swing.text.MutableAttributeSet |
SUPERSCRIPT |
Constructor and Description |
---|
CoreferenceDocument() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
protected void |
appendBatchCoreferenceData(CoreferenceData data,
int sentenceIndex,
CorefComparison comparison)
TODO bug: no space between last and next to last token in span when nested span is filtered out!
FIXME: current implementation lost the ability to force highlighted singletons visible.
|
void |
appendBatchDocumentData(DocumentData data,
CoreferenceAllocation allocation,
CoreferenceAllocation goldAllocation) |
void |
appendBatchDocumentData(DocumentData data,
CoreferenceAllocation allocation,
CoreferenceAllocation goldAllocation,
int index0,
int index1) |
void |
appendBatchDocumentHeader(DocumentData data) |
protected static javax.swing.text.MutableAttributeSet |
cloneAttributes(javax.swing.text.AttributeSet attr,
Span span) |
void |
copySettings(CoreferenceDocument source) |
protected javax.swing.text.AttributeSet |
createHighlightedAttr(javax.swing.text.AttributeSet attr,
Span span,
java.awt.Color col,
int type) |
de.ims.icarus.util.annotation.AnnotationManager |
getAnnotationManager() |
protected static CoreferenceDocument.ClusterAttributes |
getClusterAttributes(int clusterId,
de.ims.icarus.util.annotation.HighlightType highlightType) |
CoreferenceDocument.DisplayMode |
getDisplayMode() |
de.ims.icarus.util.Filter |
getFilter() |
de.ims.icarus.util.annotation.HighlightType |
getHighlightType() |
de.ims.icarus.util.Filter |
getMarkupFilter() |
protected java.beans.PropertyChangeSupport |
getPropertyChangeSupport() |
boolean |
isFilterNonHighlighted() |
boolean |
isFilterSingletons() |
boolean |
isForceLinebreaks() |
static boolean |
isHighlightBegin(int highlight) |
static boolean |
isHighlightEnd(int highlight) |
boolean |
isMarkSpans() |
boolean |
isShowClusterId() |
boolean |
isShowDocumentHeader() |
boolean |
isShowOffset() |
boolean |
isShowSentenceIndex() |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
setAnnotationManager(de.ims.icarus.util.annotation.AnnotationManager annotationManager) |
void |
setDisplayMode(CoreferenceDocument.DisplayMode displayMode) |
void |
setFilter(de.ims.icarus.util.Filter filter) |
void |
setFilterNonHighlighted(boolean filterNonHighlighted) |
void |
setFilterSingletons(boolean filterSingletons) |
void |
setForceLinebreaks(boolean floatingText) |
void |
setHighlightType(de.ims.icarus.util.annotation.HighlightType highlightType) |
void |
setMarkSpans(boolean markSpans) |
void |
setMarkupFilter(de.ims.icarus.util.Filter markupFilter) |
void |
setShowClusterId(boolean showClusterIds) |
void |
setShowDocumentHeader(boolean showDocumentHeader) |
void |
setShowOffset(boolean showOffset) |
void |
setShowSentenceIndex(boolean showSentenceIndex) |
appendBatchLineFeed, appendBatchString, applyBatchUpdates, clear, discardBatch, pendingBatchCount
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
protected final SpanBuffer spanBuffer
protected final java.util.Stack<CoreferenceDocument.ClusterAttributes> attributeStack
protected final java.util.Stack<java.awt.Color> highlightStack
protected final java.util.Stack<Span> spanStack
protected final java.lang.StringBuilder builder
public static final java.lang.String PARAM_SPAN
public static final java.lang.String PARAM_ERROR_TYPE
public static final java.lang.String PARAM_HIGHLIGHT_COLOR
public static final java.lang.String PARAM_FILL_COLOR
public static final java.lang.String PARAM_UNDERLINE_COLOR
public static final java.lang.String PARAM_HIGHLIGHT_TYPE
public static final int HIGHLIGHT_TYPE_BEGIN
public static final int HIGHLIGHT_TYPE_END
public static final javax.swing.text.MutableAttributeSet CONTENT
public static final javax.swing.text.MutableAttributeSet SUBSCRIPT
public static final javax.swing.text.MutableAttributeSet SUPERSCRIPT
public static final javax.swing.text.MutableAttributeSet HEADER
protected static final CoreferenceDocument.ClusterAttributes emptyAttributes
public static boolean isHighlightBegin(int highlight)
public static boolean isHighlightEnd(int highlight)
public void copySettings(CoreferenceDocument source)
protected java.beans.PropertyChangeSupport getPropertyChangeSupport()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- PropertyChangeSource.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- listener
- PropertyChangeSource.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- PropertyChangeSource.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- listener
- PropertyChangeSource.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
protected void appendBatchCoreferenceData(CoreferenceData data, int sentenceIndex, CorefComparison comparison)
public void appendBatchDocumentData(DocumentData data, CoreferenceAllocation allocation, CoreferenceAllocation goldAllocation)
public void appendBatchDocumentData(DocumentData data, CoreferenceAllocation allocation, CoreferenceAllocation goldAllocation, int index0, int index1)
public void appendBatchDocumentHeader(DocumentData data)
public de.ims.icarus.util.annotation.AnnotationManager getAnnotationManager()
public void setAnnotationManager(de.ims.icarus.util.annotation.AnnotationManager annotationManager)
public boolean isMarkSpans()
public boolean isShowClusterId()
public boolean isShowOffset()
public de.ims.icarus.util.annotation.HighlightType getHighlightType()
public void setMarkSpans(boolean markSpans)
public void setShowClusterId(boolean showClusterIds)
public void setShowOffset(boolean showOffset)
public void setHighlightType(de.ims.icarus.util.annotation.HighlightType highlightType)
public boolean isForceLinebreaks()
public boolean isShowDocumentHeader()
public void setForceLinebreaks(boolean floatingText)
public void setShowDocumentHeader(boolean showDocumentHeader)
public boolean isFilterSingletons()
public void setFilterSingletons(boolean filterSingletons)
public boolean isFilterNonHighlighted()
public void setFilterNonHighlighted(boolean filterNonHighlighted)
public boolean isShowSentenceIndex()
public void setShowSentenceIndex(boolean showSentenceIndex)
public de.ims.icarus.util.Filter getFilter()
public void setFilter(de.ims.icarus.util.Filter filter)
public de.ims.icarus.util.Filter getMarkupFilter()
public void setMarkupFilter(de.ims.icarus.util.Filter markupFilter)
public CoreferenceDocument.DisplayMode getDisplayMode()
public void setDisplayMode(CoreferenceDocument.DisplayMode displayMode)
displayMode
- the displayMode to setprotected static javax.swing.text.MutableAttributeSet cloneAttributes(javax.swing.text.AttributeSet attr, Span span)
protected javax.swing.text.AttributeSet createHighlightedAttr(javax.swing.text.AttributeSet attr, Span span, java.awt.Color col, int type)
protected static CoreferenceDocument.ClusterAttributes getClusterAttributes(int clusterId, de.ims.icarus.util.annotation.HighlightType highlightType)