Pep 0.4 API Documentation
A C D E F G H I L M N O P R S T V

A

addEdge(Integer, Edge) - Method in class edu.osu.ling.pep.Chart
Adds an edge to this chart at the given index.
addRule(Rule) - Method in class edu.osu.ling.pep.Grammar
Adds a production rule.
advanceDot(DottedRule) - Static method in class edu.osu.ling.pep.DottedRule
Creates and returns a new dotted rule exactly like the one provided except that its dot position is advanced by 1.

C

Category - Class in edu.osu.ling.pep
A category in a grammar.
Category(String) - Constructor for class edu.osu.ling.pep.Category
Creates a new non-terminal category with the specified name.
Category(String, boolean) - Constructor for class edu.osu.ling.pep.Category
Creates a new category name with the specified terminal status.
Chart - Class in edu.osu.ling.pep
A chart produced by an Earley parser.
Chart() - Constructor for class edu.osu.ling.pep.Chart
Creates a new chart, initializing its internal data structure.
Chart(Chart) - Constructor for class edu.osu.ling.pep.Chart
Creates a new chart based on the specified chart.
clear() - Method in class edu.osu.ling.pep.Chart
Removes all edges from this map at all indices (if any are present).
complete(Edge, Edge) - Static method in class edu.osu.ling.pep.Edge
Completes the specified edge based on the specified basis.
contains(Edge) - Method in class edu.osu.ling.pep.Chart
Tests whether this chart contains the specified edge.
containsEdges(Integer) - Method in class edu.osu.ling.pep.Chart
Tests whether this chart contains any edges at a given string index.
containsOption(ParserOption) - Method in class edu.osu.ling.pep.EarleyParser
Tests whether this parser has a defined option identified by the specified option name.
containsRules(Category) - Method in class edu.osu.ling.pep.Grammar
Tests whether this grammar contains rules for the specified left side category.
countEdges() - Method in class edu.osu.ling.pep.Chart
Counts the total number of edges contained in this chart, at any index.

D

DottedRule - Class in edu.osu.ling.pep
Extension of Rule that maintains a dot position within the rule.
DottedRule(Rule) - Constructor for class edu.osu.ling.pep.DottedRule
Creates a new dotted rule for the given rule, with a dot position at the beginning of the rule's right side (position 0).
DottedRule(Rule, int) - Constructor for class edu.osu.ling.pep.DottedRule
Creates a dotted rule maintaining the dot position within the right side category sequence of the underlying rule.

E

EarleyParser - Class in edu.osu.ling.pep
An Earley parser, named after the inventor of the algorithm it implements.
EarleyParser(Grammar) - Constructor for class edu.osu.ling.pep.EarleyParser
Creates a new Earley parser for the specified grammar.
EarleyParser(Grammar, ParserListener) - Constructor for class edu.osu.ling.pep.EarleyParser
Creates a new Earley parser for the given set of production rules with the specified listener.
Edge - Class in edu.osu.ling.pep
An edge in a chart produced by an Earley parser.
Edge(DottedRule, int) - Constructor for class edu.osu.ling.pep.Edge
Creates an edge containing the specified dotted rule at the origin position given.
Edge(DottedRule, int, Set<Edge>) - Constructor for class edu.osu.ling.pep.Edge
Creates an edge for the specified dotted rule and origin position, with the given set of edges as bases for its completion.
edgeCompleted(EdgeEvent) - Method in interface edu.osu.ling.pep.ParserListener
Notifies a listener that an edge was added to the chart based on completion.
edgeCompleted(EdgeEvent) - Method in class edu.osu.ling.pep.Pep
Consumes events generated when edges are added to the parser's chart because of completion.
EdgeEvent - Class in edu.osu.ling.pep
An event generated when an edge is added to a chart in Earley parsing.
edgePredicted(EdgeEvent) - Method in interface edu.osu.ling.pep.ParserListener
Signals to a listener that an edge was added to the chart based on a prediction from the grammar.
edgePredicted(EdgeEvent) - Method in class edu.osu.ling.pep.Pep
Consumes events generated when edges are added to the parser's chart because of prediction.
edgeScanned(EdgeEvent) - Method in interface edu.osu.ling.pep.ParserListener
Lets the listener know that a token was scanned from the input string.
edgeScanned(EdgeEvent) - Method in class edu.osu.ling.pep.Pep
Consumes events generated when the parser scans a token from the input string.
edu.osu.ling.pep - package edu.osu.ling.pep
 
