DOC PREVIEW
TRINITY CSCI 1311 - Text Processing
Pages 7

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Text Processing3/30/2009Opening Discussion●Minute Essay comments–Mad libs program.–I know of more optimization problems. For spreadsheets I need ideas.–Data encryption.–Games conflict with current projects.●Have you ever had things you wanted to do with text that your tools weren't good for and it took a long time?The Problems●I would like us to look at two different problems this week.–I have a bad habit of falling into a rut in my word usage. I want to count word frequency to see how often different words occur.–Annotating large amounts of text for things like web pages.●The goal is to take advantage of something computers are really good at, processing large amounts of information.Counting Words●Today I want us to do the word counting problem.●Obviously we need to read in the file. We can read it word by word. Each time we see a word we increment a count for it.●To keep our counts we will use a new data structure called a map.Maps●Arrays and lists let us associate data with integer locations.●Maps are more flexible. You get can associate any type of data with any type of key.●We will use the java.util.HashMap for this.●We want to have Integer counts associated with String keys.●Let's look at the API page.Writing the Code●Let's write the code that will count the words.●After we have counted them we need to print out each word and how many times it occurred.Minute Essay●Can you think of any other uses for a map? Do you have any questions about what we did today?●Remember that the project is due on


View Full Document

TRINITY CSCI 1311 - Text Processing

Course: Csci 1311-
Pages: 7
Documents in this Course
Arrays

Arrays

12 pages

Arrays

Arrays

10 pages

Applets

Applets

5 pages

Arrays

Arrays

8 pages

Methods

Methods

12 pages

Drawing

Drawing

8 pages

Load more
Download Text Processing
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Text Processing and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Text Processing 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?