public class TFIDF extends Object
| Constructor and Description |
|---|
TFIDF(List<String> documents,
String stopwordsFilename) |
TFIDF(List<String> documents,
String stopwordsFilename,
boolean resource) |
TFIDF(String stopwordsFilename) |
TFIDF(String filename,
String stopwordsFilename,
boolean resource) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInput(String input)
add a new document to the set
|
protected void |
calcDFs() |
static void |
main(String[] args)
Run a series of tests containing a filename,
a query and an expected answer.
|
ArrayList<String> |
matchBestInput(String input) |
String |
matchInput(String input) |
List<String> |
matchInput(String input,
int n) |
protected TreeMap<Float,ArrayList<Integer>> |
matchInputFull(String input) |
void |
newLine(String line) |
void |
prepare(List<String> documents,
String stopwordsFilename) |
protected void |
prepareLine(String line) |
public TFIDF(String stopwordsFilename) throws IOException
IOExceptionpublic TFIDF(List<String> documents, String stopwordsFilename, boolean resource) throws IOException
IOExceptionpublic TFIDF(List<String> documents, String stopwordsFilename) throws IOException
IOExceptionpublic void prepare(List<String> documents, String stopwordsFilename) throws IOException
IOExceptionpublic void newLine(String line)
protected void prepareLine(String line)
protected void calcDFs()
public void addInput(String input)
public ArrayList<String> matchBestInput(String input)
protected TreeMap<Float,ArrayList<Integer>> matchInputFull(String input)
public List<String> matchInput(String input, int n)
public static void main(String[] args) throws IOException
IOExceptionCopyright © 2015. All rights reserved.