CITS1401 Computational Thinking with Python Assignment

Assignment Help Python Programming
Reference no: EM132460659

CITS1401 Computational Thinking with Python Assignment, School of Computer Science and Software Engineering - The University of Western Australia, Australia

Problem Solving and Programming Project - Finding Synonyms by Association

You should construct a Python 3 program containing your solution to the following problem and submit your program electronically using cssubmit. No other method of submission is allowed, and only the Python 3 program file, please.

Tasks -

The only function definition that you must have is: def main(corpus_file_name, commonwords_file_name = None)

The names of the parameters are not relevant, but the function with that name and the arguments prepresenting those file names must be present so my testing program will be able to interact properly with your program. (The file of common words is optional.) If main() definition is not present, it will not be possible to test your program.

Otherwise, how you structure your program is up to you. The tasks your program will have to undertake are:

If the commonwords file is present, open the file and read the words into an appropriate data structure.

Open the corpus file and read in the lines of text.

As the file is being read in, break it up into sentences.

- As each sentence is completed, break the sentence up into words.

- For each unique word (other than common words) in a sentence, update the counts of the profile entries for that word with respect to all the others. For example, after reading in the first sentence in the sample, the profile associated with mississippi will contain references to "worth" and "reading", but not "is", "well" or "about" (as these are in the commonwords). Each term will now have a count of 1. Similarly, "mississippi" will have a count of 1 in the profile of "worth", and so on

I recommend you write a function that prints out the data structure you have created to represent the profiles. I won't be testing that you have such a function, but I find it good practice as you can make sure that things are the way you expect.

Process query word sets until just a blank line is read in.

- Read in words, one per line until a blank line is read in. The first word is the target word.

- For each word, extract the corresponding profile and compare the second and subsequent profiles to the first. Generate a score for each comparison and record the score against the corresponding word.

- Sort the word-score list and print the words and the scores in order of descending score.

- Print the computed synonym.

A script from a sample session can be found at: typescript. The sample session only contains a single set of target word plus query words; your program should be able to handle multiple sets (with a blank line between sets).

Attachment:- Computational Thinking with Python Assignment File.rar

Reference no: EM132460659

Questions Cloud

What kind of memo would be consider a well thought-out : What kind of memo would be consider a well thought-out and professionally written memo that addressed ethical obligations for board members
Project Monitor and control finances Assignment : Project Monitor and control finances Assignment Help and Solution, Plan and implement financial management approaches Assessment Writing Service
Describe how the credit crisis may have adversely affected : Describe how the credit crisis may have adversely affected many other people beyond homeowners and mortgag. Do you believe the impact of the credit crisis
Develop personal balance sheet for the company : Develop personal balance sheet using the format you have learned for a classified balance sheet for a company. For the equity account
CITS1401 Computational Thinking with Python Assignment : CITS1401 Computational Thinking with Python Assignment Help and Solution, The University of Western Australia. Project - Finding Synonyms by Association
Effect of the on the operating cycle : Indicate the effect of the following on the operating cycle: Inventory takes longer to get sold.
Considering the purchase of a new piece of equipment : DataPoint Engineering is considering the purchase of a new piece of equipment for $370,000.
Explain the process by which arbitrage will adjust : Explain the process by which arbitrage will adjust the term structure. Under which theory of the term structure would this inequality persist? Why?
Determine marie and ethans current income : Determine Marie and Ethan's current income, gain, or loss and calculate the basis that each takes in the Roundtree stock.exchange for 1,600 shares.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd