Package edu.odu.cs.cs350
Class DocumentClassifier
java.lang.Object
edu.odu.cs.cs350.DocumentClassifier
Main class for the ACM Classifier application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclassifyAndPrint(Corpus corpus) Classify documents in a Corpus, print results, and record classification times.static CorpuscreateExampleCorpus(String[] filePaths) Create a Corpus of Documents from input files and record processing times.static voidMain method that calls the classifier with input arguments.static voidprintFileNames(Corpus corpus) Print the names and word counts of documents in a corpus.
-
Constructor Details
-
DocumentClassifier
public DocumentClassifier()
-
-
Method Details
-
main
Main method that calls the classifier with input arguments.- Parameters:
inputArguments- program arguments
-
printFileNames
Print the names and word counts of documents in a corpus.- Parameters:
corpus- the documents to be printed
-
createExampleCorpus
Create a Corpus of Documents from input files and record processing times.- Parameters:
filePaths- paths of files to include in the corpus- Returns:
- a Corpus of Documents
- Throws:
IOException- if files cannot be read
-
classifyAndPrint
Classify documents in a Corpus, print results, and record classification times.- Parameters:
corpus- the Corpus of Documents to classify
-