Skip to content

Commit

Permalink
fixed problem with --language option not being passed to tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko van der Sloot authored and Ko van der Sloot committed Jan 2, 2019
1 parent 1660168 commit a315998
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ucto_tokenizer_mod.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ bool UctoTokenizer::init( const TiCC::Configuration& config ){
// it wil run in minimal mode then.
}
else {
string rulesName = config.lookUp( "rulesFile", "tokenizer" );
// when a languas (list) is specified on the command line,
// it overrules the language from the config file
string rulesName;
if ( language_list.empty() ){
rulesName = config.lookUp( "rulesFile", "tokenizer" );
}
if ( rulesName.empty() ){
if ( language_list.empty() ){
LOG << "no 'rulesFile' or 'languages' found in configuration" << endl;
Expand Down

0 comments on commit a315998

Please sign in to comment.