diff --git a/src/classify/tools/CMakeLists.txt b/src/classify/tools/CMakeLists.txt index 8f06bbea6..8572852e7 100644 --- a/src/classify/tools/CMakeLists.txt +++ b/src/classify/tools/CMakeLists.txt @@ -1,5 +1,9 @@ add_executable(classify classify.cpp) -target_link_libraries(classify meta-classify) +target_link_libraries(classify meta-classify + meta-sequence-analyzers + meta-parser-analyzers) add_executable(online-classify online-classify.cpp) -target_link_libraries(online-classify meta-classify) +target_link_libraries(online-classify meta-classify + meta-sequence-analyzers + meta-parser-analyzers) diff --git a/src/classify/tools/classify.cpp b/src/classify/tools/classify.cpp index a02c05dc7..bc90fc375 100644 --- a/src/classify/tools/classify.cpp +++ b/src/classify/tools/classify.cpp @@ -11,6 +11,8 @@ #include "classify/loss/all.h" #include "index/forward_index.h" #include "index/ranker/all.h" +#include "parser/analyzers/tree_analyzer.h" +#include "sequence/analyzers/ngram_pos_analyzer.h" #include "util/printing.h" #include "util/progress.h" #include "util/time.h" @@ -69,6 +71,11 @@ int main(int argc, char* argv[]) } logging::set_cerr_logging(); + + // Register additional analyzers + parser::register_analyzers(); + sequence::register_analyzers(); + auto config = cpptoml::parse_file(argv[1]); auto class_config = config.get_table("classifier"); if (!class_config) diff --git a/src/classify/tools/online-classify.cpp b/src/classify/tools/online-classify.cpp index 23d33d186..51e13c2a3 100644 --- a/src/classify/tools/online-classify.cpp +++ b/src/classify/tools/online-classify.cpp @@ -6,6 +6,8 @@ #include "classify/batch_training.h" #include "classify/classifier_factory.h" #include "logging/logger.h" +#include "parser/analyzers/tree_analyzer.h" +#include "sequence/analyzers/ngram_pos_analyzer.h" #include "util/time.h" int main(int argc, char* argv[]) @@ -19,6 +21,11 @@ int main(int argc, char* argv[]) } logging::set_cerr_logging(); + + // Register additional analyzers + parser::register_analyzers(); + sequence::register_analyzers(); + auto config = cpptoml::parse_file(argv[1]); auto class_config = config.get_table("classifier"); if (!class_config)