equals(Object) - Method in class edu.osu.ling.pep.Category
Tests whether this category is equal to another.
equals(Object) - Method in class edu.osu.ling.pep.Chart
Tests whether this chart is equal to another by comparing their internal data structures.
equals(Object) - Method in class edu.osu.ling.pep.DottedRule
Tests whether this dotted rule is equal to another dotted rule by comparing their underlying rules and dot positions.
equals(Object) - Method in class edu.osu.ling.pep.Edge
Tests whether this edge is equal to another edge by comparing their dotted rules, origin positions, and basis edges.
equals(Object) - Method in class edu.osu.ling.pep.Parse
Tests whether this parse equals another by comparing their tokens, seed categories, and completed charts.
equals(Object) - Method in class edu.osu.ling.pep.ParseTree
Tests whether this parse tree is equal to another by comparing its node, parent, and child parse trees.
equals(Object) - Method in class edu.osu.ling.pep.Rule
Tests whether this rule is equal to another, with the same left and right sides.

F

firstIndex() - Method in class edu.osu.ling.pep.Chart
Gets the first index in this chart that contains edges.

G

getActiveCategory() - Method in class edu.osu.ling.pep.DottedRule
Gets the active category in the underlying rule, if any.
getAllRules() - Method in class edu.osu.ling.pep.Grammar
Gets every rule in this grammar.
getBases() - Method in class edu.osu.ling.pep.Edge
Gets the bases for completion of this edge, in order of insertion.
getCause() - Method in class edu.osu.ling.pep.ParseErrorEvent
Gets the exception that caused this error event to be generated.
getChart() - Method in class edu.osu.ling.pep.Parse
Gets the completed chart for this parse.
getChildren() - Method in class edu.osu.ling.pep.ParseTree
Gets the child parse trees of this parse tree, retaining their linear ordering.
getDefaultValue() - Method in enum edu.osu.ling.pep.ParserOption
Gets the default value for this option.
getDottedRule() - Method in class edu.osu.ling.pep.Edge
Gets this edge's dotted rule.
getEarleyParser() - Method in class edu.osu.ling.pep.ParserEvent
Gets the Earley parser that generated this event.
getEdge() - Method in class edu.osu.ling.pep.EdgeEvent
Gets the edge whose addition generated this event.
getEdges(Integer) - Method in class edu.osu.ling.pep.Chart
Gets the edges in this chart at a given index.
getGrammar() - Method in class edu.osu.ling.pep.EarleyParser
The grammar where this parser looks up its production rules.
getIndex() - Method in class edu.osu.ling.pep.EdgeEvent
Gets the index where this event occurred.
getIndex() - Method in class edu.osu.ling.pep.ParseEvent
Gets the string index where this event occurred.
getLeft() - Method in class edu.osu.ling.pep.Rule
Gets the left side category of this rule.
getListener() - Method in class edu.osu.ling.pep.EarleyParser
Gets the listener currently receiving events from this parser.
getName() - Method in class edu.osu.ling.pep.Category
Gets the name of this category.
getName() - Method in class edu.osu.ling.pep.Grammar
Gets the name of this grammar.
getNode() - Method in class edu.osu.ling.pep.ParseTree
Gets the node category of this parse tree.
getOption(ParserOption) - Method in class edu.osu.ling.pep.EarleyParser
Gets the value of the option with the specified name.
getOption() - Method in class edu.osu.ling.pep.ParserOptionEvent
Gets the option that was set.
getOrigin() - Method in class edu.osu.ling.pep.Edge
Gets this edge's origin position.
getParent() - Method in class edu.osu.ling.pep.ParseTree
Gets the parent parse tree, if any.
getParse() - Method in class edu.osu.ling.pep.ParseEvent
Gets the parse associated with this event.
getParseTreeFor(Edge) - Method in class edu.osu.ling.pep.Parse
Gets a parse tree corresponding to the given edge.
getParseTrees() - Method in class edu.osu.ling.pep.Parse
Gets completed parse trees for the seed category spanning the entire input string.
getParseTreesFor(Category, int, int) - Method in class edu.osu.ling.pep.Parse
Gets the parse trees derived during this parse with the specified category as their parent's left side.
getPosition() - Method in class edu.osu.ling.pep.DottedRule
Gets the dot position within the underlying rule's right side category sequence.
getRight() - Method in class edu.osu.ling.pep.Rule
Gets the series of categories on the right side of this rule.
getRules(Category) - Method in class edu.osu.ling.pep.Grammar
Gets the set of rules contained by this grammar with the given left side category.
getSeed() - Method in class edu.osu.ling.pep.Parse
Gets the seed category for this parse.
getStatus() - Method in class edu.osu.ling.pep.Parse
Gets the status of this parse.
getTokens() - Method in class edu.osu.ling.pep.Parse
Gets the tokens parsed.
getValue() - Method in class edu.osu.ling.pep.ParserOptionEvent
Gets the value that was set for the option.
Grammar - Class in edu.osu.ling.pep
Represents a context-free grammar (set of production rules).
Grammar(String) - Constructor for class edu.osu.ling.pep.Grammar
Creates a grammar with the given name, initializes its internal data structure.

