Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Coding Language Using the index generated in Assignment #1, write a program that interacts with a user to process information retrieval queries. Your program
Java Coding Language
Using the index generated in Assignment #1, write a program that interacts with a user to process information retrieval queries. Your program should prompt the user for a query, then use it to display the documents that contain the query term. For this assignment, your program only needs to handle single-term queries. However, it must also be able to handle misspelled queries. If a query term is submitted that is not contained in your index, your program must determine a candidate list of (at least 3) possible matches. It must, then, use the edit distance to determine the distance from each candidate to the misspelled query term. Your program should display each candidate and distance in order (decreasing order in terms of distance) and allow the user to select the one he or she wants. The program should then display the documents relevant to that candidate as the query term. Your program should be an extension of the first assignment, so it needs to fulfill all of the requirements of the first assignment (including program header). Your instructor will compile and execute your program. Your main class must be called Assignment2 in a file called Assignment2.java (it is okay if Canvas changes the name of your file). Do not submit any executables or input documents. */ import java.io. BufferedReader; import java.io. Buffered Writer; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util. Map; import java.util.Scanner; public class IRSystem // before witing index, assume and all index data will fit into memory MapStep 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