1001 Freelance Projects
Latest Projects from Freelance Marketplaces
Today is: 09-May-2024 11:24 GMT
View Project
View this project in detail (Note: you will be redirected to external marketplace)
Project title: Parser Program
Posted by: External project from PeoplePerHour
Started: 03-Nov-2020 03:49 GMT
Description: Part 1: Parsing
Goals and outcomes
This assignment is intended to help the student be able to:
• Combine loops and other structures to process text input
o Branching statements
o Container types
o Membership operators
o String methods
• Structure a program to make future modifications easier

This assignment is also intended to form the basis for a series of assignments over the next weeks. To that end, it is intended to facilitate discussions about symbol processing, structured data, and the fundamental principles of object-oriented design and programming.
Background
For many applications, an input stream needs to be broken up into meaningful pieces. Depending on the applications, these pieces might be called words or tokens. Application areas where this is important include systems software programming, order processing, natural language processing (AI), network security, codebreaking, national security communications monitoring, and many more.
The task
Your assignment is to build a program that can take a string as input and produce a “frequency list” of all of the string (see the definition of a word below.) For this assignment's purposes, the input strings can be assumed not to contain escape characters (\n, \t, …) and to be readable with a single input() statement.
When your program ends, it prints the list of words. In the output, each line contains a single word and the number of times that word occurred in the input. For readability, the number should be the first thing on the line, and the word should be second.
For example, here are two runs of the program, showing the user’s input and the output:
Enter a text line: This is a very long line of text with many words in it, most of them only once.
1 this
1 is
1 a
1 very
1 long
1 line
2 of
1 text
1 with
1 many
1 words
1 in
1 it
1 most
1 them
1 only
1 once

Enter a line of text: This is a word, and so is this.
2 this
2 is
1 a
1 word
1 and
1 so

Specific programming requirements
1. Use good prompts for all user input
2. No “dead code” – remove all diagnostic prints, abandoned attempts, etc.
3. Use loops and data container types to reduce repeated code. No section of the program should be longer than necessary, and the whole program must be less than 150 lines long.
4. Use comments only when necessary to document the program.
5. Variable names must be mnemonic
6. Your program must normally end (not crash or get stuck in an infinite loop)

Part 2:
Rewrite the parser program and extend it with a brief statistical section.

Once the program has printed the frequency table, print this report:

number of words: 24

number of unique words: 20

the average length of unique words: 5.63

the average length of words it the text: 4.84

Notice that the numbers are left-justified in fields that line up vertically. The labels are right-justified. Floating-point numbers for the averages should be printed with 2 decimal places.

And remember the definition of a "word" for this assignment - it's a sequence of English letters, hyphen(s), and apostrophe(s). A hyphen or apostrophe is considered part of a word only if it has letters on both sides. Words are separated (delimited) by any character(s), not part of a word.

'Words' do not have to be real English words, and the input is not restricted to English text.
Project ID: 3097641
Project category:
Project budget:
View this project in detail (Note: you will be redirected to external marketplace)
Last Projects / Browse Projects
  Project Started
