Package edu.odu.cs.cs350
Class txtFileProcessor
java.lang.Object
edu.odu.cs.cs350.txtFileProcessor
A utility class for processing plain text (.txt) files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the file path associated with this text file processor.Reads the text file and converts it into a Document object, using tokenization and removing common stopwords.
-
Constructor Details
-
txtFileProcessor
Constructor for txtFileProcessor.- Parameters:
filePath- the path to the text file to be processed
-
-
Method Details
-
getFilePath
Returns the file path associated with this text file processor.- Returns:
- the file path
-
processFile
Reads the text file and converts it into a Document object, using tokenization and removing common stopwords.- Returns:
- a Document object representing the file's contents, or null if the file is invalid
-