System.out.println("原字典大小"+index.size());
System.out.println("原字典大小"+feature.size());
StringFeatureAlphabet newfeat = new StringFeatureAlphabet();
cl.factory.setDefaultFeatureAlphabet(newfeat);
for(int i=0;i<weights.length;i++){
TIntFloatIterator itt = weights[i].data.iterator();
HashSparseVector ww = new HashSparseVector();
while(itt.hasNext()){
itt.advance();
float v = itt.value();
if(Math.abs(v)<1e-3f)
continue;
String fea = index.get(itt.key());
int newidx = newfeat.lookupIndex(fea);
ww.put(newidx, v);
}
weights[i] = ww;
}