code: private static final void processCellCartesianProduct(final CnfGrammar grammar, final Chart chart, final int start,
              final int end, final ChartCell cell, final Scorer scorer) {
          // Apply binary rules.
          for (int mid = start + 1; mid <= end - 1; mid++) {
              ChartCell leftCell = chart.getCell(start, mid);
              ChartCell rightCell = chart.getCell(mid, end);
              
              // Loop through all possible pairs of left/right non-terminals.
              for (final int leftChildNt : leftCell.getNts()) {
                  double leftScoreForNt = leftCell.getScore(leftChildNt);
                  for (final int rightChildNt : rightCell.getNts()) {
                      double rightScoreForNt = rightCell.getScore(rightChildNt);
                      // Lookup the rules with those left/right children.
                      for (final Rule r : grammar.getBinaryRulesWithChildren(leftChildNt, rightChildNt)) {
                          double score = scorer.score(r, start, mid, end) 
                                  + leftScoreForNt
                                  + rightScoreForNt;
                          cell.updateCell(r.getParent(), score, mid, r);
                      }
                  }
              }
          }
      }
docs: Process a cell (binary rules only) using the Cartesian product of the children's rules.
  
  This follows the description in (Dunlop et al., 2010).