H

hashCode() - Method in class edu.osu.ling.pep.Category
Computes a hash code for this category based on its name and terminal status.
hashCode() - Method in class edu.osu.ling.pep.Chart
Computes a hash code for this chart based on its internal data structure.
hashCode() - Method in class edu.osu.ling.pep.DottedRule
Computes a hash code for this dotted rule based on its underlying rule and dot position.
hashCode() - Method in class edu.osu.ling.pep.Edge
Computes a hash code for this edge based on its dotted rule, origin position, and bases.
hashCode() - Method in class edu.osu.ling.pep.Parse
Computes a hash code for this parse based on its tokens, seed category, and chart.
hashCode() - Method in class edu.osu.ling.pep.ParseTree
Computes a hash code for this parse tree based on its underlying edge and child parse trees.
hashCode() - Method in class edu.osu.ling.pep.Rule
Compues a hash code for this rule based on its left and right side categories.
headChart(Integer) - Method in class edu.osu.ling.pep.Chart
Gets a head chart of this chart (a chart containing only the indices from 0 to to).

I

indexOf(Edge) - Method in class edu.osu.ling.pep.Chart
Gets the index of the specified edge in this chart.
indices() - Method in class edu.osu.ling.pep.Chart
Gets the set of indices at which this chart contains edges.
isEmpty() - Method in class edu.osu.ling.pep.Chart
Tests whether this chart contains any edges at any index.
isPassive() - Method in class edu.osu.ling.pep.Edge
Tests whether this is a passive edge or not.
isPreterminal() - Method in class edu.osu.ling.pep.Rule
Tests whether this rule is a pre-terminal production rule.
isSingletonPreterminal() - Method in class edu.osu.ling.pep.Rule
Tests whether this rule is a pre-terminal with a right side of length 1.
isTerminal() - Method in class edu.osu.ling.pep.Category
Gets the terminal status of this category.

L

lastIndex() - Method in class edu.osu.ling.pep.Chart
Gets the last index in this chart that contains edges.

M

main(String[]) - Static method in class edu.osu.ling.pep.Pep
Invokes Pep from the command line.

N

newParseTree(Edge) - Static method in class edu.osu.ling.pep.ParseTree
Creates a parse tree based on the specified edge that is the root of the resulting parse tree.
newParseTree(Edge, ParseTree) - Static method in class edu.osu.ling.pep.ParseTree
Creates a new parse tree based on the specified edge and parent tree.

O

optionSet(ParserOptionEvent) - Method in interface edu.osu.ling.pep.ParserListener
Lets the listener know that an option was set on an Earley parser.
optionSet(ParserOptionEvent) - Method in class edu.osu.ling.pep.Pep
Consumes events generated when options are set on the parser.

P

parse(String, Category) - Method in class edu.osu.ling.pep.EarleyParser
Convenience method for parsing a string of tokens separated by spaces.
parse(String, String, Category) - Method in class edu.osu.ling.pep.EarleyParser
Convenience method for parsing a string of tokens separated by a specified string.
parse(Iterable<String>, Category) - Method in class edu.osu.ling.pep.EarleyParser
Gets a parse for the specified string (iterable series of tokens) and seed category.
Parse - Class in edu.osu.ling.pep
Represents a parse completed by an Earley parser.
parseComplete(ParseEvent) - Method in interface edu.osu.ling.pep.ParserListener
Called when parsing completes.
parseComplete(ParseEvent) - Method in class edu.osu.ling.pep.Pep
Consumes events generated when the parser completes a parse.
parseError(ParseErrorEvent) - Method in interface edu.osu.ling.pep.ParserListener
Notifies a listener that an error occurred during parsing.
parseError(ParseErrorEvent) - Method in class edu.osu.ling.pep.Pep
 
ParseErrorEvent - Class in edu.osu.ling.pep
An event triggered when an error occurs during parsing.
ParseEvent - Class in edu.osu.ling.pep
An event generated by an Earley parser having to do with a completed parse.
ParseEvent(EarleyParser, Integer, Parse) - Constructor for class edu.osu.ling.pep.ParseEvent
Creates a new event concerning the specified parse.
parseMessage(ParseEvent, String) - Method in interface edu.osu.ling.pep.ParserListener
Notifies the listener of a message from the parser.
parseMessage(ParseEvent, String) - Method in class edu.osu.ling.pep.Pep
 
