Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A little problem for print #11

Open
RQDYGSN opened this issue May 10, 2021 · 0 comments
Open

A little problem for print #11

RQDYGSN opened this issue May 10, 2021 · 0 comments

Comments

@RQDYGSN
Copy link

RQDYGSN commented May 10, 2021

Error:

word2vec.h:319:48: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("training %d sentences\n", n_sentences);
^
word2vec.h: In instantiation of ‘int Word2Vec::load(const string&) [with String = std::basic_string; std::string = std::basic_string]’:
main.cc:130:27: required from here
word2vec.h:418:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("%d words loaded\n", n_words);

Solution:

  • Word2vec line 319: printf("training %ld sentences\n", n_sentences);
  • Word2vec line 418: printf("%ld words loaded\n", n_words);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant