summaryrefslogtreecommitdiff
path: root/gi/pyp-topics/src
diff options
context:
space:
mode:
Diffstat (limited to 'gi/pyp-topics/src')
-rw-r--r--gi/pyp-topics/src/Makefile.am4
-rw-r--r--gi/pyp-topics/src/contexts_corpus.hh4
2 files changed, 5 insertions, 3 deletions
diff --git a/gi/pyp-topics/src/Makefile.am b/gi/pyp-topics/src/Makefile.am
index 7ca269a5..e4c4c1b9 100644
--- a/gi/pyp-topics/src/Makefile.am
+++ b/gi/pyp-topics/src/Makefile.am
@@ -4,10 +4,10 @@ contexts_lexer.cc: contexts_lexer.l
$(LEX) -s -CF -8 -o$@ $<
pyp_topics_train_SOURCES = corpus.cc gammadist.c gzstream.cc mt19937ar.c pyp-topics.cc train.cc contexts_lexer.cc contexts_corpus.cc
-pyp_topics_train_LDADD = -lz
+pyp_topics_train_LDADD = $(top_srcdir)/decoder/libcdec.a -lz
pyp_contexts_train_SOURCES = corpus.cc gammadist.c gzstream.cc mt19937ar.c pyp-topics.cc contexts_lexer.cc contexts_corpus.cc train-contexts.cc
-pyp_contexts_train_LDADD = -lz
+pyp_contexts_train_LDADD = $(top_srcdir)/decoder/libcdec.a -lz
AM_CPPFLAGS = -W -Wall -Wno-sign-compare -funroll-loops
diff --git a/gi/pyp-topics/src/contexts_corpus.hh b/gi/pyp-topics/src/contexts_corpus.hh
index 9614e7e3..a55e52f2 100644
--- a/gi/pyp-topics/src/contexts_corpus.hh
+++ b/gi/pyp-topics/src/contexts_corpus.hh
@@ -60,7 +60,9 @@ public:
}
std::vector<std::string> context2string(const WordID& id) const {
- return m_dict.AsVector(id);
+ std::vector<std::string> res;
+ m_dict.AsVector(id, &res);
+ return res;
}
const std::string& key(const int& i) const {