docs: private final void offerEntry(ChartEntry entry, double probability, int spanStart, int spanEnd) {
      int nextEntryIndex = chartSizes[spanStart][spanEnd];
      if (nextEntryIndex == chart[spanStart][spanEnd].length) {
        // Resize the arrays to fit the new entry.
        ChartEntry[] spanChart = chart[spanStart][spanEnd];
        double[] spanProbs = probabilities[spanStart][spanEnd];
        chart[spanStart][spanEnd] = Arrays.copyOf(spanChart, spanChart.length * 2);
        probabilities[spanStart][spanEnd] = Arrays.copyOf(spanProbs, spanChart.length * 2);
      }
  
      chart[spanStart][spanEnd][nextEntryIndex] = entry;
      probabilities[spanStart][spanEnd][nextEntryIndex] = probability;
      chartSizes[spanStart][spanEnd]++;
      totalChartSize++;
    }