Skip to content

Commit

Permalink
Fix r cmd check warning fedora clang
Browse files Browse the repository at this point in the history
  • Loading branch information
jwijffels committed Jun 11, 2020
1 parent af0d7b9 commit 3812a41
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: word2vec
Type: Package
Title: Distributed Representations of Words
Version: 0.2.0
Version: 0.2.1
Authors@R: c(
person('Jan', 'Wijffels', role = c('aut', 'cre', 'cph'), email = '[email protected]', comment = "R wrapper"),
person('BNOSAC', role = 'cph', comment = "R wrapper"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## CHANGES IN word2vec VERSION 0.2.1

- Fix R CMD check warning message on Fedora clang

## CHANGES IN word2vec VERSION 0.2

- Extended predict.w2v with nearest if you pass on a vector or matrix. This allows to perform word2vec analogies or extract other similarities.
Expand Down
3 changes: 2 additions & 1 deletion src/rcpp_word2vec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ Rcpp::List w2v_train(std::string trainFile, std::string modelFile, std::string s

// [[Rcpp::export]]
Rcpp::List w2v_load_model(std::string file, bool normalize = true) {
bool normalise = normalize;
Rcpp::XPtr<w2v::w2vModel_t> model(new w2v::w2vModel_t(), true);
if (!model->load(file, normalize = normalize)) {
if (!model->load(file, normalize = normalise)) {
Rcpp::stop(model->errMsg());
}
Rcpp::List out = Rcpp::List::create(
Expand Down

0 comments on commit 3812a41

Please sign in to comment.