无法使用make通过终端安装fasttext

时间:2019-05-18 06:26:20

标签: makefile fasttext

我正在Ubuntu 16.04上工作,并尝试使用以下命令(从其网站)通过终端安装fasttext:

$ wget https://github.com/facebookresearch/fastText/archive/v0.2.0.zip
$ unzip v0.2.0.zip
$ cd fastText-0.2.0
$ make

但是当我尝试使其出现以下错误时:

c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/args.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/dictionary.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/productquantizer.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/matrix.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/qmatrix.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/vector.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/model.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/utils.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/meter.cc
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -c src/fasttext.cc
src/fasttext.cc: In member function ‘void fasttext::FastText::quantize(const fasttext::Args&)’:
src/fasttext.cc:302:16: warning: ‘std::vector<int> fasttext::FastText::selectEmbeddings(int32_t) const’ is deprecated: selectEmbeddings is being deprecated. [-Wdeprecated-declarations]
     auto idx = selectEmbeddings(qargs.cutoff);
                ^
src/fasttext.cc:279:22: note: declared here
 std::vector<int32_t> FastText::selectEmbeddings(int32_t cutoff) const {
                      ^
src/fasttext.cc:302:45: warning: ‘std::vector<int> fasttext::FastText::selectEmbeddings(int32_t) const’ is deprecated: selectEmbeddings is being deprecated. [-Wdeprecated-declarations]
     auto idx = selectEmbeddings(qargs.cutoff);
                                             ^
src/fasttext.cc:279:22: note: declared here
 std::vector<int32_t> FastText::selectEmbeddings(int32_t cutoff) const {
                      ^
src/fasttext.cc: In member function ‘void fasttext::FastText::lazyComputeWordVectors()’:
src/fasttext.cc:531:5: warning: ‘void fasttext::FastText::precomputeWordVectors(fasttext::Matrix&)’ is deprecated: precomputeWordVectors is being deprecated. [-Wdeprecated-declarations]
     precomputeWordVectors(*wordVectors_);
     ^
src/fasttext.cc:514:6: note: declared here
 void FastText::precomputeWordVectors(Matrix& wordVectors) {
      ^
src/fasttext.cc:531:40: warning: ‘void fasttext::FastText::precomputeWordVectors(fasttext::Matrix&)’ is deprecated: precomputeWordVectors is being deprecated. [-Wdeprecated-declarations]
     precomputeWordVectors(*wordVectors_);
                                        ^
src/fasttext.cc:514:6: note: declared here
 void FastText::precomputeWordVectors(Matrix& wordVectors) {
      ^
src/fasttext.cc: In member function ‘void fasttext::FastText::trainThread(int32_t)’:
src/fasttext.cc:650:7: warning: ‘void fasttext::FastText::supervised(fasttext::Model&, fasttext::real, const std::vector<int>&, const std::vector<int>&)’ is deprecated: supervised is being deprecated. [-Wdeprecated-declarations]
       supervised(model, lr, line, labels);
       ^
src/fasttext.cc:338:6: note: declared here
 void FastText::supervised(
      ^
src/fasttext.cc:650:41: warning: ‘void fasttext::FastText::supervised(fasttext::Model&, fasttext::real, const std::vector<int>&, const std::vector<int>&)’ is deprecated: supervised is being deprecated. [-Wdeprecated-declarations]
       supervised(model, lr, line, labels);
                                         ^
src/fasttext.cc:338:6: note: declared here
 void FastText::supervised(
      ^
src/fasttext.cc:653:7: warning: ‘void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int>&)’ is deprecated: cbow is being deprecated. [-Wdeprecated-declarations]
       cbow(model, lr, line);
       ^
src/fasttext.cc:355:6: note: declared here
 void FastText::cbow(Model& model, real lr, const std::vector<int32_t>& line) {
      ^
src/fasttext.cc:653:27: warning: ‘void fasttext::FastText::cbow(fasttext::Model&, fasttext::real, const std::vector<int>&)’ is deprecated: cbow is being deprecated. [-Wdeprecated-declarations]
       cbow(model, lr, line);
                           ^
src/fasttext.cc:355:6: note: declared here
 void FastText::cbow(Model& model, real lr, const std::vector<int32_t>& line) {
      ^
src/fasttext.cc:656:7: warning: ‘void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int>&)’ is deprecated: skipgram is being deprecated. [-Wdeprecated-declarations]
       skipgram(model, lr, line);
       ^
src/fasttext.cc:371:6: note: declared here
 void FastText::skipgram(
      ^
src/fasttext.cc:656:31: warning: ‘void fasttext::FastText::skipgram(fasttext::Model&, fasttext::real, const std::vector<int>&)’ is deprecated: skipgram is being deprecated. [-Wdeprecated-declarations]
       skipgram(model, lr, line);
                               ^
src/fasttext.cc:371:6: note: declared here
 void FastText::skipgram(
      ^
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops args.o dictionary.o productquantizer.o matrix.o qmatrix.o vector.o model.o utils.o meter.o fasttext.o src/main.cc -o fasttext

我不知道是什么引起了错误。据我所知,这些是折旧警告,并且正在将其视为错误。无论如何,有抑制这种make行为的行为吗? 还是有其他安装快速文本的方法?

我从某处读取并尝试了make -i,但它也给出了相同的错误。

谢谢!

1 个答案:

答案 0 :(得分:0)

我在v0.9.1版本中遇到了同样的问题。它们只是警告。我的二进制文件仍然只带有警告。

DECLARE @OTHER TABLE (
    IDX INT IDENTITY PRIMARY KEY, 
    col1 INT, 
    col2 INT, 
    col3 INT, 
    ...
    ...
    prev_date DATETIME, 
    UNIQUE (COL1, prev_date, IDX) -- ADD AN INDEX ON COL1 + prev_date
    UNIQUE (prev_date, IDX) -- ADD AN INDEX ON prev_date
    )


SELECT *
INTO @OTHER
FROM other_table
WHERE COL2 IS NULL

INSERT INTO dest_tbl
SELECT col1, col2, col3...
FROM @SRC s
LEFT JOIN @OTHER ot on s.col1 = ot.col1 AND s.date > ot.prev_date