}
@Override
public void init(Input document) throws Exception{
if(document!=null)
System.out.println("\nDisambiguating "+document.toString());
this.graphs=new GraphHandler(this.dict);
this.relations=new ArrayList<String>();
if(this.getValue("relations")==null)
{
this.relations.add("Hypernym");
this.relations.add("Instance Hypernym");
this.relations.add("Hyponym");
this.relations.add("Instance Hyponym");
}
else
{
for(String rel:this.getValue("relations").split("\\|"))
{
this.relations.add(rel);
}
}
if(this.getValue("depth")==null)
{
this.depth=4;
}
else
{
this.depth=Integer.parseInt(this.getValue("depth"));
}
if(this.getValue("allPos")==null)
{
this.allPos=false;
}
else
{
this.allPos=Boolean.parseBoolean(this.getValue("allPos"));
}
if(this.graphs==null)
this.graphs=new GraphHandler(this.dict);
}