ParserEvent - Class in edu.osu.ling.pep
Abstract class for Earley parser events.
ParserEvent(EarleyParser) - Constructor for class edu.osu.ling.pep.ParserEvent
Creates an event generated by the specified parser.
ParserListener - Interface in edu.osu.ling.pep
Listens to an Earley parser, receiving notifications as the parser adds edges to the chart or scans the input string.
ParserOption - Enum in edu.osu.ling.pep
An option used to configure an Earley parser.
ParserOptionEvent - Class in edu.osu.ling.pep
An event generated by an option being set on an Earley parser.
parserSeeded(EdgeEvent) - Method in interface edu.osu.ling.pep.ParserListener
Notifies a listener that the parser was seeded with a start category.
parserSeeded(EdgeEvent) - Method in class edu.osu.ling.pep.Pep
Consumes events generated when the parser is seeded.
ParseTree - Class in edu.osu.ling.pep
A parse tree that represents the derivation of a string based on the rules in a Grammar.
ParseTree(Category, ParseTree) - Constructor for class edu.osu.ling.pep.ParseTree
Creates a new parse tree with the specified category and parent parse tree.
ParseTree(Category, ParseTree, ParseTree[]) - Constructor for class edu.osu.ling.pep.ParseTree
Creates a new parse tree with the specified category, parent, and child trees.
Pep - Class in edu.osu.ling.pep
Command line front end for Earley parsers.
PepException - Exception in edu.osu.ling.pep
An exception thrown in the process of running Pep.
predictFor(Rule, int) - Static method in class edu.osu.ling.pep.Edge
Makes a predicted edge based on the specified rule, with the specified origin position.

R

recognize(String, Category) - Method in class edu.osu.ling.pep.EarleyParser
Convenience method for recognizing a string of tokens separated by spaces.
recognize(String, String, Category) - Method in class edu.osu.ling.pep.EarleyParser
Convenience method for recognizing a string of tokens separated by spaces.
recognize(Iterable<String>, Category) - Method in class edu.osu.ling.pep.EarleyParser
Tests whether this parser recognizes a given string (list of tokens) for the specified seed category.
Rule - Class in edu.osu.ling.pep
Represents a production rule in a context-free grammar.
Rule(Category, Category...) - Constructor for class edu.osu.ling.pep.Rule
Creates a new rule with the specified left side category and series of categories on the right side.

S

scan(Edge, String) - Static method in class edu.osu.ling.pep.Edge
Creates an edge based on the given edge and the token that was just scanned.
setGrammar(Grammar) - Method in class edu.osu.ling.pep.EarleyParser
Sets the grammar this parser uses to look up its production rules.
setListener(ParserListener) - Method in class edu.osu.ling.pep.EarleyParser
Sets the listener that will receive notification of events during parsing.
setOption(ParserOption, Boolean) - Method in class edu.osu.ling.pep.EarleyParser
Sets an option on this parser instance with the specified name.
START - Static variable in class edu.osu.ling.pep.Category
Special start category for seeding Earley parsers.
startRule(Category) - Static method in class edu.osu.ling.pep.DottedRule
Creates a new start rule for a given seed category.
Status - Enum in edu.osu.ling.pep
Reflects the status of a parse completed by an Earley parser.
subChart(Integer, Integer) - Method in class edu.osu.ling.pep.Chart
Gets a sub chart of this chart.

T

tailChart(Integer) - Method in class edu.osu.ling.pep.Chart
Gets a tail chart of this chart (a chart containing only the indices from from to the size of its Chart.indices()).
toString() - Method in class edu.osu.ling.pep.Category
Gets a string representation of this category.
toString() - Method in class edu.osu.ling.pep.Chart
Gets a string representation of this chart.
toString() - Method in class edu.osu.ling.pep.DottedRule
Gets a string representation of this dotted rule.
toString() - Method in class edu.osu.ling.pep.EarleyParser
Gets a string representation of this Earley parser.
toString() - Method in class edu.osu.ling.pep.Edge
Gets a string representation of this edge.
toString() - Method in class edu.osu.ling.pep.Grammar
Gets a string representation of this grammar.
toString() - Method in class edu.osu.ling.pep.Parse
Gets a string representation of this chart.
toString() - Method in enum edu.osu.ling.pep.ParserOption
Gets a string representation of this Earley parser option.
toString() - Method in class edu.osu.ling.pep.ParseTree
Gets a string representation of this parse tree.
toString() - Method in class edu.osu.ling.pep.Rule
Gets a string representation of this rule.

V

valueOf(String) - Static method in enum edu.osu.ling.pep.ParserOption
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum edu.osu.ling.pep.Status
Returns the enum constant of this type with the specified name.
values() - Static method in enum edu.osu.ling.pep.ParserOption
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum edu.osu.ling.pep.Status
Returns an array containing the constants of this enum type, in the order they're declared.

A C D E F G H I L M N O P R S T V
Pep: Pep is an Earley parser

Pep API Documentation, Copyright © 2007 Scott Martin

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the overview file.