Simple Text Analysis Program in Python
$30-100 USD
Pago na entrega
Overview. ? I need an extremely simple little program written in Python that scans an .rtf? document for certain kinds of repetitions of words, and writes out the file with these words flagged. ? Pseudocode? is provided.? ? I may have follow-up programs for a developer who does a good job on this simple test program. ? I would like to see clean commented code, please.
## Deliverables
Files I will provide:
[url removed, login to view] (column1: word; column 2: word freq; column 3: part of speech) [this is a program that lists most English words and their word frequency and what part of speech they are??"such as Noun, Verb, etc.] ? Use this to determine part of speech in program logic below.) ? Will be provided to developer.
Pseudocode for Program Logic
1. Ask user to specify filename of rtf file to be processed, using standard Windows browsing file-selection window
2. ? Input all the words in this rtf file into a single linear array: Word[x], for x = 1 to total number of words. ? Please encode all paragraph breaks as words (let the word be “PPPP??). ? (I know this does not affect anything that happens below, but I would like it to be included, nonetheless.)
3. ? Now scan the text for repetitions as follows:
SizeWindow = 24; {size of window to be scanned}
For x = SizeWindow+1 to number-of-words
If part_of_speech(word(x)) = verb or adjective do begin
? for y= 1 to SizeWindow do begin
? -Test whether word(x) matches word(x-y)
? - If it does, flag word(x) as a repetition
? - End y loop
? End do-begin loop
? End x loop
4. ? Now change the color of every word that was flagged as a repetition, changing its color to red.
5. Save new document as File_R.rtf.
ID do Projeto: #3829880