- priority: 5 --> 8
- assigned_to: nobody --> cederber
Word vectors written by associate -f are all zeros.
The problem is in neighbors.c. This bit of code:
if( neighbor_item.score > threshold) {
if ( (neighbor_item.vector = malloc(vector_size))
== NULL ) {
fprintf( stderr, "neighbors.c: can't allocate vector
memory.\n" );
free_tail( list, neighbor_item_free );
return 0;
}
list_insert( list, &last, depth,
(void *) &neighbor_item, sizeof( NEIGHBOR_ITEM ),
neighbor_item_cmp, neighbor_item_free );
should be something like this:
if( neighbor_item.score > threshold) {
if ( (neighbor_item.vector = malloc(vector_size))
== NULL ) {
fprintf( stderr, "neighbors.c: can't allocate vector
memory.\n" );
free_tail( list, neighbor_item_free );
return 0;
}
memcpy(neighbor_item.vector,tmp_ni_vector,vector_size);
list_insert( list, &last, depth,
(void *) &neighbor_item, sizeof( NEIGHBOR_ITEM ),
neighbor_item_cmp, neighbor_item_free );