|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.nutch.analysis.NutchAnalysis
public class NutchAnalysis
The JavaCC-generated Nutch lexical analyzer and query parser.
Field Summary | |
---|---|
org.apache.nutch.analysis.Token |
jj_nt
Next token. |
org.apache.nutch.analysis.Token |
token
Current token. |
NutchAnalysisTokenManager |
token_source
Generated Token Manager. |
Fields inherited from interface org.apache.nutch.analysis.NutchAnalysisConstants |
---|
ACRONYM, APOSTROPHE, ATSIGN, C_PLUS_PLUS, C_SHARP, CJK, COLON, DEFAULT, DIGIT, DOT, EOF, IRREGULAR_WORD, LETTER, MINUS, PLUS, QUOTE, SIGRAM, SLASH, tokenImage, WHITE, WORD, WORD_PUNCT |
Constructor Summary | |
---|---|
NutchAnalysis(org.apache.nutch.analysis.CharStream stream)
Constructor with user supplied CharStream. |
|
NutchAnalysis(NutchAnalysisTokenManager tm)
Constructor with generated Token Manager. |
|
NutchAnalysis(String query,
Analyzer analyzer)
Constructs a nutch analysis. |
Method Summary | |
---|---|
ArrayList |
compound(String field)
Parse a compound term that is interpreted as an implicit phrase query. |
void |
disable_tracing()
Disable tracing. |
void |
enable_tracing()
Enable tracing. |
ParseException |
generateParseException()
Generate ParseException. |
org.apache.nutch.analysis.Token |
getNextToken()
Get the next Token. |
org.apache.nutch.analysis.Token |
getToken(int index)
Get the specific Token. |
void |
infix()
Characters which can be used to form compound terms. |
static boolean |
isStopWord(String word)
True iff word is a stop word. |
static void |
main(String[] args)
For debugging. |
void |
nonOpInfix()
Parse infix characters except plus and minus. |
void |
nonOpOrTerm()
Parse anything but a term or an operator (plur or minus or quote). |
void |
nonTerm()
Parse anything but a term or a quote. |
void |
nonTermOrEOF()
|
Query |
parse(Configuration conf)
Parse a query. |
static Query |
parseQuery(String queryString,
Analyzer analyzer,
Configuration conf)
Construct a query parser for the text in a reader. |
static Query |
parseQuery(String queryString,
Configuration conf)
Construct a query parser for the text in a reader. |
ArrayList |
phrase(String field)
Parse an explcitly quoted phrase query. |
void |
ReInit(org.apache.nutch.analysis.CharStream stream)
Reinitialise. |
void |
ReInit(NutchAnalysisTokenManager tm)
Reinitialise. |
String |
term()
Parse a single term. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public NutchAnalysisTokenManager token_source
public org.apache.nutch.analysis.Token token
public org.apache.nutch.analysis.Token jj_nt
Constructor Detail |
---|
public NutchAnalysis(String query, Analyzer analyzer)
public NutchAnalysis(org.apache.nutch.analysis.CharStream stream)
public NutchAnalysis(NutchAnalysisTokenManager tm)
Method Detail |
---|
public static boolean isStopWord(String word)
public static Query parseQuery(String queryString, Configuration conf) throws IOException
IOException
public static Query parseQuery(String queryString, Analyzer analyzer, Configuration conf) throws IOException
IOException
public static void main(String[] args) throws Exception
Exception
public final Query parse(Configuration conf) throws ParseException
ParseException
public final ArrayList phrase(String field) throws ParseException
ParseException
public final ArrayList compound(String field) throws ParseException
ParseException
public final String term() throws ParseException
ParseException
public final void nonTerm() throws ParseException
ParseException
public final void nonTermOrEOF() throws ParseException
ParseException
public final void nonOpOrTerm() throws ParseException
ParseException
public final void infix() throws ParseException
ParseException
public final void nonOpInfix() throws ParseException
ParseException
public void ReInit(org.apache.nutch.analysis.CharStream stream)
public void ReInit(NutchAnalysisTokenManager tm)
public final org.apache.nutch.analysis.Token getNextToken()
public final org.apache.nutch.analysis.Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |