/** * trivial implementation: * -- run each type of comparator over all constituents * -- keep a set of scores for each comparison made * @param specific_ Text view, typically longer * @param general_ Hypothesis view, typically shorter */ public ViewAlignment align( View specific_, View general_ ) { ViewAlignment viewAlignment = new ViewAlignment(); for( Constituent h: general_.getConstituents() ) { for ( Constituent t: specific_.getConstituents() ) { for ( ConstituentComparator cptr : m_constituentComparators ) { Result r = cptr.compare( t, h ); viewAlignment.addResult( t, h, r ); } } } return viewAlignment; }
/** * trivial implementation: * -- run each type of comparator over all constituents * -- keep a set of scores for each comparison made * @param specific_ A View presumed to represent elements of a more specific text * @param general_ A View presumed to represent elements of a more general text * @return an alignment between the two Views */ public ViewAlignment align( View specific_, View general_ ) { ViewAlignment viewAlignment = new ViewAlignment(); for( Constituent h: general_.getConstituents() ) { for ( Constituent t: specific_.getConstituents() ) { for ( ConstituentComparator cptr : m_constituentComparators ) { Result r = cptr.compare( t, h ); viewAlignment.addResult( t, h, r ); } } } return viewAlignment; }