Mechanical Engineer CV Revamp
Category: Content Writing, Copywriting, Electrical Engineering, Resumes, Technical Writing
Budget: $10 - $30 USD
09-May-2024
10:04 GMT
AI Image Generation Speed Optimization
Category: Image Processing, Machine Learning (ML), Python
Budget: ₹400 - ₹750 INR
09-May-2024
10:04 GMT
Facebook & Instagram Marketing for Product SalesNeed a FB Marketing Expert who can generate sales from day one.
Category: Facebook Marketing, Internet Marketing, Marketing, Social Media Marketing, Twitter
Budget: ₹12500 - ₹37500 INR
09-May-2024
10:04 GMT
Mechanical Engineering -
Category: Civil Engineering, Electrical Engineering, Engineering, Mechanical Engineering, Solidworks
Budget: $10 - $70 AUD
09-May-2024
10:03 GMT
Launch Ready App, Developer Required
Category: Android, Android App Development, Android Studio, Kotlin, Mobile App Development
Budget: ₹750 - ₹1250 INR
09-May-2024
10:00 GMT
Laravel project Zatca Phase 2 with Arabic Explanation
Category: Laravel, PHP
Budget: $30 - $250 USD
09-May-2024
10:00 GMT
Textual Data Encoding from Digital Documents
Category: Data Entry, Data Mining, Data Processing, Excel, Web Scraping
Budget: $2 - $8 USD
09-May-2024
09:59 GMT
Financial Data Entry for Analysis
Category: Accounting, Data Entry, Excel, Finance, Statistics
Budget: €250 - €750 EUR
09-May-2024
09:59 GMT
Social Media Admin for TikTok, WhatsApp & Instagram
Category: Facebook Marketing, Google Plus, Social Media Marketing, Social Networking, Twitter
Budget: $15 - $25 USD
09-May-2024
09:58 GMT
Innovative Tennis Grip and Racket Component Design
Category: Electronics, Engineering, Graphic Design, Manufacturing Design, Product Design
Budget: $30 - $250 AUD
09-May-2024
09:56 GMT
Wordpress Maintenance and Graphic Updates
Category: Graphic Design, HTML, PHP, Web Design, WordPress
Budget: $15 - $25 USD
09-May-2024
09:56 GMT
Search Functionality Implementation using Apache Solr
Category: Apache, Apache Solr
Budget: $250 - $750 USD
09-May-2024
09:56 GMT
Advanced Unity3D Video for Algorithms
Category: C, Programming, C++, Computer Science, Unity, Unity 3D
Budget: ₹12500 - ₹37500 INR
09-May-2024
09:56 GMT
International Sales Rep for All Natural Amazonian Personal Care Products
Category: Market Research, Marketing, Research, Sales, Telemarketing
Budget: $1500 - $3000 USD
09-May-2024
09:55 GMT
Calculus Problem Solver for Electrical Circuits
Category: Electrical Engineering, Electronics, Engineering, Mathematics, Matlab And Mathematica
Budget: $15 - $25 USD
09-May-2024
09:55 GMT
Browse All Projects
Projects by Skills ...
Projects for 'android'
Projects for 'ajax'
Projects for 'asp'
Projects for 'aspnet'
Projects for 'cms'
Projects for 'cpp'
Projects for 'csharp'
Projects for 'css'
Projects for 'delphi'
Projects for 'design'
Projects for 'drupal'
Projects for 'excel'
Projects for 'facebook'
Projects for 'flash'
Projects for 'html'
Projects for 'java'
Projects for 'javascript'
Projects for 'joomla'
Projects for 'iphone'
Projects for 'mysql'
Projects for 'photoshop'
Projects for 'php'
Projects for 'python'
Projects for 'ruby'
Projects for 'seo'
Projects for 'sql'
Projects for 'sysadm'
Projects for 'translate'
Projects for 'typing'
Projects for 'twitter'
Projects for 'vbnet'
Projects for 'xml'
Projects for 'wordpress'
Projects for 'writing'
Read RSS feeds ... New!
RSS feed for 'android'
RSS feed for 'ajax'
RSS feed for 'asp'
RSS feed for 'aspnet'
RSS feed for 'cms'
RSS feed for 'cpp'
RSS feed for 'csharp'
RSS feed for 'css'
RSS feed for 'delphi'
RSS feed for 'design'
RSS feed for 'drupal'
RSS feed for 'excel'
RSS feed for 'facebook'
RSS feed for 'flash'
RSS feed for 'html'
RSS feed for 'java'
RSS feed for 'javascript'
RSS feed for 'joomla'
RSS feed for 'iphone'
RSS feed for 'mysql'
RSS feed for 'photoshop'
RSS feed for 'php'
RSS feed for 'python'
RSS feed for 'ruby'
RSS feed for 'seo'
RSS feed for 'sql'
RSS feed for 'sysadm'
RSS feed for 'translate'
RSS feed for 'typing'
RSS feed for 'twitter'
RSS feed for 'vbnet'
RSS feed for 'xml'
RSS feed for 'wordpress'
RSS feed for 'writing'
New!
Проекты на русском
(Projects in Russian)

Short URL:
1001fp.com
Mobile version:
m.1001freelanceprojects.com
Copyright © 2005-2022 1001 Freelance Projects