}
Collections.sort(updates);
System.out.println("Saving samples!!!");
d=1;
Update p=null;
SuperLemma s=null;
Lemma l=null;
for(Update u:updates)
{
System.out.println(String.valueOf(d)+"/"+String.valueOf(updates.size()));
d++;
if(p==null||!u.getLemma().equals(p.getLemma()))
{
if(s!=null)
{
l.addCount(counts.get(lemmas.indexOf(p.getLemma())));
this.dict.WriteSuperLemma(path, s);
}
s=this.dict.loadSuperLemma(u.getLemma(),path);
l=s.retrieveLemma(this.dict.getName());
}
Sense sens=l.getSenses().get(u.getSense());
if(!sens.getSamples().contains(u.getText()))
{
sens.addBagOfWords(u.getText(), u.getBow(),this.name);