Question
Write a Java program that will build an Inverted Index from a collection of text documents in a given directory. Your program will prompt for
Write a Java program that will build an Inverted Index from a collection of text documents in a given directory. Your program will prompt for two pieces of information: the input directory, and the inverted index output file. When the input directory is received, your program will read the text files contained in that directory. Your program should write the inverted index to the output file. Your program must work with the main class (Assignment1) provided by the instructor. The class is given on the last page. The class creates an instance of another class (IRSystem) and calls its start() method. You will build the IRSystem class and any other classes you need to complete this assignment. You may not change the file Assignment1.java. Your instructor will use it to test your submission. Your program must be able to be compiled and executed using the Java environment provided by the universitys IT department. You must submit your source code. Do not submit any executables or input documents. Your program must have the following requirements: All tokens read from the input text files should be normalized to lower case characters. This includes proper nouns. Letters, digits, hyphens, and apostrophes are valid word symbols. All other punctuation characters should be treated as separators.
/* Main class for Assignment #1. DO NOT CHANGE THIS FILE */ public class Assignment1 { public static void main (String args[]) throws Exception { IRSystem ir = new IRSystem(); ir.start(); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started