private static final void processCellUnaryRules ( final CnfGrammar grammar , final int start , final int end , final ChartCell cell , final Scorer scorer ) { // Apply unary rules. ScoresSnapshot scoresSnapshot = cell . getScoresSnapshot ( ) ; int [ ] nts = cell . getNts ( ) ; for ( final int parentNt : nts ) { for ( final Rule r : grammar . getUnaryRulesWithChild ( parentNt ) ) { double score = scorer . score ( r , start , end , end ) + scoresSnapshot . getScore ( r . getLeftChild ( ) ) ; cell . updateCell ( r . getParent ( ) , score , end , r ) ; } } }
Process a cell unary rules only .