Hi
I need help please
This is my project and i need a help to solve it with you A page of text is to be read and analyzed to determine number of occurrences and locations of different words. The results of the analysis are to be stored in a suitable data structure. The main task in this project is to design a suitable ADT (call it WAnalysis) to store the results and enable the following operations to be performed as fast as possible:
(i) An operation to determine the total number of words of a particular length occurring in the page.
(ii) An operation to determine the total number of occurrences of a particular word.
(iii) An operation to display the locations of the occurrences of a word starting from the top of the page as a list of line and word numbers. Note that every new-line character indicates end of a line.
Phase I
In the first phase of the project you will describe the design of the ADT you suggest for the problem, as follows:
(a) Give the graphical representation of the ADT to show its structure. Label the diagram clearly.
(b) Give a specification of the operations (i), (ii) and (iii), and other supporting operations you may need to read the text from a text file and store the results in the ADT (e.g. insert).
Phase II
In the second phase of the project you will implement the ADT and the operations you specified in the first phase as a single Java class WAnalysis. You may use the ADTs you have studied in the course.
You must also give the time complexity of the algorithms you used to implement the above operations.
Example Input and Output Data:
Assume that words are separated by at least one space. Single letter words e.g. ‘a’, ‘I’, are counted as words. Punctuation (e.g. commas, periods, etc.) is to be ignored. Hyphenated words (e.g. ‘decision-makers’) or apostrophized words (e.g. ‘customer’s’) are to be read as single words. See the following example of a piece of text in the font Times New Roman, and size 12pts:
In these ways, the testing methodology provides a window into the total Web Experience from the customer’s point of view, providing insight and direction for business decision- makers. Marketing executives discover how they should allocate resources for maximal impact, while designers obtain insight into why particular features and functions are not working as planned and how to best modify them.
The output of the operation (i) for word length 3 would be 14.
The output of the operation (ii) for the word ‘and’ would be 3.
The output of the operation (iii) for the word ‘and’ would be (2, 9) (4, 10) (5, 4). Note that (2, 9) indicates that word ‘and’ is occurring on line 2 as the ninth word.
Thank you
2 3399 Dököll 2,364
Recognized Expert Top Contributor
Hey there!
If you could post a bit of your code, it would be great. Might get better hits on your question that way...
In a bit!
Frinavale 9,735
Recognized Expert Moderator Expert
Please take the time to research the problem before you post your question. The experts here are more than willing to help you with a specific problem but you have to do your part to learn the basics and also formulate a specific question we can help with. Please take the time to read over the Posting Guidelines, specifically the section on Before you Post your Question.
Before posting any question you are expected to attempt to find and work on a solution. When you find a specific problem with your attempt, that is the time to post here requesting assistance with any difficulties you have or about a particular function of the code that you don't know how to achieve. When posting your problem, details of the problem itself and where it's found are the bare minimum information required. The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you.
Code may be posted for reference purposes, but please don't expect us to work out the meaning of your problem by reverse-engineering your code. The question you post must make sense in its own right.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: dan |
last post by:
this is a program to count average letters per word. i am able to
count the total number of letters, but not words. How do you count the
total number of words in a text file, so i am able to divide the total
letters divided by words.
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <cctype>
|
by: Hari Om |
last post by:
Here are the details of my error log files:
I execute the command and get following message at console:
----------------------------------------------------------------------
../sqlldr scott/tiger@common control=/full_path/test.ctl
log=/full_path/adhoc/test.log
SQL*Loader: Release 9.2.0.1.0 - Production on Tue Sep 2 10:49:27 2003
...
|
by: Alexandre MELARD |
last post by:
Hi,
My name is alexandre, I am 4th year student at the Napier university
of edinburgh.
I am finishing my year and do a presentation of my honours project
next wednesday (the 5th of May).
I am doing a project of data mining, and I run a mysql database to
store my data.
the database structure:
|
by: Yellowbird |
last post by:
Hi all,
I'm new to JavaScript, but am pretty sure what I want to accomplish is
not that difficult. I just need an example or suggestion to help
clarify it for me - I haven't had much time to learn JS, so I have
been using some prebuilt scripts where needed.
I have a Web page form where a user can enter data. The first step is
for them to...
|
by: Rabun |
last post by:
Heres one that is giving me fits ( = = Access newbie), more than likely
something simple that I blew right over . . . any help is appreciated -
I have a report based on a query, with several columns I need to work with.
Values in the cols are " Over " and " Under", as text values. The query is
for a start / end date, my count of records...
| |
by: chris.bender |
last post by:
1. My problem:
I am using a query to populate a Chart in MS Access 2k.
2. My query:
SELECT .Status, ., Sum(.Amount) AS SumOfAmount,
Sum(IIf(!="Debit",!,!*-1)) AS
realAmount, Count(.Status) AS CountOfStatus
FROM ( INNER JOIN ON .Status = .) INNER
JOIN ON (. =
.) AND (. = .EffectiveDate)
|
by: DQ dont quit |
last post by:
I'm currently working on a ASP.Net / C# / SQL 2000 project that involves the
entering of keywords, that a web user enters, and then searching MSWord
documents for those words. This information will then be used to perform
weighted searches on the keywords and text of multiple MSWord documents. How
might this best be accomplished? Should I...
|
by: naknak4 |
last post by:
Introduction
This assignment requires you to develop solutions to the given problem
using several different approaches (which actually involves using three
different STL containers). You will implement all three techniques as
programs. In these programs, as well as solving the problem, you will
also measure how long the program takes to...
|
by: gunimpi |
last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431
********************************************************
VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help
wanted
********************************************************
For this teeny job, please refer to:
http://feeds.reddit.com/feed/8fu/?o=25
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |