textmaven.application.analyzer.extractor
Class WordDistributionMapFile

java.lang.Object
  extended bytextmaven.application.analyzer.extractor.WordDistributionMapFile
All Implemented Interfaces:
IWordDistributionMap

public class WordDistributionMapFile
extends java.lang.Object
implements IWordDistributionMap

Represents word distribution related to a single or set of files. With each word an instance of Word is associated.

Version:
1.0
Author:
Thomas Krebs

Constructor Summary
WordDistributionMapFile()
           
WordDistributionMapFile(java.io.InputStream in, java.lang.String separator)
          Constructor
WordDistributionMapFile(WordDistributionMapFile wm)
           
 
Method Summary
 void add(java.lang.String stem, java.lang.String original, long occurence, java.lang.StringBuffer sentence)
          Adds a word found to the map.
 void add(Word word, long wordCount)
           
 void clear()
           
 boolean containsWord(java.lang.String word)
           
 Word get(java.lang.String word)
           
 java.util.Collection keys()
           
 void setNrOfSentences(int nr)
           
 java.util.Collection words()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordDistributionMapFile

public WordDistributionMapFile(java.io.InputStream in,
                               java.lang.String separator)
                        throws java.text.ParseException,
                               java.io.IOException
Constructor

Parameters:
in - stream to read initialize instance from.
separator - used input stream
Throws:
java.text.ParseException
java.io.IOException

WordDistributionMapFile

public WordDistributionMapFile()

WordDistributionMapFile

public WordDistributionMapFile(WordDistributionMapFile wm)
Method Detail

setNrOfSentences

public void setNrOfSentences(int nr)
Specified by:
setNrOfSentences in interface IWordDistributionMap

containsWord

public boolean containsWord(java.lang.String word)
Specified by:
containsWord in interface IWordDistributionMap

get

public Word get(java.lang.String word)
Specified by:
get in interface IWordDistributionMap

add

public void add(java.lang.String stem,
                java.lang.String original,
                long occurence,
                java.lang.StringBuffer sentence)
Adds a word found to the map.

Specified by:
add in interface IWordDistributionMap
Parameters:
stem - stem form of the word passed in param original
original - string originally found in text, param is currently ignored
occurence -
sentence - Sentence the word occured in

add

public void add(Word word,
                long wordCount)
Specified by:
add in interface IWordDistributionMap

words

public java.util.Collection words()
Specified by:
words in interface IWordDistributionMap

keys

public java.util.Collection keys()
Specified by:
keys in interface IWordDistributionMap

clear

public void clear()
Specified by:
clear in interface IWordDistributionMap


Copyright © 2002-2005 Sourceforge. All Rights Reserved.