Skip to content

Out of bound on a different corpus #1

@Ricocotam

Description

@Ricocotam

Hey, I've been trying to use your code (which is amazingly clear and easy to understand, great job and thanks a lot) on a different corpus (this one) but I got an issue on line 102 of word2vec.lua

I don't know why but word_index had a value over vocab_size (in this case vocab_size is 1169). So I fixed it my changing line 104 :

  • from "if word_index > self.vocab_size then"
  • to "if word_index >= self.vocab_size then"

No PR, extremely simple fixing, but I can't figure out if it changes anything.

Thanks again for your code !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions