{"action":"closed","issue":{"url":"https://api.github.com/repos/shaform/word2vec/issues/16","labels_url":"https://api.github.com/repos/shaform/word2vec/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/shaform/word2vec/issues/16/comments","events_url":"https://api.github.com/repos/shaform/word2vec/issues/16/events","html_url":"https://github.com/shaform/word2vec/issues/16","id":63901261,"number":16,"title":"Patch for /trunk/word2vec.c","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shaform/word2vec/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/shaform/word2vec/labels/Type-Patch","name":"Type-Patch","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-24T04:33:12Z","updated_at":"2015-03-27T13:03:32Z","closed_at":"2015-03-27T13:03:32Z","body":"```\nPatch for bug, which caused discarding the last word of vocab after sorting if \nthere was no newline character in the input file.\n\nIf there is no newline in the input file, vocab[0].cn==0, which is ignored in \nsorting, but is not in the for loop, where it decrements the vocab_size and \nfrees the memory of the last word. However, it still computes the hash for the \nlast word if its count is greater than min_count. Also the realloc needs to \nallocate only vocab_size * sizeof(struct vocab_word).\n```\n\nOriginal issue reported on code.google.com by `FerroMrkva` on 5 Feb 2014 at 11:24\n\nAttachments:\n* [word2vec.c.patch](https://storage.googleapis.com/google-code-attachments/word2vec/issue-16/comment-0/word2vec.c.patch)\n"}}