Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cooccur.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ int get_cooccurrence() {
fid = stdin;
sprintf(format,"%%%ds",MAX_STRING_LENGTH);
sprintf(filename,"%s_%04d.bin",file_head, fidcounter);
foverflow = fopen(filename,"w");
foverflow = fopen(filename,"wb");
if (verbose > 1) fprintf(stderr,"Processing token: 0");

/* For each token in input stream, calculate a weighted cooccurrence sum within window_size */
Expand All @@ -342,7 +342,7 @@ int get_cooccurrence() {
fclose(foverflow);
fidcounter++;
sprintf(filename,"%s_%04d.bin",file_head,fidcounter);
foverflow = fopen(filename,"w");
foverflow = fopen(filename,"wb");
ind = 0;
}
flag = get_word(str, fid);
Expand Down Expand Up @@ -384,7 +384,7 @@ int get_cooccurrence() {

/* Write out full bigram_table, skipping zeros */
if (verbose > 1) fprintf(stderr, "Writing cooccurrences to disk");
fid = fopen(filename,"w");
fid = fopen(filename,"wb");
j = 1e6;
for (x = 1; x <= vocab_size; x++) {
if ( (long long) (0.75*log(vocab_size / x)) < j) {j = (long long) (0.75*log(vocab_size / x)); if (verbose > 1) fprintf(stderr,".");} // log's to make it look (sort of) pretty
Expand Down