|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectanalysis.parsing.EarleyParser
public class EarleyParser
Parser using Earley's algorithm.
| Constructor Summary | |
|---|---|
EarleyParser()
|
|
| Method Summary | |
|---|---|
static java.lang.Integer[] |
getNextParses()
Returns the next rightmost-derivation parses if exists. |
static boolean |
parse(MyGrammar myGrammar,
java.lang.String[] tokens)
Returns true if the sentence belongs to the grammar |
static java.lang.Integer[] |
parse2Parses(MyGrammar myGrammar,
java.lang.String[] tokens)
Returns the rightmost-derivation parses (production indices) if the sentence belongs to the grammar. |
static Tuple |
parsing(MyGrammar myGrammar,
java.lang.String[] tokens)
Returns the ultimate tuple if the sentence belongs to the grammar |
static java.lang.String[] |
partition(java.lang.String sentence)
Partitions a sentence into tokens. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EarleyParser()
| Method Detail |
|---|
public static Tuple parsing(MyGrammar myGrammar,
java.lang.String[] tokens)
myGrammar - the grammar for parsingtokens - the tokens of the sentence
public static boolean parse(MyGrammar myGrammar,
java.lang.String[] tokens)
myGrammar - the grammar for parsingtokens - the tokens of the sentence
public static java.lang.Integer[] parse2Parses(MyGrammar myGrammar,
java.lang.String[] tokens)
myGrammar - the grammar for parsingtokens - the tokens of the sentence
public static java.lang.Integer[] getNextParses()
public static java.lang.String[] partition(java.lang.String sentence)
sentence - the sentence to partition
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||