de.aitools.ie.decomposition.word.jflex
Class WordLexerWrapper

java.lang.Object
  extended by de.aitools.ie.decomposition.word.jflex.WordLexerWrapper

public class WordLexerWrapper
extends java.lang.Object

Use this class an interface to WordLexer. As WordLexer is automatically created, there are several methods and constructors to be hidden. So WordLexer is nut public.

Version:
aitools 2.0 Created on 19.09.2008 $Id: WordLexerWrapper.java,v 1.2 2011/02/15 10:32:45 hoppe Exp $
Author:
Fabian Loose

Constructor Summary
WordLexerWrapper(java.lang.String text, boolean asSubstring)
          Use this class an interface to WordLexer.
 
Method Summary
 java.util.List<Span> getSpans()
          Get the list of recognized words as Spans.
 java.util.List<java.lang.String> getWords()
          Get the list of recognized words.
 void scan()
          Start scanning the text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordLexerWrapper

public WordLexerWrapper(java.lang.String text,
                        boolean asSubstring)
Use this class an interface to WordLexer. As WordLexer is automatically created, there are several methods and constructors to be hidden. So WordLexer is nut public.

Parameters:
text - The text to be lexed.
asSubstring - If asSubstring == true the Lexer keeps recognized words in a list of text.substring(). Otherwise the list is filled by new String(text.substring()).
Method Detail

scan

public void scan()
          throws java.io.IOException
Start scanning the text.

Throws:
java.io.IOException

getSpans

public java.util.List<Span> getSpans()
Get the list of recognized words as Spans. A Span consists of the start and end index of a word in the given text.

Returns:

getWords

public java.util.List<java.lang.String> getWords()
Get the list of recognized words.

Returns: