es.nlp.uned.weps.evaluation
Class WePS2007Handler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
es.nlp.uned.weps.evaluation.WePS2007Handler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class WePS2007Handler
- extends org.xml.sax.helpers.DefaultHandler
The Class WePS2007Handler is a XML handler for the WePS 2007 clustering format.
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname)
|
int |
getAssignedDocs()
Gets the set of assigned documents. |
java.util.HashSet<java.lang.String> |
getDiscarded()
Gets the set of discarded documents (documents specified as not assigned to any cluster). |
java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> |
getEntityDic()
Gets the dictionary {cluster identifier: set of documents} |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attr)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WePS2007Handler
public WePS2007Handler()
startDocument
public void startDocument()
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
- Overrides:
startDocument
in class org.xml.sax.helpers.DefaultHandler
endDocument
public void endDocument()
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
- Overrides:
endDocument
in class org.xml.sax.helpers.DefaultHandler
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attr)
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname)
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
characters
public void characters(char[] ch,
int start,
int length)
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
getEntityDic
public java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> getEntityDic()
- Gets the dictionary {cluster identifier: set of documents}
- Returns:
- the entity dic
getDiscarded
public java.util.HashSet<java.lang.String> getDiscarded()
- Gets the set of discarded documents (documents specified as not assigned to any cluster).
- Returns:
- the discarded
getAssignedDocs
public int getAssignedDocs()
- Gets the set of assigned documents.
- Returns:
- the assigned docs