Class DocumentClassifier

java.lang.Object
edu.odu.cs.cs350.DocumentClassifier

public class DocumentClassifier extends Object
Main class for the ACM Classifier application.
  • Constructor Details

    • DocumentClassifier

      public DocumentClassifier()
  • Method Details

    • main

      public static void main(String[] inputArguments)
      Main method that calls the classifier with input arguments.
      Parameters:
      inputArguments - program arguments
    • printFileNames

      public static void printFileNames(Corpus corpus)
      Print the names and word counts of documents in a corpus.
      Parameters:
      corpus - the documents to be printed
    • createExampleCorpus

      public static Corpus createExampleCorpus(String[] filePaths) throws IOException
      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

      public static void classifyAndPrint(Corpus corpus)
      Classify documents in a Corpus, print results, and record classification times.
      Parameters:
      corpus - the Corpus of Documents to classify