src/retrieval based query topic analysis/src/edu/virginia/cs/utility/StringTokenizer.java
public List<String> TokenizeString(String string) {
        List<String> result = new ArrayList<>();
        try {
            TokenStream stream = analyzer.tokenStream(null, new StringReader(string));
            stream.reset();
            while (stream.incrementToken()) {
                result.add(stream.getAttribute(CharTermAttribute.class
                ).toString());
            }
            stream.end();
            stream.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return result;
    }
/**
     * Method that generates list of tokens from the parameter string.
     *
     * @param string
     * @return list of tokens generated
     */
Method that generates list of tokens from the parameter string.
@param string
@return list of tokens generated
Method that generates list of tokens from the parameter string . @param string @return list of tokens generated
public List<String> TokenizeString(String string) {
        List<String> result = new ArrayList<>();
        try {
            TokenStream stream = analyzer.tokenStream(null, new StringReader(string));
            stream.reset();
            while (stream.incrementToken()) {
                result.add(stream.getAttribute(CharTermAttribute.class
                ).toString());
            }
            stream.end();
            stream.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return result;
    }
public List < String > TokenizeString ( String string ) { List < String > result = new ArrayList < > ( ) ; try { TokenStream stream = analyzer . tokenStream ( null , new StringReader ( string ) ) ; stream . reset ( ) ; while ( stream . incrementToken ( ) ) { result . add ( stream . getAttribute ( CharTermAttribute . class ) . toString ( ) ) ; } stream . end ( ) ; stream . close ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } return result ; }
Method that generates list of tokens from the parameter string.
Method that generates list of tokens from the parameter string .