Skip to content

Commit

Permalink
fixed test assignment to Sentence
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 Apr 15, 2019
1 parent da1aed1 commit 14cd4c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/FrogAPI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,12 @@ folia::FoliaElement *FrogAPI::append_to_folia( folia::FoliaElement *root,
}
folia::LangAnnotation *la = new folia::LangAnnotation( args, root->doc() );
s->append( la );
string text = fd.sentence(); // get tokenized, space separated, sentence.
text = TiCC::trim( text );
if ( !text.empty() ){
s->settext( text );
if ( options.textredundancy == "full" ){
string text = fd.sentence(false); // get detokenized sentence.
text = TiCC::trim( text );
if ( !text.empty() ){
s->settext( s->str(options.outputclass), options.outputclass );
}
}
}
else {
Expand Down Expand Up @@ -1595,7 +1597,7 @@ void FrogAPI::run_folia_processor( const string& infilename,
if ( xmlOutFile.empty() ){
options.noStdOut = false;
}
folia::TextProcessor proc( infilename );
folia::TextEngine proc( infilename );
if ( !options.doTok ){
proc.declare( folia::AnnotationType::TOKEN, "passthru",
"annotator='ucto', annotatortype='auto', datetime='now()'" );
Expand Down
3 changes: 0 additions & 3 deletions src/ucto_tokenizer_mod.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,5 @@ vector<folia::Word*> UctoTokenizer::add_words( folia::Sentence* s,
}
wv.push_back( w );
}
if ( textredundancy == "full" ){
s->settext( s->str(textclass), textclass );
}
return wv;
}

0 comments on commit 14cd4c5

Please sign in to comment.