semeval.idrepair
Class IdRepairer

java.lang.Object
  extended by semeval.idrepair.IdRepairer

public class IdRepairer
extends java.lang.Object

IdRepairer can 'repair' the values of the 'id' and 'idref' attribute in a SalsaXML Corpus, so that the salto tool will be able to merge them.

Author:
Fabian Shirokov

Constructor Summary
IdRepairer(Corpus corpus)
          Default constructor that takes the SalsaXML Corpus as an argument.
 
Method Summary
 java.lang.String getMappingOverview()
          Returns an overview of which old Ids have matched to which new Ids.
static void main(java.lang.String[] args)
          Main class that repairs a corpus.
 void repair()
          This method repairs the 'ids' in a corpus.
 void writeMappingToFile(java.lang.String fileName)
          Writes the result of getMappingOverview() into a file with the specified name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdRepairer

public IdRepairer(Corpus corpus)
Default constructor that takes the SalsaXML Corpus as an argument.

Parameters:
corpus -
Method Detail

getMappingOverview

public java.lang.String getMappingOverview()
Returns an overview of which old Ids have matched to which new Ids. This method returns an empty String if you don't apply the repair() method first.

Returns:

main

public static void main(java.lang.String[] args)
Main class that repairs a corpus.

Parameters:
args -

repair

public void repair()
This method repairs the 'ids' in a corpus.


writeMappingToFile

public void writeMappingToFile(java.lang.String fileName)
                        throws java.io.IOException
Writes the result of getMappingOverview() into a file with the specified name.

Throws:
java.io.IOException