| Author |
Treemap and Hashmap
|
Peter Burke
Greenhorn
Joined: Sep 28, 2004
Posts: 4
|
|
How would you go about removing all punctuation besides ones like this "my-o-my" and then count up all occurances of the every word and print it out. Doin all this while reading in a file that has text it in from a speech. Thanks!
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
You should look at classes like String, StringBuffer, StringTokenizer, InputStream, and FileReader. These should provide many of the methods you need to accomplish this task. Let us know what you come up with. There will be plenty of people here that will help answer specific questions when you run into any problems. Please be sure to illustrate what you have tried so we can help you from there. Keep Coding! Layne
|
Java API Documentation
The Java Tutorial
|
 |
Peter Burke
Greenhorn
Joined: Sep 28, 2004
Posts: 4
|
|
|
yeah yeah yeah, I know how to bring in the file and print it out, my problem is that I don't know how to edit the file once I have it stored away!
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24040
|
|
Originally posted by Peter Burke: I don't know how to edit the file once I have it stored away!
Hence Layne's recommendation to look at String, StringBuffer, and StringTokenizer.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
|
|
|
and of course the regexp package...
|
42
|
 |
 |
|
|
subject: Treemap and Hashmap
|
|
|