this.addParameters("windowSize:1;");
}
int windowSize=Integer.parseInt(this.getValue("windowSize"));
ArrayList<AmbiguousWord> window=new ArrayList<AmbiguousWord>(windowSize);
AmbiguousWord targetWord=document.getAmbiguousWords().get(target);
int i=1;
// Retrieve window
while((window.size()<windowSize)&&((target-i>=0)||(target+i<document.getAmbiguousWords().size())))
{
if(target-i>=0)
{
AmbiguousWord word=document.getAmbiguousWords().get(target-i);
boolean ban=true;
for(WindowFilter condition:this.windowFilters)
{
if(condition.satisfiesCondition(targetWord, word, window)==false)
{
ban=false;
break;
}
}
if(ban)
{
window.add(word);
}
}
if(window.size()==windowSize)
break;
if(target+i<document.getAmbiguousWords().size())
{
AmbiguousWord word=document.getAmbiguousWords().get(target+i);
boolean ban=true;
for(WindowFilter condition:this.windowFilters)
{
if(!condition.satisfiesCondition(targetWord, word, window))
{