Class ChartParser

java.lang.Object
edu.tufts.hrilab.slug.parsing.tldl.chart.ChartParser

public class ChartParser extends Object
  • Constructor Details

    • ChartParser

      public ChartParser()
  • Method Details

    • resetChart

      public void resetChart()
    • parseIncrementally

      public List<Node> parseIncrementally(Utterance input, Dictionary dictionary)
    • doChartParsingWithDP

      public void doChartParsingWithDP(Utterance input, Dictionary dictionary, int previousChartSize)
      Executes dynamic programming-based chart parsing on the provided input utterance. This method tokenizes the input, initializes and updates the chart, and combines spans using available parsing rules and syntax.
      Parameters:
      input - the utterance to be parsed, containing words for tokenization and chart creation
    • doChartParsingIncrementally

      public void doChartParsingIncrementally(Utterance input, Dictionary dictionary)
    • getParsesFromChartCell

      public List<Node> getParsesFromChartCell(int start, int end)
      Retrieves all valid parses from a specific cell in the chart.
      Parameters:
      start - The start index of the chart cell.
      end - The end index of the chart cell.
      Returns:
      List of Utterance objects representing possible parses.
    • hasUnkownTokens

      public boolean hasUnkownTokens()
    • getFirstUnknownTokens

      public String getFirstUnknownTokens()