gpl.pierrick.brihaye.aramorph.lucene
Class ArabicGlosser

java.lang.Object
  extended byorg.apache.lucene.analysis.TokenStream
      extended byorg.apache.lucene.analysis.TokenFilter
          extended bygpl.pierrick.brihaye.aramorph.lucene.ArabicGlosser

public class ArabicGlosser
extends org.apache.lucene.analysis.TokenFilter

A filter that will return english glosses from arabic stems.


Field Summary
protected  boolean debug
          Whether or not the analyzer should output debug messages
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
ArabicGlosser(org.apache.lucene.analysis.TokenStream input)
          Constructs a filter that will return english glosses from arabic stems.
ArabicGlosser(org.apache.lucene.analysis.TokenStream input, boolean debug)
          Constructs a filter that will return english glosses from arabic stems.
 
Method Summary
 AraMorph getAramorph()
          Returns the arabic morphological analyzer in use.
 org.apache.lucene.analysis.Token next()
          Returns the next token in the stream, or null at EOS.
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected boolean debug
Whether or not the analyzer should output debug messages

Constructor Detail

ArabicGlosser

public ArabicGlosser(org.apache.lucene.analysis.TokenStream input)
Constructs a filter that will return english glosses from arabic stems.

Parameters:
input - The token stream from a tokenizer

ArabicGlosser

public ArabicGlosser(org.apache.lucene.analysis.TokenStream input,
                     boolean debug)
Constructs a filter that will return english glosses from arabic stems.

Parameters:
input - The token stream from a tokenizer
debug - Whether or not the tokenizer should display convenience messages on System.out
Method Detail

getAramorph

public AraMorph getAramorph()
Returns the arabic morphological analyzer in use.

Returns:
The arabic morphological analyzer
See Also:
AraMorph

next

public final org.apache.lucene.analysis.Token next()
                                            throws java.io.IOException
Returns the next token in the stream, or null at EOS.

Returns:
The gloss with its type set to the grammatical category of the stem. Glosses with no identifiable grammatical category have their type set to NO_RESULT. termText() is the english gloss of the stem
Throws:
java.io.IOException - If a problem occurs
See Also:
Token.type()