Class ChartParser
java.lang.Object
edu.tufts.hrilab.slug.parsing.tldl.chart.ChartParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoChartParsingIncrementally(Utterance input, Dictionary dictionary) voiddoChartParsingWithDP(Utterance input, Dictionary dictionary, int previousChartSize) Executes dynamic programming-based chart parsing on the provided input utterance.getParsesFromChartCell(int start, int end) Retrieves all valid parses from a specific cell in the chart.booleanparseIncrementally(Utterance input, Dictionary dictionary) void
-
Constructor Details
-
ChartParser
public ChartParser()
-
-
Method Details
-
resetChart
public void resetChart() -
parseIncrementally
-
doChartParsingWithDP
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
-
getParsesFromChartCell
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
-