edu.stanford.nlp.trees
Class AdwaitSentenceReaderFactory

java.lang.Object
  |
  +--edu.stanford.nlp.trees.AdwaitSentenceReaderFactory
All Implemented Interfaces:
SentenceReaderFactory

public class AdwaitSentenceReaderFactory
extends Object
implements SentenceReaderFactory

This class implements a SentenceReaderFactory which is suitable for reading in tagged or untagged sentences formatted one per line with underscores used only to separate words from POS tags. These are the conventions used in Adwait Ratnaparkhi's Java MXPOST and MXTERMINATOR software. The conventions are these: End-of-line indicates a sentence end. Tags are separated from words by an underscore character (_). The underscore character does not appear in words.

Author:
Christopher Manning

Constructor Summary
AdwaitSentenceReaderFactory()
          Constructs an AdwaitSentenceReaderFactory.
AdwaitSentenceReaderFactory(boolean taggedWords)
          Create a new AdwaitSentenceReaderFactory.
AdwaitSentenceReaderFactory(LabelFactory lf)
          Create a new AdwaitSentenceReaderFactory.
 
Method Summary
 SentenceReader newSentenceReader(Reader in)
          Implementation of the SentenceReaderFactory interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdwaitSentenceReaderFactory

public AdwaitSentenceReaderFactory()
Constructs an AdwaitSentenceReaderFactory.


AdwaitSentenceReaderFactory

public AdwaitSentenceReaderFactory(boolean taggedWords)
Create a new AdwaitSentenceReaderFactory.

Parameters:
taggedWords - Set to true if it should created TaggedWord objects, false if it should create Word objects

AdwaitSentenceReaderFactory

public AdwaitSentenceReaderFactory(LabelFactory lf)
Create a new AdwaitSentenceReaderFactory.

Parameters:
lf - LabelFactory to be used to create type for words read in
Method Detail

newSentenceReader

public SentenceReader newSentenceReader(Reader in)
Implementation of the SentenceReaderFactory interface.

Specified by:
newSentenceReader in interface SentenceReaderFactory
Parameters:
in - The Reader for input
Returns:
A SentenceReader that reads sentences.


Stanford NLP Group