Skip to content

Commit 1ff02cb

Browse files
committed
added listing to text
1 parent c4fd0a7 commit 1ff02cb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

source/ch3_javadatatypes.ptx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ public class HistoArray {
826826
</p>
827827

828828
<p>
829-
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:
829+
Lets stay with a simple frequency counting example, only this time we will count the frequency of words in a document. <xref ref="python-word-count" text="type-global"/> shows a simple Python program for what this could look.
830830
</p>
831831

832832
<listing xml:id="python-word-count">
@@ -848,7 +848,7 @@ main()
848848
</listing>
849849

850850
<p>
851-
This program reads the file <c>alice30.txt</c> (which follows), and it then splits it into a list of words. Next it creates a dictionary called <c>count</c> which maps each word to the number of times that word occurs in the text. Finally, it prints out the words in alphabetical order along with their frequency.
851+
This program reads the file <c>alice30.txt</c> in <xref ref="datafile-alice1" text="type-global"/>, and it then splits it into a list of words. Next it creates a dictionary called <c>count</c> which maps each word to the number of times that word occurs in the text. Finally, it prints out the words in alphabetical order along with their frequency.
852852
</p>
853853

854854
<data xml:id="datafile-alice1">
@@ -877,7 +877,7 @@ main()
877877
</datafile>
878878
</data>
879879
<p>
880-
Notice that the structure of the program is very similar to the numeric histogram program.
880+
Notice that the structure of <xref ref="java-word-count" text="type-global"/> is very similar to the numeric histogram program.
881881
</p>
882882

883883
<listing xml:id="java-word-count">
@@ -922,7 +922,7 @@ public class HistoMap {
922922
</listing>
923923

924924
<p>
925-
Improve the program above to remove the punctuation.
925+
Improve <xref ref="java-word-count" text="type-global"/> to remove the punctuation.
926926
</p>
927927
</section>
928928

0 commit comments

Comments
 (0)