![JAR search and dependency download from the Maven repository](/logo.png)
it.unipi.di.acube.batframework.datasetPlugins.ConllAidaTestBDataset Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bat-framework Show documentation
Show all versions of bat-framework Show documentation
A framework to compare entity annotation systems.
The newest version!
package it.unipi.di.acube.batframework.datasetPlugins;
import it.unipi.di.acube.batframework.data.*;
import it.unipi.di.acube.batframework.utils.*;
import java.io.IOException;
import java.util.*;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;
import org.xml.sax.SAXException;
public class ConllAidaTestBDataset extends ConllAidaDataset{
private static final int FIRST_DOC_ID = 1163;
private static final int LAST_DOC_ID = 1393;
public ConllAidaTestBDataset(String file, WikipediaInterface api) throws IOException, AnnotationException, XPathExpressionException, ParserConfigurationException, SAXException {
super(file, api);
}
@Override
public int getSize() {
return LAST_DOC_ID-FIRST_DOC_ID+1;
}
@Override
public int getTagsCount() {
int count = 0;
for (HashSet s : getA2WGoldStandardList())
count += s.size();
return count;
}
@Override
public List> getC2WGoldStandardList() {
return ProblemReduction.A2WToC2WList(getA2WGoldStandardList());
}
@Override
public List> getA2WGoldStandardList() {
return super.getA2WGoldStandardList().subList(FIRST_DOC_ID-1, LAST_DOC_ID);
}
@Override
public List> getD2WGoldStandardList() {
return getA2WGoldStandardList();
}
@Override
public List getTextInstanceList() {
return super.getTextInstanceList().subList(FIRST_DOC_ID-1, LAST_DOC_ID);
}
@Override
public List> getMentionsInstanceList() {
return ProblemReduction.A2WToD2WMentionsInstance(getA2WGoldStandardList());
}
@Override
public String getName() {
return "AIDA/CO-NLL-TestB";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy