this.currentSelection = new HashSet<OWLEntity>();
}
private void loadWikiTop(String ontologyName) throws IOException
{
CSVFileReader in = new CSVFileReader(inputDirectory+ontologyName+".csv", ',');
//read the first row
Vector<String> fields = in.readFields();
//skip the first row and read the second because the first one is the header
fields = in.readFields();
String className;
Double wikiTop;
while(fields != null)
{
//get the class name from the first column (0)
className = fields.get(0);
//get the top from the second column (1)
try
{
Boolean hasArticle = Boolean.parseBoolean(fields.get(2));
wikiTop = computeScore(hasArticle,
Integer.parseInt(fields.get(3)),
Integer.parseInt(fields.get(4)),
Integer.parseInt(fields.get(5)),
Integer.parseInt(fields.get(6)),
Integer.parseInt(fields.get(7)));
}
catch(Exception e)
{
wikiTop = 0.0;
}
//add the top into map
map.add(new ClassTopWiki(className, wikiTop));
//read the next row
fields = in.readFields();
}
}