diff --git a/source/ch3_javadatatypes.ptx b/source/ch3_javadatatypes.ptx index 199b13b..d7187f6 100644 --- a/source/ch3_javadatatypes.ptx +++ b/source/ch3_javadatatypes.ptx @@ -826,11 +826,11 @@ public class HistoArray {
- 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.
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.
+ Notice that the structure of
import java.util.Scanner;
import java.util.ArrayList;
@@ -915,9 +919,10 @@ public class HistoMap {
}
- Improve the program above to remove the punctuation.
+ Improve