-
-
Notifications
You must be signed in to change notification settings - Fork 2
skipgram_cbow throws an error #5
Comments
After saving the "fastTextR_1.0.1.tar.gz" file under the R's library folder, "system("R CMD build fastTextR")" command didn't throw an error. Now, I got an error from the last line.
A previous thread mentioned this as well, and she said she solved the problem using R Studio GUI, but I couldn't figure out how. Could you please help me with this? Thank you! |
@hanson1005 I'm sorry for the late reply, I updated the installation instructions in the README.md file for the windows operating system (OS). I include in the following lines the output for both cases, either using the devtools package or by downloading directly the .tar.gz file. It might be helpful to spot any operating system configuration problems and it can also serve as a reference for future issues. Before taking a look to the output of my personal computer, my guess for your error (second case) is that you saved the fastTextR_1.0.0.tar.gz file in a folder where you don't have installation permission. I would suggest to create a folder in C:/ directory and place the file in that folder. Then proceed with the installation, +-----------------------------------------+
| installation using the devtools package |
+-----------------------------------------+
> devtools::install_github('mlampros/fastTextR')
Downloading GitHub repo mlampros/fastTextR@master
from URL https://api.github.com/repos/mlampros/fastTextR/zipball/master
Installing fastTextR
Installing 1 package: Rcpp
Installing package into ‘C:/Users/lampros/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/Rcpp_1.0.0.zip'
Content type 'application/zip' length 4479268 bytes (4.3 MB)
downloaded 4.3 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lampros\AppData\Local\Temp\RtmpshS5Mg\downloaded_packages
Installing 1 package: RcppArmadillo
Installing package into ‘C:/Users/lampros/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/RcppArmadillo_0.9.200.5.0.zip'
Content type 'application/zip' length 2226485 bytes (2.1 MB)
downloaded 2.1 MB
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lampros\AppData\Local\Temp\RtmpshS5Mg\downloaded_packages
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
--quiet CMD INSTALL \
"C:/Users/lampros/AppData/Local/Temp/RtmpshS5Mg/devtools214c782c35d7/mlampros-fastTextR-cb4b029" \
--library="C:/Users/lampros/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'fastTextR' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::loadVectors(std::string)':
fasttext.cc:327:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:332:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
fasttext.cc:342:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:345:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O2 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/x64
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'fastTextR'
finding HTML links ... done
predict_unknown_words html
skipgram_cbow html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (fastTextR)
In R CMD INSTALL
#--------
# example
#--------
library(fastTextR)
res = skipgram_cbow(input_path = "C:/your_folder/fastTextR/tests/testthat/test_data/doc.txt",
output_path = "C:/your_folder/model", method = "skipgram")
Read 0M words
Number of words: 3509
Number of labels: 0
Progress: 100.0% words/sec/thread: 34370 lr: 0.000000 loss: 3.153971 eta: 0h0m 14m
time to complete : 6.066365 secs
+-----------------------------------------+
| installation by downloading the .tar.gz |
+-----------------------------------------+
setwd('C:/your_folder/fastTextR/')
Rcpp::compileAttributes(verbose = TRUE)
setwd('C:/your_folder/')
system("R CMD build fastTextR")
* checking for file 'fastTextR/DESCRIPTION' ... OK
* preparing 'fastTextR':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building 'fastTextR_1.0.1.tar.gz'
system("R CMD INSTALL fastTextR_1.0.1.tar.gz")
* installing to library 'C:/Users/lampros/Documents/R/win-library/3.5'
* installing *source* package 'fastTextR' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::loadVectors(std::string)':
fasttext.cc:327:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:332:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
fasttext.cc:342:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:345:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O2 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'fastTextR'
finding HTML links ... done
predict_unknown_words html
skipgram_cbow html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (fastTextR)
In R CMD INSTALL
#---------------------------------------------------------
# Open a new R-session (or terminate R) to run the example
#---------------------------------------------------------
library(fastTextR)
res = skipgram_cbow(input_path = "C:/your_folder/fastTextR/tests/testthat/test_data/doc.txt",
output_path = "C:/your_folder/model", method = "skipgram")
Read 0M words
Number of words: 3509
Number of labels: 0
Progress: 100.0% words/sec/thread: 25737 lr: 0.000000 loss: 3.048482 eta: 0h0m
time to complete : 7.067729 secs
let me know if it worked. |
Hi. Thank you for the quick response.
Now I successfully installed the package using devtools.
While running the code in your vignette, I encountered another problem
which is the "output_token_single_file.txt" is not generated in the
designated folder. The codes are attached below this email.
Actually, the code works fine and generates the file on my laptop which is
using Windows and R version 3.4.2, but it does not on my desktop using
Windows and R version 3.5.1. (All other Windows settings are the same.)
Do you have any clue about this?
Also, if the file is not generated, I think the
"textTinyR::tokenize_transform_vec_docs" code should prompt an error or a
warning message. Currently, it does not, and instead following the next
code using "fastTextR::skipgram_cbow", it throws an error message sayingg
"Error in fastTextR::skipgram_cbow(input_path = PATH_INPUT, output_path =
PATH_OUT, :
the input_path parameter should be a valid character string path"
I am assuming this error message is because the txt file is not generated
and does not exist in the designated folder.
I would appreciate your help.
save_dat = textTinyR::tokenize_transform_vec_docs(object = concat,
as_token = T,
+ to_lower = T,
+
remove_punctuation_vector = F,
+ remove_numbers = F,
trim_token = T,
+ split_string = T,
+ split_separator = "
\r\n\t.,;:()?!//",
+ remove_stopwords = T,
language = "english",
+ min_num_char = 3,
max_num_char = 100,
+ stemmer =
"porter2_stemmer",
+ path_2folder =
"C:/Users/Ju Yeon Park/Desktop/New Projects/Hearing Text/Data/Script
Data/gpo114_House/sentimentit/",
+ threads = 4, verbose =
T)
time to complete : 10.48421 secs
PATH_INPUT = "C:/Users/Ju Yeon Park/Desktop/New Projects/Hearing
Text/Data/Script Data/gpo114_House/sentimentit/output_token_single_file.txt"
PATH_OUT = "C:/Users/Ju Yeon Park/Desktop/New Projects/Hearing
Text/Data/Script Data/gpo114_House/sentimentit/rt_fst_model"
#library(installr)
#uninstall.packages("fastTextR")
#devtools::install_github('mlampros/fastTextR')
library(fastTextR)
vecs = fastTextR::skipgram_cbow(input_path = PATH_INPUT, output_path =
PATH_OUT,
+ method = "skipgram", lr = 0.075,
lrUpdateRate = 100,
+ dim = 300, ws = 5, epoch = 5, minCount =
1, neg = 5,
+ wordNgrams = 2, loss = "ns", bucket =
2e+06,
+ minn = 0, maxn = 0, thread = 6, t =
1e-04, verbose = 2)
Error in fastTextR::skipgram_cbow(input_path = PATH_INPUT, output_path =
PATH_OUT, :
the input_path parameter should be a valid character string path
…
On Sun, Dec 2, 2018 at 4:18 AM Lampros Mouselimis ***@***.***> wrote:
@hanson1005 <https://github.com/hanson1005> I'm sorry for the late reply,
I updated the installation instructions in the README.md file for the
windows operating system (OS).
I built the fastTextR package on Windows 7 and at that time I didn't face
any difficulties to install it. Currently I use windows 10 and out of
curiosity (as it is the second issue related with the installation on
windows) I re-installed fastTextR on windows 10 and run an example from the
tests folder as well.
I include in the following lines the output for both cases, either using
the devtools package or by downloading directly the .tar.gz file. It might
be helpful to spot any operating system configuration problems and it can
also serve as a reference for future issues.
Before taking a look to the output of my personal computer, my guess for
your error (second case) is that you saved the fastTextR_1.0.0.tar.gz file
in a folder where you don't have installation permission. I would suggest
to create a folder in *C:/* directory and place the file in that folder.
Then proceed with the installation,
+-----------------------------------------+
| installation using the devtools package |
+-----------------------------------------+
> devtools::install_github('mlampros/fastTextR')
Downloading GitHub repo ***@***.***
from URL https://api.github.com/repos/mlampros/fastTextR/zipball/master
Installing fastTextR
Installing 1 package: Rcpp
Installing package into ‘C:/Users/lampros/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/Rcpp_1.0.0.zip'
Content type 'application/zip' length 4479268 bytes (4.3 MB)
downloaded 4.3 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lampros\AppData\Local\Temp\RtmpshS5Mg\downloaded_packages
Installing 1 package: RcppArmadillo
Installing package into ‘C:/Users/lampros/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/RcppArmadillo_0.9.200.5.0.zip'
Content type 'application/zip' length 2226485 bytes (2.1 MB)
downloaded 2.1 MB
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lampros\AppData\Local\Temp\RtmpshS5Mg\downloaded_packages
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
--quiet CMD INSTALL \
"C:/Users/lampros/AppData/Local/Temp/RtmpshS5Mg/devtools214c782c35d7/mlampros-fastTextR-cb4b029" \
--library="C:/Users/lampros/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'fastTextR' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::loadVectors(std::string)':
fasttext.cc:327:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:332:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
fasttext.cc:342:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:345:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O2 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/x64
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'fastTextR'
finding HTML links ... done
predict_unknown_words html
skipgram_cbow html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (fastTextR)
In R CMD INSTALL
#--------
# example
#--------
library(fastTextR)
res = skipgram_cbow(input_path = "C:/your_folder/fastTextR/tests/testthat/test_data/doc.txt",
output_path = "C:/your_folder/model", method = "skipgram")
Read 0M words
Number of words: 3509
Number of labels: 0
Progress: 100.0% words/sec/thread: 34370 lr: 0.000000 loss: 3.153971 eta: 0h0m 14m
time to complete : 6.066365 secs
+-----------------------------------------+
| installation by downloading the .tar.gz |
+-----------------------------------------+
setwd('C:/your_folder/fastTextR/')
Rcpp::compileAttributes(verbose = TRUE)
setwd('C:/your_folder/')
system("R CMD build fastTextR")
* checking for file 'fastTextR/DESCRIPTION' ... OK
* preparing 'fastTextR':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building 'fastTextR_1.0.1.tar.gz'
system("R CMD INSTALL fastTextR_1.0.1.tar.gz")
* installing to library 'C:/Users/lampros/Documents/R/win-library/3.5'
* installing *source* package 'fastTextR' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::loadVectors(std::string)':
fasttext.cc:327:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:332:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
fasttext.cc:342:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:345:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O2 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'fastTextR'
finding HTML links ... done
predict_unknown_words html
skipgram_cbow html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (fastTextR)
In R CMD INSTALL
#---------------------------------------------------------
# Open a new R-session (or terminate R) to run the example
#---------------------------------------------------------
library(fastTextR)
res = skipgram_cbow(input_path = "C:/your_folder/fastTextR/tests/testthat/test_data/doc.txt",
output_path = "C:/your_folder/model", method = "skipgram")
Read 0M words
Number of words: 3509
Number of labels: 0
Progress: 100.0% words/sec/thread: 25737 lr: 0.000000 loss: 3.048482 eta: 0h0m
time to complete : 7.067729 secs
let me know if it worked.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASRWrnAqSPMmizRhPK6sPe2EbkHjojUkks5u06j2gaJpZM4Y9JBb>
.
|
I am sorry, I have sent an email to a wrong github. Actually, I should have
directed the message to tinyTextR package maintainer.
Sorry about that!
Best,
Julia
…On Sun, Dec 2, 2018 at 4:18 AM Lampros Mouselimis ***@***.***> wrote:
@hanson1005 <https://github.com/hanson1005> I'm sorry for the late reply,
I updated the installation instructions in the README.md file for the
windows operating system (OS).
I built the fastTextR package on Windows 7 and at that time I didn't face
any difficulties to install it. Currently I use windows 10 and out of
curiosity (as it is the second issue related with the installation on
windows) I re-installed fastTextR on windows 10 and run an example from the
tests folder as well.
I include in the following lines the output for both cases, either using
the devtools package or by downloading directly the .tar.gz file. It might
be helpful to spot any operating system configuration problems and it can
also serve as a reference for future issues.
Before taking a look to the output of my personal computer, my guess for
your error (second case) is that you saved the fastTextR_1.0.0.tar.gz file
in a folder where you don't have installation permission. I would suggest
to create a folder in *C:/* directory and place the file in that folder.
Then proceed with the installation,
+-----------------------------------------+
| installation using the devtools package |
+-----------------------------------------+
> devtools::install_github('mlampros/fastTextR')
Downloading GitHub repo ***@***.***
from URL https://api.github.com/repos/mlampros/fastTextR/zipball/master
Installing fastTextR
Installing 1 package: Rcpp
Installing package into ‘C:/Users/lampros/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/Rcpp_1.0.0.zip'
Content type 'application/zip' length 4479268 bytes (4.3 MB)
downloaded 4.3 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lampros\AppData\Local\Temp\RtmpshS5Mg\downloaded_packages
Installing 1 package: RcppArmadillo
Installing package into ‘C:/Users/lampros/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/RcppArmadillo_0.9.200.5.0.zip'
Content type 'application/zip' length 2226485 bytes (2.1 MB)
downloaded 2.1 MB
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lampros\AppData\Local\Temp\RtmpshS5Mg\downloaded_packages
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
--quiet CMD INSTALL \
"C:/Users/lampros/AppData/Local/Temp/RtmpshS5Mg/devtools214c782c35d7/mlampros-fastTextR-cb4b029" \
--library="C:/Users/lampros/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'fastTextR' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::loadVectors(std::string)':
fasttext.cc:327:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:332:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
fasttext.cc:342:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:345:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O2 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/x64
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'fastTextR'
finding HTML links ... done
predict_unknown_words html
skipgram_cbow html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (fastTextR)
In R CMD INSTALL
#--------
# example
#--------
library(fastTextR)
res = skipgram_cbow(input_path = "C:/your_folder/fastTextR/tests/testthat/test_data/doc.txt",
output_path = "C:/your_folder/model", method = "skipgram")
Read 0M words
Number of words: 3509
Number of labels: 0
Progress: 100.0% words/sec/thread: 34370 lr: 0.000000 loss: 3.153971 eta: 0h0m 14m
time to complete : 6.066365 secs
+-----------------------------------------+
| installation by downloading the .tar.gz |
+-----------------------------------------+
setwd('C:/your_folder/fastTextR/')
Rcpp::compileAttributes(verbose = TRUE)
setwd('C:/your_folder/')
system("R CMD build fastTextR")
* checking for file 'fastTextR/DESCRIPTION' ... OK
* preparing 'fastTextR':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building 'fastTextR_1.0.1.tar.gz'
system("R CMD INSTALL fastTextR_1.0.1.tar.gz")
* installing to library 'C:/Users/lampros/Documents/R/win-library/3.5'
* installing *source* package 'fastTextR' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c args.cc -o args.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c dictionary.cc -o dictionary.o
dictionary.cc: In member function 'void fasttext::Dictionary::computeNgrams(const string&, std::vector<int, std::allocator<int> >&) const':
dictionary.cc:132:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
^
dictionary.cc:137:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initNgrams()':
dictionary.cc:146:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
dictionary.cc: In member function 'void fasttext::Dictionary::initTableDiscard()':
dictionary.cc:230:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size_; i++) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c fasttext.cc -o fasttext.o
fasttext.cc: In member function 'void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:126:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:130:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int, std::allocator<int> >&)':
fasttext.cc:142:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t w = 0; w < line.size(); w++) {
^
fasttext.cc:146:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (c != 0 && w + c >= 0 && w + c < line.size()) {
^
fasttext.cc: In member function 'void fasttext::FastText::loadVectors(std::string)':
fasttext.cc:327:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:332:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
fasttext.cc:342:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
fasttext.cc:345:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t j = 0; j < dim; j++) {
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -O2 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c main.cc -o main.o
main.cc: In function 'void convert_args_to_pointers(std::vector<std::basic_string<char> >, std::string, std::string)':
main.cc:210:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t i = 0; i < num_argc; ++i) {
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c matrix.cc -o matrix.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c model.cc -o model.o
model.cc: In member function 'fasttext::real fasttext::Model::hierarchicalSoftmax(int32_t, fasttext::real)':
model.cc:72:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int32_t i = 0; i < pathToRoot.size(); i++) {
^
model.cc: In member function 'void fasttext::Model::findKBest(int32_t, std::vector<std::pair<float, int> >&, fasttext::Vector&, fasttext::Vector&) const':
model.cc:146:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && utils::log(output[i]) < heap.front().first) {
^
model.cc:151:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
model.cc: In member function 'void fasttext::Model::dfs(int32_t, int32_t, fasttext::real, std::vector<std::pair<float, int> >&, fasttext::Vector&) const':
model.cc:161:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() == k && score < heap.front().first) {
^
model.cc:168:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (heap.size() > k) {
^
In file included from model.cc:17:0:
model.cc: In member function 'void fasttext::Model::setTargetCounts(const std::vector<long long int>&)':
model.cc:203:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert(counts.size() == osz_);
^
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c utils.cc -o utils.o
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/ -I"C:/Users/lampros/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/lampros/Documents/R/win-library/3.5/RcppArmadillo/include" -fopenmp -O2 -Wall -mtune=generic -c vector.cc -o vector.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o fastTextR.dll tmp.def RcppExports.o args.o dictionary.o fasttext.o init.o main.o matrix.o model.o utils.o vector.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -mthreads -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
installing to C:/Users/lampros/Documents/R/win-library/3.5/fastTextR/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'fastTextR'
finding HTML links ... done
predict_unknown_words html
skipgram_cbow html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (fastTextR)
In R CMD INSTALL
#---------------------------------------------------------
# Open a new R-session (or terminate R) to run the example
#---------------------------------------------------------
library(fastTextR)
res = skipgram_cbow(input_path = "C:/your_folder/fastTextR/tests/testthat/test_data/doc.txt",
output_path = "C:/your_folder/model", method = "skipgram")
Read 0M words
Number of words: 3509
Number of labels: 0
Progress: 100.0% words/sec/thread: 25737 lr: 0.000000 loss: 3.048482 eta: 0h0m
time to complete : 7.067729 secs
let me know if it worked.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASRWrnAqSPMmizRhPK6sPe2EbkHjojUkks5u06j2gaJpZM4Y9JBb>
.
--
Ju Yeon Julia Park
Ph.D. in Politics
New York University
|
if I understand it correctly, fastTextR & textTinyR saves the text file as expected in your windows-laptop but not on your windows-desktop? edit : just saw that you reproduce the vignette. Let me run the example on my pc tomorrow and I'll notify you. |
I used the "planets.txt" from my blog post to reproduce the issue that you've mentioned but both functions textTinyR::tokenize_transform_text() and textTinyR::tokenize_transform_vec_docs() return the correct output, library(textTinyR)
path_txt = "C:/your_folder/planets.txt"
res_txt = tokenize_transform_text(object = path_txt,
to_lower = TRUE,
utf_locale = "",
trim_token = TRUE,
split_string = TRUE,
remove_stopwords = TRUE,
language = "english",
stemmer = "ngram_sequential",
path_2folder = "C:/your_folder/",
stemmer_ngram = 3,
threads = 1) It returns the C:/your_folder/output_token.txt file init = token_stats$new(path_2file = path_txt)
inp = init$path_2vector()
save_dat = textTinyR::tokenize_transform_vec_docs(object = inp,
as_token = T,
to_lower = T,
remove_punctuation_vector = F,
remove_numbers = F,
trim_token = T,
split_string = T,
split_separator = "\r\n\t.,;:()?!//",
remove_stopwords = T,
language = "english",
min_num_char = 3,
max_num_char = 100,
stemmer = "porter2_stemmer",
path_2folder = "C:/your_folder/",
threads = 4,
verbose = T) it returns the C:/your_folder/output_token_single_file.txt file with the following data, the planets were thought by ptolemi although the idea that the planet performed by
galileo galilei at about the same tim by careful analysis of pre-telesco johannes kepler
found the planets as observational tools improv astronomers saw that like earth
the planets rotated around tilted and some shared such features as i since the dawn
of the space ag hurrican tecton and even hydrolog international astronomical uni iau
officially adopted a resolution d some celestial bodi such as cer palla juno and vesta
each an object in the solar asteroi and pluto the first trans-neptunian object di that
were once considered planets are no longer viewed as such Would you mind sharing exact data for the issue so that I can reproduce the error. I mean : data, paths to folder and function that you use.
|
Hi. I am just following your vignette at
https://www.rdocumentation.org/packages/textTinyR/versions/1.1.2/vignettes/word_vectors_doc2vec.Rmd
using the NLTK corpus.
The codes you provided work perfectly fine on my laptop, but it does not
create output_token_single_file on my desktop.
Even when I set the working directory to a flash drive, it doesn't generate
the file.
Also, the code doesn't prompt any error or warning message either. Rather,
it provides the time that the execution was completed as shown below:
save_dat = textTinyR::tokenize_transform_vec_docs(object = concat,
as_token = T,
+ to_lower = T,
+
remove_punctuation_vector = F,
+ remove_numbers = F,
trim_token = T,
+ split_string = T,
+ split_separator = "
\r\n\t.,;:()?!//",
+ remove_stopwords = T,
language = "english",
+ min_num_char = 3,
max_num_char = 100,
+ stemmer =
"porter2_stemmer",
+ path_2folder =
"C:/Users/Ju Yeon Park/Desktop/New folder/",
+ threads = 4, verbose =
T)
time to complete : 7.824063 mins
I think there's a bug to fix on your end...
…On Mon, Dec 3, 2018 at 2:34 AM Lampros Mouselimis ***@***.***> wrote:
@hanson1005 <https://github.com/hanson1005>,
I used the "planets.txt" from my blog post
<http://mlampros.github.io/2017/01/05/textTinyR_package/> to reproduce
the issue that you've mentioned but both functions
*textTinyR::tokenize_transform_text()* and
*textTinyR::tokenize_transform_vec_docs()* return the correct output,
library(textTinyR)
path_txt = "C:/your_folder/planets.txt"
res_txt = tokenize_transform_text(object = path_txt,
to_lower = TRUE,
utf_locale = "",
trim_token = TRUE,
split_string = TRUE,
remove_stopwords = TRUE,
language = "english",
stemmer = "ngram_sequential",
path_2folder = "C:/your_folder/",
stemmer_ngram = 3,
threads = 1)
It returns the C:/your_folder/output_token.txt file
init = token_stats$new(path_2file = path_txt)
inp = init$path_2vector()
save_dat = textTinyR::tokenize_transform_vec_docs(object = inp,
as_token = T,
to_lower = T,
remove_punctuation_vector = F,
remove_numbers = F,
trim_token = T,
split_string = T,
split_separator = "\r\n\t.,;:()?!//",
remove_stopwords = T,
language = "english",
min_num_char = 3,
max_num_char = 100,
stemmer = "porter2_stemmer",
path_2folder = "C:/your_folder/",
threads = 4,
verbose = T)
it returns the C:/your_folder/output_token_single_file.txt file with the
following data,
the planets were thought by ptolemi although the idea that the planet performed by galileo galilei at about the same tim by careful analysis of pre-telesco johannes kepler
found the planets as observational tools improv astronomers saw that like earth the planets rotated around tilted and some shared such features as i since the dawn
of the space ag hurrican tecton and even hydrolog international astronomical uni iau officially adopted a resolution d some celestial bodi such as cer palla juno and vesta
each an object in the solar asteroi and pluto the first trans-neptunian object di that were once considered planets are no longer viewed as such
Would you mind sharing exact data for the issue so that I can reproduce
the error. I mean : data, paths to folder and function that you use.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASRWrlv-0H4UEzjLAJvHhoqRwJjskeQqks5u1OIygaJpZM4Y9JBb>
.
--
Ju Yeon Julia Park
Ph.D. in Politics
New York University
|
would you mind making me a favour and open a new issue in the textTinyR repository, because if there is a bug in the package then this issue belongs to textTinyR and not to fastTextR package. Just copy and paste your previous comment. thanks edited: and also run the following script and show me your output, dat = textTinyR::tokenize_transform_vec_docs(object = concat, as_token = T,
to_lower = T,
remove_punctuation_vector = F,
remove_numbers = F, trim_token = T,
split_string = T,
split_separator = " \r\n\t.,;:()?!//",
remove_stopwords = T, language = "english",
min_num_char = 3, max_num_char = 100,
stemmer = "porter2_stemmer",
path_2folder = "",
threads = 4, verbose = T)
str(dat)
|
Oh, sure. Sorry for bothering you with this.
One other issue with installing fastTextR is that now I am installing it to
another computer, which is better than mine so that I need to use it now,
but I get this error message. Could you please help me with solving this
problem?
devtools::install_github('mlampros/fastTextR')
Downloading GitHub repo mlampros/fastTextR@master
from URL https://api.github.com/repos/mlampros/fastTextR/zipball/master
Installing fastTextR
trying URL '
https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/Rcpp_1.0.0.tgz'
Content type 'application/x-gzip' length 4343466 bytes (4.1 MB)
==================================================
downloaded 4.1 MB
Installing Rcpp
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file
--no-environ --no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/wp/4dy4bs6166n0rswly1gf3s0h0000gs/T/RtmpQ9m9nV/devtoolsc1e44fe2f29/Rcpp'
\
…--library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library'
--install-tests
* installing *binary* package ‘Rcpp’ ...
* DONE (Rcpp)
trying URL '
https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/RcppArmadillo_0.9.200.5.0.tgz
'
Content type 'application/x-gzip' length 1636168 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
Installing RcppArmadillo
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file
--no-environ --no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/wp/4dy4bs6166n0rswly1gf3s0h0000gs/T/RtmpQ9m9nV/devtoolsc1ed9629b2/RcppArmadillo'
\
--library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library'
--install-tests
* installing *binary* package ‘RcppArmadillo’ ...
* DONE (RcppArmadillo)
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file
--no-environ --no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/wp/4dy4bs6166n0rswly1gf3s0h0000gs/T/RtmpQ9m9nV/devtoolsc1e5762e91b/mlampros-fastTextR-df50e11'
\
--library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library'
--install-tests
* installing *source* package ‘fastTextR’ ...
** libs
clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include
-DNDEBUG -I../inst/include/
-I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppArmadillo/include"
-I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c RcppExports.cpp -o
RcppExports.o
clang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘fastTextR’
* removing
‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/fastTextR’
Installation failed: Command failed (1)
On Wed, Dec 5, 2018 at 1:54 AM Lampros Mouselimis ***@***.***> wrote:
@hanson1005 <https://github.com/hanson1005>,
would you mind making me a favour and open a new issue in the textTinyR
repository <https://github.com/mlampros/textTinyR>, because if there is a
bug in the package then this issue belongs to textTinyR and not to
fastTextR package. Just copy and paste your previous comment
<#5 (comment)>.
thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASRWrpqY4xhWW6OhQgeSdWQllalNjQfvks5u13u3gaJpZM4Y9JBb>
.
--
Ju Yeon Julia Park
Ph.D. in Politics
New York University
|
@hanson1005 I assume you attempt to install the package on Macintosh, .
.
https://cran.rstudio.com/bin/macosx/el-capitan/......
.
.
.
clang: error: unsupported option '-fopenmp'
.
. This is due to the fact that Macintosh does not support OpenMP out of the box. See this related issue to resolve the error on your pc. |
That's right. It is Mac. Thank you for the suggestion!
…On Thu, Dec 6, 2018 at 12:29 AM Lampros Mouselimis ***@***.***> wrote:
@hanson1005 <https://github.com/hanson1005> I assume you attempt to
install the package on Macintosh,
.
.https://cran.rstudio.com/bin/macosx/el-capitan/......
.
.
.clang: error: unsupported option '-fopenmp'
.
.
This is due to the fact that Macintosh does not support *OpenMP* out of
the box. See this related issue
<mlampros/ClusterR#12 (comment)>
to resolve the error on your pc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASRWrsSVerUnpYBZifwjFyrSwQcL3yKkks5u2LlDgaJpZM4Y9JBb>
.
--
Ju Yeon Julia Park
Ph.D. in Politics
New York University
|
This is Robo-lampros because the Human-lampros is lazy. This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs. Feel free to re-open a closed issue and the Human-lampros will respond. |
Hi. I am trying to use skipgram_cbow command. And I am using Windows.
So, I installed fastTextR using devtook, but "fastTextR::skipgram_cbow(input_path = ...)" didn't work.
`> devtools::install_github('mlampros/fastTextR')
Error: 'skipgram_cbow' is not an exported object from 'namespace:fastTextR'`
So, I tried the following command, but got an error message when executing the fourth line:
`setwd('/your_folder/fastTextR/')
Rcpp::compileAttributes(verbose = TRUE)
setwd('/your_folder/')
system("R CMD build fastTextR")
Warning in gzfile(tarfile, "wb", compression = compression_level) :
cannot open compressed file 'C:/Program Files/R/R-3.5.1/library/fastTextR_1.0.1.tar.gz', probable reason 'Permission denied'
Error in gzfile(tarfile, "wb", compression = compression_level) :
cannot open the connection
Execution halted
system("R CMD INSTALL fastTextR_1.0.0.tar.gz")`
"Permission denied" may mean that the command failed to make changes to the fastTextR folder since it is read-only. However, I tried to unlock the read-only option of the folder, it never gets unlocked. Or maybe I am pointing to a wrong issue. How do I get around with this error message?
Is there any other way to install fastTextR in Windows?
Thank you!
The text was updated successfully, but these errors were encountered: