protected ArgumentComponent selectMainArgumentComponent ( List < ArgumentComponent > argumentComponents ) { ArgumentComponent result = null ; int maxLength = Integer . MIN_VALUE ; for ( ArgumentComponent argumentComponent : argumentComponents ) { int length = argumentComponent . getEnd ( ) - argumentComponent . getBegin ( ) ; if ( length > maxLength ) { maxLength = length ; result = argumentComponent ; } } if ( result == null ) { throw new IllegalStateException ( "Couldn't find maximum arg. component" ) ; } return result ; }
Selects the main argument component from a list of components that are present in the sentence ; currently the longest