Java program that interacts with a user to process natural language questions. Your program should be able
Question:
Java program that interacts with a user to process natural language questions. Your program should be able to accept an input question, parse an input text file, and identify the best answer to the question. To identify the best answer, your system will need to look for text phrases in the input file that match a pattern indicated by the input question and return the phrases that are the most common. For each question, your program should display the most common phrase on the screen. Your assignment will be evaluated in part by its ability to provide correct answers. Your user (me) will submit a query in the form of a natural language question to a search engine and create a text file from the results on the page. Your program should prompt for and input the natural language question from the user. Next, your program should prompt for and input the name of the text file to use to answer the question. The specific type of question for this assignment requests the identity of a person. Each question will be in the following form "Who X Y" where X is a verb and Y is some phrase. For example, the question may be "Who directed Star Wars". A different question might be "Who was the first president". In your program, you should look for answers in the form of names. A name will contain two or more consecutive terms with each term having the first letter capitalized.
Sample Execution Enter your question: Who directed Star Wars? Please enter the text file: results.txt Answer: George Lucas
Use this to test your program Example Input #2:
Who is the Governor of Texas?
Please enter the text file:
governor.txt
Answer:?
governor.txt
Yahoo Web Search Want more to discover? Make Yahoo Your Home Page. See breaking news & more every time you open your browser. Add it nowNo, thanks Yahoo Settings Sign In Search query Who is the governor of Texas AllImagesVideosNews MoreAnytime Get beautiful photos on every new browser tab. Download >> About 27,300,000 search results gov.texas.gov governor-abbottAbout Gov. Abbott | Office of the Texas Governor | Greg Abbott Before his election in 2014 as the 48th Governor of Texas, Greg Abbott was the 50th and longest-serving Attorney General of Texas, earning a national reputation for defending religious liberty and protecting Texas communities and children. He also previously served as a Justice on the Texas Supreme Court and as a State District Judge in Harris County. en.wikipedia.org wiki List_of_governors_of_TexasList of governors of Texas - Wikipedia The incumbent, Greg Abbott, is the forty-eighth governor to serve in the office since Texas' statehood in 1845. When compared to those of other states, the governorship of Texas has been described as one of relative weakness. # Governor Term In Office Party 48 Greg Abbott November 13, 1957 January 20, 2015 - Incumbent Republican 47 Rick Perry March 4, 1950 December 21, 2000 - January 20, 2015 Republican 46 George W. Bush July 6, 1946 January 17, 1995 - December 21, 2000 Republican 45 Ann Richards September 1, 1933 - ... January 15, 1991 - January 17, 1995 Democratic See full list on en.wikipedia.org Term length: Four years, no term limit Residence: Texas Governor's Mansion Inaugural holder: James Pinckney Henderson, 1846 Style: Governor, (informal), The Honorable, (formal) Images Texas Governor Demands More Border Guards to Fight Drugs ... Governor Greg Abbott At Texas GOP Convention - Houston ... Texas governor makes it harder to vote and calls it ... Governor Greg Abbott named Mr. South Texas for 2019's ... Gov. Abbott proposes 2.5 percent cap on property tax ... View all gov.texas.govOffice of the Texas Governor | Greg Abbott Governor Greg Abbott, the Texas Department of Public Safety (DPS), and the Texas National Guard are continuing to work together to secure the border, stop the smuggling of drugs, weapons, and people into Texas, and prevent, detect, and interdict transnational criminal behavior between ports of entry in response to the federal government's unwillingness to address the border crisis. en.wikipedia.org wiki Greg_AbbottGreg Abbott - Wikipedia Abbott was sworn in as the governor of Texas on January 20, 2015, succeeding Rick Perry. He is the first governor of Texas and the third elected governor of a U.S. state to use a wheelchair after Franklin D. Roosevelt of New York (1929-1932) and George Wallace of Alabama (1963- 1967, 1971-1979; 1983-1987). Children: 1 Governor: Rick Perry Education: University of Texas at Austin (BBA), Vanderbilt University (JD) Political party: Republican www.yahoo.com news texas-gov-greg-abbotts-truckTexas Gov. Greg Abbott's truck inspection policy created a ... 1 day ago "Governor Abbott's unnecessary and redundant inspections of trucks transiting ports of entry between Texas and Mexico are causing significant disruptions to the food and automobile supply chains ... www.msnbc.com american-voices watchTexas Governor says 'financial pain is necessary' for border ... Apr 17, 2022 Texas Governor Greg Abbot reversed his botched immigration order which stalled the delivery of fresh produce. American Voices guest host Julin Castro discussed the cost of the delays with Robert ... Videos Texas gov. candidate Beto O'Rourke slams Gov. Abbott for truck border inspections costing millions07:34 NBC via Yahoo News Texas gov. candidate Beto O'Rourke slams Gov. Abbott for truck border inspections costing millions 3 days ago Beto O'Rourke: GOP attacks on democracy are 'dangerous'08:51 NBC via Yahoo News Beto O'Rourke: GOP attacks on democracy are 'dangerous' 6 days ago Immigration showdown between Texas and the White House02:17 NBC via Yahoo News Immigration showdown between Texas and the White House 2 days ago Families fear new anti-trans order in Texas02:04 CBS News Videos via Yahoo News Families fear new anti-trans order in Texas 1 month ago Searches related to Who is the governor of Texas Who is the governor of Texas 2021 who are the state senators of texas Who is the governor of Texas 2022 who is the attorney general of texas Who is the governor of Texas now Who is the governor of Texas today Who is the governor of Texas 2020 who is the senators of texas 12345Next Governor of Texas Governor of Texas Head of state and of government of the U.S. state of Texas The governor of Texas heads the state government of Texas. The governor is the chief authority of the executive and legislative branch of the state government and is the commander in chief of the Texas National Guard. The current governor is Greg Abbott, who took office in 2015. Wikipedia Wiki Feedback SettingsHelpSuggestionsPrivacy(Updated)Terms(Updated)Privacy DashboardAdvertiseAbout adsAbout this pagePowered by Bing
Management Information Systems Managing the Digital Firm
ISBN: 978-0133050691
13th edition
Authors: Ken Laudon, Jane P. Laudon