Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Goals Your goals are to prompt the user for a text file to analyze. You will als

ID: 3631934 • Letter: G

Question

Goals
Your goals are to prompt the user for a text file to analyze. You will also be provided
with a file of stop words—words that will be ignored when you analyze the file. After
creating the concordance, print the concordance results as indicated in the example
output below. For each word in the concordance you will print:
• the word
• the total number of occurrences
• for each occurrence:
1. the line number in the file (the first line is line #1)
2. the local context. The local context is the original line with the specified word in all upper case.

Project Specification
1. The stop word file is provided: english.stop.txt
2. Prompt the user for the file to analyze
3. Compute the concordance.
4. Print the contents of the concordance as shown below
5. Your program must use two functions of your own design. It is up to you what
the functions do but you must have two functions.


Notes and Hints
• for an open file object, file_obj.readlines() will return a list, where
each element is a string, one of the lines of the file (a line ends in carriage
return line feed, right!)
• Remember that case should not matter here. The string "Spider" and "spider"
should both count as the same word.
• Punctuation should be stripped so that "spider." and "spider" both count as the
same word.
• The context line printed should contain its original capitalization (except for
the specified word that is all upper case) and original punctuation, e.g. notice
the explanation point in the example below.

Example Output:
Analyze what file: itsy_bitsy_spider.txt
Concordance for file itsy_bitsy_spider.txt
itsy : Total Count: 2
Line:1: The ITSY Bitsy spider crawled up the water spout
Line:4: and the ITSY Bitsy spider went up the spout again!

Explanation / Answer

^ In practice it may be difficult to determine how a given search engine works. The search algorithms actually employed by web search services are seldom fully disclosed out of fear that web entrepreneurs will use search engine optimization techniques to improve their prominence in retrieval lists. ^ Capabilities of Full Text Search System ^ Coles, Michael (2008). Pro Full-Text Search in SQL Server 2008 (Version 1 ed.). Apress Publishing Company. ISBN 1-430-21594-1. ^ B., Yuwono; Lee, D.L. (1996). "Search and ranking algorithms for locating resources on the World Wide Web". 12th International Conference on Data Engineering (ICDE'96). pp. 164. ^ Studies have repeatedly shown that most users do not understand the negative impacts of boolean queries.[1] ^ US A method assigns importance ranks to nodes in a linked database, such as any database of documents containing citations, the world wide web or any other hypermedia database. The rank assigned to a document is calculated from the ranks of documents citing it. In addition, the rank of a document is... 6285999, Page, Lawrence, "Method for node ranking in a linked database", published 1/9/1998, issued 9/4/2001

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote