Show Bid Request
Word Frequency Counter in C++
Bid Request Id: 29415
|
|
|
Posted by: |
UNCstud413 (2 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Oct 1, 2002 7:31:21 AM EDT
|
Bidding Closes: |
Oct 6, 2002 7:36:45 AM EDT
|
Viewed (by coders): |
240 times
|
Deadline: |
10/7/2002
TIME EXPIRED
|
|
|
|
Description:
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. Make sure it will work on a UNIX machine!
3) Complete ownership and distribution copyrights to all work purchased.
Deliverables: Program Description
You are to write a program that takes a text file as a command-line parameter and keeps a list of all of the words in the file, the number of times each word occurs, the number of unique words, and the total number of words in the file. This information is printed to the screen before the program exits.
This assignment is a good exercise in top-down design. Consider the problem to be solved as a whole, then try to identify the subproblems that, when put together, solve the whole problem. There are two major subproblems to deal with in this project: how to tell what's a word and what's not, and how to efficiently keep track of what words have been seen and how many times. Since you are writing this program "from scratch," how you solve these problems is up to you. However, I will make the following suggestions:
The first problem can be dealt with very elegantly by building a finite state machine recognizer, which we will be discussing in lab. The FSM is a very important concept in computer science, with many applications. I'll tell you how to create a function that scans a line of text and returns only those substrings matching certain patterns. The best solution to the second problem is to use a hash table with a good string hashing function to store the words seen so far and their counts. Create a HashTable object whose data members include the words seen so far and how many times they've been seen, and whose methods include functions for adding a word (or incrementing its count if it's already in the table) and printing the list of words and their counts. Requirements Your program must only count words (not numbers or punctuation). For the purpose of this project, we will define words as: Strings of one or more alphabetic characters (letters), One or more alphabetic characters followed by a single apostrophe followed by one or more alphabetic characters (to cover contractions like "don't" or "I'll"), One or more alphabetic characters followed by a single period followed by one or more alphabetic characters followed by a single period (to cover abbreviations like "i.e." and "e.g."). The program should ignore any other symbols. As mentioned above, this task is best accomplished by using a finite state machine to scan the input and return the words it finds. Before it exits, the program must print the following information:
A list of every unique word in the file and the number of times the word occurs, The number of unique words in the file, The total number of words in the file.
Keep your function prototypes and/or class definitions in .h files and place your code in .cc files, as in Project #1. You should give each data structure you create its own set of .h and .cc files. So if you create a HashTable object, its code should be in HashTable.h and HashTable.cc. If you use a linked list, its code should be in List.h and List.cc (or something). You should also keep the code for the main program in its own file, perhaps main.cc. Use a Makefile to compile all the source files into an executable called wordcount.
Platform:
must be done in C++ and UNIX
Must be 100% finished and received by buyer on:
Oct 7, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Special Conditions / Other:
must be complete and in my hands by the date due. and follow every instruction in the decription.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Oct 1, 2002 1:18:56 PM EDT
|
8.2
(Very Good)
|
|
|
Dear buyer, This project very much suits my area of interest(compiler design).
I have implemented 8 finite state machines for compiler projects.
I can finish this to ur full satisfaction.
Please check out my ratings.
Hope u would accept my bid.
Regards, rozarus.
|
|
|
|
|
|