textmaven.application.analyzer.extractor
Class WordDistributionMapFile
java.lang.Object
textmaven.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
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 |
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)
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 originaloriginal
- string originally found in text, param is currently ignoredoccurence
- 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.