mitrevf / airhead-research

Automatically exported from code.google.com/p/airhead-research
0 stars 0 forks source link

SemanticSpaceIO.writeSparseText broken #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. SemanticSpace sp = SemanticSpaceIO.load(new File("..."));
2. use SemanticSpaceIO.save(sp, new File("..."), SSpaceFormat.SPARSE_TEXT);

What is the expected output? What do you see instead?
All saved vectors in the created file look like this:
Test9146|0,0.0,1,0.0,2,0.0,3,0.0,4,0.0,5,0.0,6,0.0,7,0.0,8,0.0,9,0.0,10,0.0,11,0
.0,12,0.0,13,0.0

That are the first 16 dimensions of this vector (which are zero in this case).

What version of the product are you using? On what operating system?
1.5
Bug is still in version r1165.

Please provide any additional information below.

The error seems to be in line 500:
sb.append(",").append(i).append(",").append(sdv.get(i));
should be:
sb.append(",").append(nz[i]).append(",").append(sdv.get(nz[i]));

Same error in line 510+511.

Original issue reported on code.google.com by mbfu...@gmail.com on 15 Apr 2011 at 5:40

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1245.

Original comment by David.Ju...@gmail.com on 15 Apr 2011 at 6:11

GoogleCodeExporter commented 9 years ago
Thanks!  We almost exclusively use the binary formats, but it's important that 
the text formats work as well.  We'll start rolling out new binaries with this 
fix shortly.

Original comment by David.Ju...@gmail.com on 15 Apr 2011 at 6:14