org.apache.uima.examples.tagger.trainAndTest
Class BrownReader

java.lang.Object
  extended by org.apache.uima.examples.tagger.trainAndTest.BrownReader
All Implemented Interfaces:
CorpusReader

public class BrownReader
extends java.lang.Object
implements CorpusReader

Reader for Brown Corpus from NLTK Distribution (nltk.sourceforge.net)


Constructor Summary
BrownReader()
           
 
Method Summary
 java.util.List<Token> read_corpus(java.lang.String directory, MappingInterface mapping)
          Reads Brown Corpus from NLTK Distribution Format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrownReader

public BrownReader()
Method Detail

read_corpus

public java.util.List<Token> read_corpus(java.lang.String directory,
                                         MappingInterface mapping)
Reads Brown Corpus from NLTK Distribution Format. Iterates over all files in the directory, which are in a sentence per line format, and returns all tokens in the collection in a List of Tokens}

Specified by:
read_corpus in interface CorpusReader


Copyright © 2011. All Rights Reserved.