Skip to content

Commit

Permalink
Remove paragraph vectors from word vector output
Browse files Browse the repository at this point in the history
(so we can use the output to compare with word2vec)
  • Loading branch information
Zachary Seymour committed Jul 30, 2014
1 parent 72f8b68 commit f59f3a2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions phrase2vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,16 +848,16 @@ void TrainModel() {
else for (b = 0; b < layer1_size; b++) fprintf(fo, "%lf ", syn0[a * layer1_size + b]);
fprintf(fo, "\n");
}
for (a = 0; a < phrase_size; a++) {
long count = phrases[a].word_count;
/* for (a = 0; a < phrase_size; a++) { */
/* long count = phrases[a].word_count; */

for (b = 0; b < count; b++) {
fprintf(fo, "%s ", phrases[a].words[b]);
}
if (binary) for (b = 0; b < layer1_size; b++) fwrite(&phrases[a].vector[b], sizeof(real), 1, fo);
else for (b = 0; b < layer1_size; b++) fprintf(fo, "%lf ", phrases[a].vector[b]);
fprintf(fo, "\n");
}
/* for (b = 0; b < count; b++) { */
/* fprintf(fo, "%s ", phrases[a].words[b]); */
/* } */
/* if (binary) for (b = 0; b < layer1_size; b++) fwrite(&phrases[a].vector[b], sizeof(real), 1, fo); */
/* else for (b = 0; b < layer1_size; b++) fprintf(fo, "%lf ", phrases[a].vector[b]); */
/* fprintf(fo, "\n"); */
/* } */
fclose(fo);
}

Expand Down

0 comments on commit f59f3a2

Please sign in to comment.