Skip to content
Snippets Groups Projects
Commit d7fa650f authored by Aleksandr Shatrovskii's avatar Aleksandr Shatrovskii Committed by Jan Trávníček
Browse files

Let aarbology know about normalization algo (normalizeTreeLabels)

parent 6c6ade6e
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <arbology/exact/ExactNonlinearTreePatternAutomaton.h> #include <arbology/exact/ExactNonlinearTreePatternAutomaton.h>
#include <tree/properties/ExactSubtreeRepeatsNaive.h> #include <tree/properties/ExactSubtreeRepeatsNaive.h>
#include <tree/properties/ExactSubtreeRepeats.h> #include <tree/properties/ExactSubtreeRepeats.h>
#include <tree/NormalizeTreeLabels.h>
#include <arbology/transform/BeginToEndIndex.h> #include <arbology/transform/BeginToEndIndex.h>
#include <arbology/indexing/CompressedBitParallelIndexConstruction.h> #include <arbology/indexing/CompressedBitParallelIndexConstruction.h>
#include <arbology/indexing/FullAndLinearIndexConstruction.h> #include <arbology/indexing/FullAndLinearIndexConstruction.h>
...@@ -61,6 +62,7 @@ int main ( int argc, char * argv[] ) { ...@@ -61,6 +62,7 @@ int main ( int argc, char * argv[] ) {
   
allowed.push_back ( "exactSubtreeRepeatsNaive" ); allowed.push_back ( "exactSubtreeRepeatsNaive" );
allowed.push_back ( "exactSubtreeRepeats" ); allowed.push_back ( "exactSubtreeRepeats" );
allowed.push_back ( "normalizeTreeLabels" );
allowed.push_back ( "badCharacterShiftTable" ); allowed.push_back ( "badCharacterShiftTable" );
TCLAP::ValuesConstraint < std::string > allowedVals ( allowed ); TCLAP::ValuesConstraint < std::string > allowedVals ( allowed );
   
...@@ -262,6 +264,18 @@ int main ( int argc, char * argv[] ) { ...@@ -262,6 +264,18 @@ int main ( int argc, char * argv[] ) {
measurements::end ( ); measurements::end ( );
measurements::start ( "Output write", measurements::Type::AUXILIARY ); measurements::start ( "Output write", measurements::Type::AUXILIARY );
   
alib::XmlDataFactory::toStdout ( res );
} else if ( algorithm.getValue ( ) == "normalizeTreeLabels" ) {
tree::Tree subject = alib::XmlDataFactory::fromTokens ( std::move ( sax::FromXMLParserHelper::parseInput(true, subjectInput).front ( ) ) );
measurements::end ( );
measurements::start ( "Algorithm", measurements::Type::MAIN );
tree::Tree res = tree::NormalizeTreeLabels::normalize ( subject );
measurements::end ( );
measurements::start ( "Output write", measurements::Type::AUXILIARY );
alib::XmlDataFactory::toStdout ( res ); alib::XmlDataFactory::toStdout ( res );
} else if ( algorithm.getValue ( ) == "exactSubtreeRepeats" ) { } else if ( algorithm.getValue ( ) == "exactSubtreeRepeats" ) {
tree::Tree subject = alib::XmlDataFactory::fromTokens ( std::move ( sax::FromXMLParserHelper::parseInput(true, subjectInput).front ( ) ) ); tree::Tree subject = alib::XmlDataFactory::fromTokens ( std::move ( sax::FromXMLParserHelper::parseInput(true, subjectInput).front ( ) ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment