Skip to content

Commit

Permalink
Fix missing support for sequence/parser analyzers in classify.
Browse files Browse the repository at this point in the history
They worked fine for creating inverted indexes, but that change didn't get
propagated to creating forward indexes.
  • Loading branch information
skystrife committed Apr 10, 2015
1 parent c6a3b40 commit cc7116a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/classify/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
7 changes: 7 additions & 0 deletions src/classify/tools/classify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions src/classify/tools/online-classify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand All @@ -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)
Expand Down

0 comments on commit cc7116a

Please sign in to comment.