From c4fd0a750586fc59f2f7e0ea17237b9fdf8246e8 Mon Sep 17 00:00:00 2001
From: Habiba Sorour
def main():
data = open('alice30.txt')
@@ -845,11 +845,14 @@ def main():
main()
This program reads the file
Down, down, down. Would the fall NEVER
@@ -872,12 +875,13 @@ main()
nice grand words to say.)
Notice that the structure of the program is very similar to the numeric histogram program.
- -
import java.util.Scanner;
import java.util.ArrayList;
@@ -915,6 +919,7 @@ public class HistoMap {
}
Improve the program above to remove the punctuation.
From 1ff02cbe589cfcf9c1139c47f453ea98fd87e106 Mon Sep 17 00:00:00 2001
From: Habiba Sorour
- Lets stay with a simple frequency counting example, only this time we will count the frequency of words in a document. A simple Python program for this job could look like this:
+ Lets stay with a simple frequency counting example, only this time we will count the frequency of words in a document.
- This program reads the file
- Notice that the structure of the program is very similar to the numeric histogram program.
+ Notice that the structure of
- Improve the program above to remove the punctuation.
+ Improve