From 74f6cf64352ba7f98fe73e778214bc55a7acec17 Mon Sep 17 00:00:00 2001 From: Agajan Torayev Date: Wed, 12 Dec 2018 12:06:21 +0100 Subject: [PATCH 1/2] Latest fasttext --- src/main/cpp/fastText | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cpp/fastText b/src/main/cpp/fastText index 9c9b9b2..501b9b1 160000 --- a/src/main/cpp/fastText +++ b/src/main/cpp/fastText @@ -1 +1 @@ -Subproject commit 9c9b9b2eca4fdc0182182cb69234fffbb847d820 +Subproject commit 501b9b1e4543fd2de55e4a621a9924ce7d2b5b17 From 98b25550803e123d968e8041e7cd28e760272de1 Mon Sep 17 00:00:00 2001 From: Agajan Torayev Date: Wed, 12 Dec 2018 12:24:08 +0100 Subject: [PATCH 2/2] new interface predictLine --- src/main/cpp/fasttext_wrapper.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/cpp/fasttext_wrapper.cc b/src/main/cpp/fasttext_wrapper.cc index ec5c90e..94eec05 100644 --- a/src/main/cpp/fasttext_wrapper.cc +++ b/src/main/cpp/fasttext_wrapper.cc @@ -74,7 +74,11 @@ namespace FastTextWrapper { const std::string& text, int32_t k) { std::vector> predictions; std::istringstream in(text); - fastText.predict(in, k, predictions); + + // temporary workaround + real th = 0.0; + + fastText.predictLine(in, predictions, k, th); return predictions; }