{
relevantSynsets.addAll(word.getSenses());
}
for(i=0;i<senses.size()&&(target.getPos().equals("N")||this.allPos);i++)
{
Graph g=this.graphs.loadGraph(senses.get(i), this.dict);
g.prune(relations, depth);
double w=0.0d;
double m=0.0d;
ArrayList<String> dwords=new ArrayList<String>();
for(Sense s:relevantSynsets)
{
GraphNode gn=g.get(s, depth, relations);
if(gn!=null)
{
dwords.add(s.getSynonyms().get(0));
m+=1.0d;
}
}
w=Math.pow(m, 0.1)*Math.pow(m/((double)g.getNodes().size()),Math.log(((double)i)+1.0d));
decision.setSense(i, w, dwords);
}
decision.calculateAnswer();
return decision;
}