edu.iastate.jtm
Class SentenceParser

java.lang.Object
  extended by edu.iastate.jtm.SentenceParser

public class SentenceParser
extends java.lang.Object

Parse a paragraph into single sentences.

Version:
1.1
Author:
Jing Ding

Constructor Summary
SentenceParser()
           
 
Method Summary
 void copySentence(int count, java.nio.CharBuffer dst)
           
 int end(int count)
           
 java.lang.String[] getAll()
           
 int getCount()
           
 java.lang.String getSentence(int count)
           
static void main(java.lang.String[] args)
           
 int parse(java.lang.CharSequence sen)
          Parse a string into sentences.
 int parse(java.lang.CharSequence sen, boolean boundaryWithinParen)
          Parse a string into sentences.
 void printAll()
           
 int start(int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SentenceParser

public SentenceParser()
Method Detail

parse

public int parse(java.lang.CharSequence sen)
Parse a string into sentences. No sentence boundaries within parenthesis.

Parameters:
s - String to be parsed.
Returns:
number of parsed sentences.

parse

public int parse(java.lang.CharSequence sen,
                 boolean boundaryWithinParen)
Parse a string into sentences.

Parameters:
s - String to be parsed.
blackZone - If true, no sentence boundaries within parentheses.
Returns:
number of parsed sentences.

getCount

public int getCount()

start

public int start(int count)

end

public int end(int count)

getSentence

public java.lang.String getSentence(int count)

copySentence

public void copySentence(int count,
                         java.nio.CharBuffer dst)

getAll

public java.lang.String[] getAll()

printAll

public void printAll()

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments