It's UWAweek 48


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 564 articles.
Currently 4 other people reading this forum.

 UWA week 17 (1st semester, week 8) ↓
SVG not supported

Login to reply

4:35am Wed 27th Apr, ANONYMOUS

Hello, So far, my program is correctly getting the word "the" as being the top in 9 files, as well as getting the word "and" as the top 2nd in 5 files (successfully using -nth 2). However, upon implementing the optional argument -w and checking it for "Alice", it is giving me back a rank of 11. Here are the top words that I am getting for AliceInWonderland.txt (their rank are on the left, hit# in the middle): 1 1697 the 2 849 and 3 794 to 4 672 a 5 609 of 6 500 she 7 453 said 8 448 it 9 415 in 10 389 I 11 383 Alice 12 354 you 13 353 was 14 255 as I initially thought that the difference in rank could be due to a difference in the way I am handling my "words", i.e. the rules I am using, deleting special characters etc.. However, from the list above I can hardly see how removing special characters in this case could give me a different answer from the assignment example. In other words, it would be difficult for a word like "common-garden", now split into "common" and "garden", to make a word disappear from above "Alice" and thereby reducing its rank. My reasoning now follows with two questions: 1) Could it be that there was a mistake in the assignment example? (unlikely) 2) Could it be that I am not handling the 'words' appropriately? (likely). Regarding my reasoning number 2), I do believe that I am handling my words as best as I can, and that my program is working as intended. The difference seen in the ranking may be due to something trivial and/or subjective, instead of being due to an objective programming mistake. Should this be the case, will we be loosing marks for not "nailing" your program exactly (with the new set of text files you will be using) ? Thank you in advance for your clarification

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy