hultig.sumo
Class NewsClusterList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<NewsCluster>
              extended by hultig.sumo.NewsClusterList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<NewsCluster>, Collection<NewsCluster>, List<NewsCluster>, RandomAccess

public class NewsClusterList
extends ArrayList<NewsCluster>
implements Serializable

NOT YET WELL COMMENTED.

University of Beira Interior (UBI)
Centre For Human Language Technology and Bioinformatics (HULTIG)

See Also:
Serialized Form

Field Summary
static Toolkit to
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
NewsClusterList()
           
NewsClusterList(String filename)
           
 
Method Summary
static String cleanSentence(String s)
          Clean a sentence from extra and meta simbols, like HTML/XML tags.
static void gerar_pos_corpus(OpenNLPKit model, String foutname)
           
 boolean loadClusters(String filename)
          Load all news groups from a given file, the one that is defined with the infile attribute.
static void main(String[] args)
          MAIN - For testing.
 boolean passfilter(String line)
          Define a filter to apply on the text.
 void printAllSentences(OpenNLPKit model)
           
 boolean readCluster(BufferedReader br, NewsCluster cluster)
          Read the next news cluster, from the current reader, given by @param br.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

to

public static Toolkit to
Constructor Detail

NewsClusterList

public NewsClusterList()

NewsClusterList

public NewsClusterList(String filename)
Method Detail

loadClusters

public boolean loadClusters(String filename)
Load all news groups from a given file, the one that is defined with the infile attribute.

Returns:
boolean

readCluster

public boolean readCluster(BufferedReader br,
                           NewsCluster cluster)
                    throws Exception
Read the next news cluster, from the current reader, given by @param br.

Parameters:
br - BufferedReader
cluster - NewsCluster
Returns:
boolean
Throws:
Exception

passfilter

public boolean passfilter(String line)
Define a filter to apply on the text.

Parameters:
line - String
Returns:
boolean

cleanSentence

public static String cleanSentence(String s)
Clean a sentence from extra and meta simbols, like HTML/XML tags.

Parameters:
s - The readLn sentence.
Returns:
The cleaned sentence, may be the same if no dirt exist, or null if the complete sentence is a nonsense sequence of simbols. JPC 2008/12/08

printAllSentences

public void printAllSentences(OpenNLPKit model)

gerar_pos_corpus

public static void gerar_pos_corpus(OpenNLPKit model,
                                    String foutname)

main

public static void main(String[] args)
MAIN - For testing.

Parameters:
args -