Skip to content

Commit 5aa973e

Browse files
committed
Merge branch 'master' of github.com:LanguageMachines/frog
2 parents 9e9d625 + 6832ffa commit 5aa973e

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

docs/Frog_clin29_2019_poster.pdf

12.8 MB
Binary file not shown.

src/FrogAPI.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ folia::FoliaElement* FrogAPI::start_document( const string& id,
561561
folia::KWargs args;
562562
args["xml:id"] = doc->id() + ".text";
563563
folia::Text *text = new folia::Text( args );
564-
doc->setRoot( text );
564+
doc->addText( text );
565565
return text;
566566
}
567567

@@ -632,10 +632,12 @@ folia::FoliaElement *FrogAPI::append_to_folia( folia::FoliaElement *root,
632632
}
633633
folia::LangAnnotation *la = new folia::LangAnnotation( args, root->doc() );
634634
s->append( la );
635-
string text = fd.sentence(); // get tokenized, space separated, sentence.
636-
text = TiCC::trim( text );
637-
if ( !text.empty() ){
638-
s->settext( text );
635+
if ( options.textredundancy == "full" ){
636+
string text = fd.sentence(false); // get detokenized sentence.
637+
text = TiCC::trim( text );
638+
if ( !text.empty() ){
639+
s->settext( s->str(options.outputclass), options.outputclass );
640+
}
639641
}
640642
}
641643
else {
@@ -1595,7 +1597,7 @@ void FrogAPI::run_folia_processor( const string& infilename,
15951597
if ( xmlOutFile.empty() ){
15961598
options.noStdOut = false;
15971599
}
1598-
folia::TextProcessor proc( infilename );
1600+
folia::TextEngine proc( infilename );
15991601
if ( !options.doTok ){
16001602
proc.declare( folia::AnnotationType::TOKEN, "passthru",
16011603
"annotator='ucto', annotatortype='auto', datetime='now()'" );

src/ucto_tokenizer_mod.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,5 @@ vector<folia::Word*> UctoTokenizer::add_words( folia::Sentence* s,
427427
}
428428
wv.push_back( w );
429429
}
430-
if ( textredundancy == "full" ){
431-
s->settext( s->str(textclass), textclass );
432-
}
433430
return wv;
434431
}

0 commit comments

Comments
 (0)