org.eml.sir.rel
Class WordFrequencyList

java.lang.Object
  extended byorg.eml.sir.rel.FrequencyList
      extended byorg.eml.sir.rel.WordFrequencyList
All Implemented Interfaces:
java.io.Serializable

public class WordFrequencyList
extends FrequencyList

FrequencyList containing words of a specific part of speech and their frequency.

Author:
Hendrik Niederlich (EML-R)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eml.sir.rel.FrequencyList
ORDER_ALPHABETICAL, ORDER_BY_FREQUENCY
 
Constructor Summary
WordFrequencyList()
          Create a new instance of WordFrequencyList.
WordFrequencyList(char pos, Tagger myTagger)
          Create a new instance of WordFrequencyList.
 
Method Summary
 void createAlphabeticalFile(java.lang.String fileName)
          Create a file with a table of words and their frequencies ordered alphabetically that is readable by humans.
 void createFrequencyFile(java.lang.String fileName)
          Create a file with a table of words and their frequencies ordered by frequency that is readable by humans.
static WordFrequencyList[] initListsByPlainText(java.lang.String path, Tagger myTagger)
          Create three new instances of WordFrequencyList.
static WordFrequencyList[] initListsByTazCount(java.lang.String filePath, Tagger myTagger)
          Create three new instances of WordFrequencyList.
 
Methods inherited from class org.eml.sir.rel.FrequencyList
add, addSome, getAlphabeticalList, getFrequency, getFrequencyList, getMap, getPartOfSpeech, getSumOverAll, load, save, setPartOfSpeech, size, toStrings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordFrequencyList

public WordFrequencyList()
Create a new instance of WordFrequencyList.


WordFrequencyList

public WordFrequencyList(char pos,
                         Tagger myTagger)
Create a new instance of WordFrequencyList.

Method Detail

initListsByPlainText

public static WordFrequencyList[] initListsByPlainText(java.lang.String path,
                                                       Tagger myTagger)
                                                throws java.io.FileNotFoundException
Create three new instances of WordFrequencyList. One for each part of speech. This method was built to optimize the work with the TreeTagger and a lot of small documents

Returns:
[0] pos: n, [1] pos: v, [2] pos: a.
Throws:
java.io.FileNotFoundException

initListsByTazCount

public static WordFrequencyList[] initListsByTazCount(java.lang.String filePath,
                                                      Tagger myTagger)
                                               throws java.io.FileNotFoundException,
                                                      java.io.IOException
Create three new instances of WordFrequencyList. This method was built to create WordFrequencyLists using the TAZ frequency list "taz.count".

Returns:
[0] pos: nouns, [1] pos: verbs, [2] pos: adjectives.
Throws:
java.io.FileNotFoundException
java.io.IOException

createFrequencyFile

public void createFrequencyFile(java.lang.String fileName)
                         throws java.io.IOException
Create a file with a table of words and their frequencies ordered by frequency that is readable by humans.

Throws:
java.io.IOException

createAlphabeticalFile

public void createAlphabeticalFile(java.lang.String fileName)
                            throws java.io.IOException
Create a file with a table of words and their frequencies ordered alphabetically that is readable by humans.

Throws:
java.io.IOException