From 3812a414905047064f17cde2de0962fe28056bf9 Mon Sep 17 00:00:00 2001 From: Jan Wijffels Date: Thu, 11 Jun 2020 17:21:24 +0200 Subject: [PATCH] Fix r cmd check warning fedora clang --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ src/rcpp_word2vec.cpp | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0f658ab..39109c6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = 'jwijffels@bnosac.be', comment = "R wrapper"), person('BNOSAC', role = 'cph', comment = "R wrapper"), diff --git a/NEWS.md b/NEWS.md index 77bbccc..81066e8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/src/rcpp_word2vec.cpp b/src/rcpp_word2vec.cpp index 56debae..32ec4b0 100644 --- a/src/rcpp_word2vec.cpp +++ b/src/rcpp_word2vec.cpp @@ -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 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(