Skip to content

Commit edc506c

Browse files
committed
minimal refactoring
1 parent 1dd6268 commit edc506c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/mwu_chunker_mod.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void Mwu::Classify(){
393393
}
394394
}
395395
} //for (i < max)
396-
if (matchLength > 0 ) {
396+
if ( matchLength > 0 ) {
397397
//concat
398398
if ( debug >1 ){
399399
DBG << "mwu found, processing" << endl;
@@ -434,17 +434,17 @@ void Mwu::add_result( const frog_data& fd,
434434
{
435435
el = s->add_child<folia::EntitiesLayer>( args );
436436
}
437-
for ( const auto& mwu : fd.mwus ){
438-
if ( !el->id().empty() ){
439-
args["generate_id"] = el->id();
440-
}
441-
if ( textclass != "current" ){
442-
args["textclass"] = textclass;
443-
}
437+
if ( !el->id().empty() ){
438+
args["generate_id"] = el->id();
439+
}
440+
if ( textclass != "current" ){
441+
args["textclass"] = textclass;
442+
}
443+
for ( const auto& [start,end] : fd.mwus ){
444444
#pragma omp critical (foliaupdate)
445445
{
446446
folia::Entity *e = el->add_child<folia::Entity>( args );
447-
for ( size_t pos = mwu.first; pos <= mwu.second; ++pos ){
447+
for ( size_t pos = start; pos <= end; ++pos ){
448448
e->append( wv[pos] );
449449
}
450450
}

0 commit comments

Comments
 (0)