It's UWAweek 5

help2003/help4407

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?
 Posts from 2022 will be available until after the Deferred and Supplementary Exams
164 articles posted by this person
Showing 164 of 564 articles.
Currently 6 other people reading this forum.


 UWA week 23 (1st semester, 1st exam week) ↓
SVG not supported 3:16pm Fri 10th Jun, Michael W.

Hi, I can't help you if I don't know who you are, but I can confirm that Ass 1 feedback had to be removed to allow Ass2 feedback to be uploaded. Those were Chris' instructions. Not sure why. Can anyone else see their feedback? (Remember, I can't see w...


SVG not supported 10:07pm Tue 7th Jun, Michael W.

Hi, That is an excellent question, whose details are mired in politics. Please come and chat with me if you want the complete, messy story. I personally see it the same way you do, but was told that I need to differentiate the units in some way, so I ...


SVG not supported 3:56pm Tue 7th Jun, Michael W.

Hi, The first person who responded is entirely on the money in terms of saying what the code you presented actually does. What I think you may be confusing this is is the substitute command s ,. a-zA-Z . which removes everything from the comma so lo...


SVG not supported 3:14pm Mon 6th Jun, Michael W.

Hi, That depends on the question. If the question is specifically about Sed or Awk, clearly no. Cheers MichaelW


SVG not supported 3:10pm Mon 6th Jun, Michael W.

Hi, If what you're doing is transparent and reasonable, I don't think there should be an issue, but if it looks dodgy the invigilators will call you out. Thankfully, this time round, it's nothing to do with me. I hope you can see the potential for abu...


SVG not supported 12:26pm Mon 6th Jun, Michael W.

ANONYMOUS wrote Hi, While this is entirely new territory for me, I think that is pushing it too far. The invigilators really won't be able to tell whether you are chatting with someone (banned), googling (not good, and hopefully won't help) or looking...


SVG not supported 11:54am Mon 6th Jun, Michael W.

ANONYMOUS wrote Hi, That is correct. It's online, so you can be anywhere to do it (just watch out for the timezones ;-) ) Cheers MichaelW


SVG not supported 8:40am Mon 6th Jun, Michael W.

I do hope there are no more (admittedly very late) submissions.


 UWA week 22 (1st semester, study break) ↓
SVG not supported 11:40am Fri 3rd Jun, Michael W.

Hi, This time round I've been much more explicit about whether I want, or rather don't want, antibugging. Obviously, this only applies to longer bits of code rather than single lines. Cheers MichaelW


SVG not supported 9:08am Fri 3rd Jun, Michael W.

Hi, Just to let you know that I am working my way through the backlog. Each one takes a while to go through in detail to figure out where marks were lost, and then sometimes detailed exchanges that follow. Of course, at that point on the person who s...


SVG not supported 2:28pm Thu 2nd Jun, Michael W.

Hi, Functions are in the unit and I said everything apart from markdown, so yes, potentially. (I clearly cannot say whether any given thing is, or isn't, in the exam. That aside, a Bash function (which is what I assume you are referring to, is just li...


SVG not supported 9:06pm Mon 30th May, Michael W.

Hi There is a longer discussion at Monday's lecture, but the short version is that the exam is 1 1 2 hrs, online (LMS) and open book (which means the internet, and especially the man pages). What is not okay is asking friends or copying things you fi...


SVG not supported 7:46pm Mon 30th May, Michael W.

Hi Hanlin Got it, thanks. All good. Cheers MichaelW


 UWA week 21 (1st semester, week 12) ↓
SVG not supported 7:25pm Fri 27th May, Michael W.

Hi Everyone, It is the Jewish Sabbath (Shabbat). I am now off-line. Get back to you on Sunday. Have a good weekend. Cheers MichaelW


SVG not supported 5:02pm Fri 27th May, Michael W.

ANONYMOUS wrote The Week 4 script was a good starting point for this assignment, but you need to look at the actual specs and modify it to work with these specs, not the class example. Yes, I did use a number of texts, but Alice was unchanged. Cheers M...


SVG not supported 3:32pm Fri 27th May, Michael W.

ANONYMOUS wrote Hi, That is not how ranks work. The 3 10's in your example are equal first, and the 9 is fourth. For example, Alice is position 32 or 33 in the ranked list, so I accepted either (seeing I said to pick one). Similarly, in your example,...


SVG not supported 3:22pm Fri 27th May, Michael W.

Hi Terra There were 12 questions and 16 marks to be distributed so I made Q1, Q2, Q7 and Q9 worth 2; all the rest 1. Daniel and Isaac used the same scheme, but noted down the results differently. For the ones I marked, the tag indicates the number of ...


SVG not supported 2:34pm Fri 27th May, Michael W.

Hi, Thanks for letting me know. How's it now? M


SVG not supported 2:07pm Fri 27th May, Michael W.

Hi Terra, I never assumed shell functions (because we did it so late), but if you see my suggested breakdown in Ass2 there are multiple scripts, and I have talked about problem decomposition. Thus, my solution to Ass1 called subsidiary shell scripts. ...


SVG not supported 9:58am Fri 27th May, Michael W.

Not so fast ..... Because CITS2003 and CITS4407 are aliased I can't upload marks for feedback. Chris can fix it, but needs to go to a meeting. Should be done by lunchtime. sigh M


SVG not supported 9:23am Fri 27th May, Michael W.

Fair enough. In the next hour. M


SVG not supported 10:30pm Thu 26th May, Michael W.

ANONYMOUS wrote Hi Everyone, While Daniels post at this late stage is a little unhelpful, let's analyse what he said. To recap """ 1 Test to make sure your code it do all the examples shown in the project page. 2 Test your code INSIDE THE DOCKER ENVIRONME...


SVG not supported 8:35am Thu 26th May, Michael W.

Hi, That is my hope. I now have marked scripts from Daniel, Isaac and, of course, myself. Now need to do the reconciliation against all the submission to make sure no-one's work fell between the cracks and then process late penalties. Simple, really. C...


SVG not supported 8:57am Mon 23rd May, Michael W.

Hi, Similarly to contractions (possessives), a compound word must have hyphen between two simple words. (Remember, simple word can have only one letter.) As for having it in the spec, I think (hope) you'll find that they are already in the definitions ...


SVG not supported 8:51am Mon 23rd May, Michael W.

Hi, No only letters are considered parts of words. Cheers MichaelW PS I really have mentioned this earlier, honest. -)


 UWA week 20 (1st semester, week 11) ↓
SVG not supported 11:12am Sun 22nd May, Michael W.

Hi Terra, For our purposes, "it's" is a possessive under the rules I set up, but 'em and pickin' are just a words (not a contractions) - see previous discussion. As I said, this is a first cut at an NLP task, and while it's interesting how far you can ...


SVG not supported 9:37am Sun 22nd May, Michael W.

Hi, Yes, I've said in a couple threads that single quotes appearing before or after a word are to be ignored as speech marks, even if you and I know that, in the context, they are actually contractions. That understanding is well beyond this unit, whi...


SVG not supported 5:27pm Sat 21st May, Michael W.

Hi, The only things that can be regarded as compound words are simple word - simple word) or simple word '- simple word (which is both a contraction AND a compound word). --, ---, ----, are all to be converted to blank. BTW, it is for this reason t...


SVG not supported 4:02pm Fri 20th May, Michael W.

Hi Peter Done. Thanks for the reminder. I was having way to much fun marking Assignment 1. Cheers MichaelW


SVG not supported 3:48pm Fri 20th May, Michael W.

No, you won't. It was something I missed. Cheers MichaelW


SVG not supported 3:47pm Fri 20th May, Michael W.

Hi What happens inside the suite of scripts is entirely up to you, including what they are named. I just need to insist on the name of the top level script so my automarker can call it. Really no different to having an API, and then what happens insi...


SVG not supported 2:00pm Fri 20th May, Michael W.

Thanks for letting me know. Fixed. Cheers MichaelW


SVG not supported 1:51pm Fri 20th May, Michael W.

Hi, Each bit answered in situ Cheers MichaelW ANONYMOUS wrote Don't care. No less than 3, please That was affected by a very obscure bug which only occurred when a word, beginning with or (like ordinary) appears in a compound-word, such as "ordinary-sized...


SVG not supported 1:28pm Thu 19th May, Michael W.

Hi Justin, Anything that needs changed permissions, my autotesting program will will do that, never fear. OTOH, any chmod a user script does is rerouted as potentially dangerous. (That is how the person who set everything in the parent directory to 60...


SVG not supported 8:09pm Wed 18th May, Michael W.

Hi, I added debugging printing to the tokenizer, and I now see that " 'that's" being rendered as a contraction. The first ' is actually the start of quoted speech so can be ignored. The second ' should be interpreted as a possessive under the rules I...


SVG not supported 1:56pm Wed 18th May, Michael W.

Hi Alicia Here is my list. BTW. A compound word with 3 hyphenated components only counts as 1 word and 1 compound word. Cheers MichaelW shirt Hyphen sleeves taxi Hyphen drivers blue Hyphen overalled grass Hyphen lawn fresh Hyphen faced pale Hyphen faced well H...


SVG not supported 1:24pm Wed 18th May, Michael W.

Hi Alicia, I figured out what the difference is. The spec talks about - as a hyphen, between two words. What you have in this text are a couple free-standing hyphens (which should really be em dashes aka hyphen pairs, but here were rendered as singl...


SVG not supported 12:56pm Wed 18th May, Michael W.

Hi, I've been asked about the extent of commenting I require (and you should routinely do). Comments should be reasonable; A thicket of comments is also bad, obscuring the actual program text. Bottom line is that another programmer should be able to ...


SVG not supported 12:45pm Wed 18th May, Michael W.

Hi, At least some people seem to be confused about what's to happen with a profile (if one input file) or the pair-wise analysis. What the spec has said is, "If one file is specified, a profile should be created and printed out". I assumed that "print...


SVG not supported 8:56am Wed 18th May, Michael W.

Hi Alicia, I checked just now and more-or-less (as a single word text) is indeed counted both as a word and a compound word. " word 1 contraction 0 compound word 1 " It is possible you have an old version of the file in your browser cache. If you reload it...


SVG not supported 8:48am Wed 18th May, Michael W.

Hi, As promised in the emails, apart from the 1 question survey of what you'd like me to do in the last week, there will be at least one Q A session. Please just down on this thread anything you'd like me to go over. Cheers MichaelW


SVG not supported 10:04pm Tue 17th May, Michael W.

Hi Hanlin, Your program should simply print the profile or the comparison of texts, on standard output. I had to give these outputs a name in order to allow the web page to refer to them and thus show you. Cheers MichaelW


SVG not supported 10:01pm Tue 17th May, Michael W.

Hi Rick, Done. For each of the longer text samples I have now posted the corresponding profiles. Hope that helps. Cheers MichaelW


SVG not supported 9:30pm Tue 17th May, Michael W.

Hi Hanlin, ) If the user provides 1 text file, your program should return the corresponding profile ) If the user provides 2 text file, your program should compute the two profiles, normalise each, compare the normalised profiles, after which the pr...


SVG not supported 9:26pm Tue 17th May, Michael W.

Hi Justin, There are 2 instances of "also" in Lawrence, 0 in Lawson. However, when that counts for each profile are normalised (as per the spec), Lawrence goes to 1.52905 . Lawson, of course remains 0. The difference therefore is 1.52905, which when...


SVG not supported 9:10pm Tue 17th May, Michael W.

Hi, So long as everything you've created is in the zip file, and, of course, you use names consistently, AND the top level name is what I've specified, then all will be well, as it was for the first assignment. Just assume that everything lives in the...


SVG not supported 5:36pm Tue 17th May, Michael W.

Hi, No, please just print the actual profile, as that is readily checked for small samples. Normalisation only makes sense in the context of comparison. More to the point, normalisation cannot be undone so better to have the original profile. In any ...


SVG not supported 3:55pm Tue 17th May, Michael W.

Hi Justin (and everyone), I just realised that there were two levels of confusion. Yes, by samples I meant just those snippets. The only example of a full text analysis was the recently added Huckleberry Finn, as requested. However, I think I have now ...


SVG not supported 1:52pm Tue 17th May, Michael W.

Hi Everyone, While I occasionally get things wrong - and am very appreciative of people who let me know so I can correct things - but this time I really did say, "... What I have also chosen to report is the squares of the style-metric differences,.."...


SVG not supported 1:43pm Tue 17th May, Michael W.

Hi Peter, If you stick with the formula (which is quite silly in this case) your solution will be the same as (or close to) the sample one. Remember, all standards are equally arbitrary choices, it's just that one that people have agreed to. Think QWE...


SVG not supported 1:39pm Tue 17th May, Michael W.

Hi Marc, What you may have done, and what I did until Justin pointed it out, is that you've missed the relatively small number of instances where conjunctions are found at the beginning of sentences, and hence capitalised. "And" is the same as "and", ...


SVG not supported 5:29pm Mon 16th May, Michael W.

Agreed. You count conjunction when they are acting as conjunctions, i.e. on their own. When found as part of compound words, e.g "one-and only", they are just a component of a compound word (which scores 1 word and 1 compound word). Cheers MichaelW


SVG not supported 5:25pm Mon 16th May, Michael W.

Hi, I'd missed ... (elipsis), but in any case dot is understood as full stop, so looks like we have an empty sentence. Don't worry about it. As I've said elsewhere, I want to keep things sensible. Logically, a dot is only a full-stop if preceded by at...


 UWA week 19 (1st semester, week 10) ↓
SVG not supported 5:58pm Sat 14th May, Michael W.

Hi, Will do. It may have to wait till Monday as it's tricky getting files past the UWA fire-wall. Cheers MichaelW


SVG not supported 5:26pm Sat 14th May, Michael W.

Hi, Sorry, but with the delay getting the automarking to work (most of which has been spent dealing some truly bizarre code, though I didn't know it at the time sigh ) we're only now really getting into marking. It may done by Monday week, but don't ...


SVG not supported 3:58pm Sat 14th May, Michael W.

Hi Justin and Matt, To be utterly precise, "pickin'-up" is both a compound word AND a contraction (short form of "picking"). Indeed, what I said in the earlier posting was "1) Well spotted. I think you'll agree that it is an interesting stylistic cho...


SVG not supported 2:10pm Sat 14th May, Michael W.

ANONYMOUS wrote Hi, Yes, please. Of course, this assignment could equally have been done in, say Python (and was a few years ago), but that not the point of this unit, which is Shell and open source tool scripting. While basic natural language proces...


SVG not supported 2:05pm Sat 14th May, Michael W.

ANONYMOUS wrote Hi In best academic tradition, the answer is Yes and No (but mostly No). It matters greatly that you use the top level name that I have specified. Thus malaria incidence and common words in the last assignment and style cmp for this a...


SVG not supported 8:47am Fri 13th May, Michael W.

No, you have well understood it 99 correctly. The other 1 is the land of the Gotcha. In this case, Yes, the computational complexity is exactly the same. The other 1 is that working in the computer's memory is faster than going out to the long ter...


SVG not supported 3:03pm Thu 12th May, Michael W.

Hi, The big cost is slurping the lines out of the files, which is slower than having what you need in memory already. What Sed and Awk do is grab a line at a time. Your program can then do whatever with the line, before a new line is obtained. Another...


SVG not supported 2:34pm Thu 12th May, Michael W.

Hi, Sorry for being unclear. I am only referring to the programs you write. For example, using cut multiple times, as you may have had to do in the last assignment because we'd not covered awk, is very inefficient (which is why efficiency was not ment...


SVG not supported 1:21pm Thu 12th May, Michael W.

Hi, grepping multiple times, esp if it relates to a file, can be very slow. Clearly the texts of the input files need to be transformed, and doing everything in one scripts is a recipe for disaster. Better a separation of concerns, as suggested by th...


SVG not supported 8:21am Thu 12th May, Michael W.

Hi, Clearly, in this tip I'm trying not to be overly specific - it's tip, not an answer - but please look at the word count example that I began the unit with, and then reworked a number of times. That takes text, formatted as words per line and ends ...


SVG not supported 8:15am Thu 12th May, Michael W.

Hi Rajwant, Please see the help4407 thread on "Unrecorded lecture" Cheers MichaelW


SVG not supported 10:44pm Wed 11th May, Michael W.

Yes, word-pair is a compound-word. I use the latter term as there may be more the two words, e.g. one-of-a-kind, so "pair" seemed inappropriate. Cheers MichaelW


SVG not supported 10:42pm Wed 11th May, Michael W.

Hi Adam What I'll is answer each part next to the question, rather at the end and need to flip back and forth, okay? Double hyphen receives special mention because you genuinely need to deal with hyphen, so you can't simply get rid of it, as you do, fo...


SVG not supported 5:46pm Wed 11th May, Michael W.

Hi Peter, Done. Or rather, I think it's done. The site is not being served correctly. I assume it'll be okay when the server relaunches. Cheers MichaelW


SVG not supported 3:21pm Wed 11th May, Michael W.

Hi, Many thanks for taking the trouble to do the example by hand. Long story short. The problem with my code was that the tokenizer looked for the patter " for", not " for ", so forty-five was mis-classified. Fixed. I've uploaded the recomputed data ...


SVG not supported 10:21am Wed 11th May, Michael W.

That is correct. Cheers MichaelW


SVG not supported 8:56am Wed 11th May, Michael W.

That is correct. You need to count dot, exclamation marks and question marks to count sentences, but you don't need to add any of these, as such, to the profile. This is the opposite of hyphen, where a hyphenated word is counted once as a compound wo...


SVG not supported 8:37pm Tue 10th May, Michael W.

ANONYMOUS wrote Hi, 1) Well spotted. I think you'll agree that it is an interesting stylistic choice by the author, to indicate very informal speech, e.g. in Children of the Bush. Logically, it's both a contraction and a compound-word, so therefore al...


SVG not supported 3:09pm Tue 10th May, Michael W.

Hi Georgia, My apologies, but 95 is indeed correct. I posted an update here a short while ago, after I realised that my program did not count the two instances of 'Roo sigh Cheers MichaelW


SVG not supported 2:26pm Tue 10th May, Michael W.

ANONYMOUS wrote Hi, Well done Sorry that I cannot thank you by name, but, Yes, you are right. My program was not counting the two instances of 'Roo. It now does. I'll shortly upload a new set of example output files. Cheers MichaelW


SVG not supported 1:16pm Tue 10th May, Michael W.

Hi Peter, Nice one No, I think that'd be one wrinkle too many; "one-and-only" is just added to the word and a compound-word counts. Cheers MichaelW


SVG not supported 11:42am Tue 10th May, Michael W.

Hi, My apologies once again for the lectures that failed to be recorded. From the next one I shall also record the MS-Teams broadcast, just to have a backup. At least for the Team meeting recording, if I've forgotten to turn on the mic someone will in...


SVG not supported 11:36am Tue 10th May, Michael W.

Hi, I'm working on the automated marking. As much defensive code as as put it turns out not to be quite enough grin . I'm hoping to get that finally going today and will have it distributed by the markers first thing tomorrow. Cheers MichaelW


SVG not supported 9:24am Tue 10th May, Michael W.

Hi Terra, When I finally get the automated marking to work (sigh) and the scripts are marked, you will find that each test is listed, together with the output. Cheers MichaelW


SVG not supported 9:20am Tue 10th May, Michael W.

Hi, The earlier thread was getting a bit long, and I worried that this posting may be lost. I now am convinced that the 93 words in the update from the other day is correct. I added some debugging to a a version. The debugging prints out the word as w...


SVG not supported 10:33pm Mon 9th May, Michael W.

Hi Amandeep, A sentence has nothing to do with n, which simply relates to the placement of the lines on the screen. A sentence is a sequence of one or more words ending with a full-stop (dot), exclamation mark or question mark. Cheers MichaelW


SVG not supported 10:26pm Mon 9th May, Michael W.

Thanks. I also manually counted, but my definitions may have changed in the interim. Seeing a couple people are getting the same result, I have another look tomorrow.


SVG not supported 3:56pm Mon 9th May, Michael W.

Hi Justin, Again, well spotted Fixed (I believe.) Cheers MichaelW


SVG not supported 3:10pm Mon 9th May, Michael W.

I have now updated the description of the examples to reflect the new normalisation method. Cheers MichaelW


SVG not supported 2:38pm Mon 9th May, Michael W.

Hi Yes. From now on I'll do both to avoid this very embarrassing situation recurring. If I fail to turn on the mic for the Team meeting, someone is sure to let me know. Unfortunately, there is no similar notification for the lecture-theatre mic. sig...


SVG not supported 2:36pm Mon 9th May, Michael W.

ANONYMOUS wrote Hi, That is correct. Over the weekend I was unable to load the revised examples, but that will happen this afternoon. Cheers MichaelW


SVG not supported 12:10pm Mon 9th May, Michael W.

Hi, This has never happened to me before, but the lecture recording for this lecture - where I largely recapped the previous failed recording - also failed. I really am sorry. MichaelW


SVG not supported 12:10pm Mon 9th May, Michael W.
Edited: shortly thereafter

Hi Michael. Is it possible to release the test cases that will be used to mark project 1 so we can play around ourselves, once people with special considerations submit everything? I personally find it very helpful in terms of learning, and understan...


 UWA week 18 (1st semester, week 9) ↓
SVG not supported 2:11pm Sun 8th May, Michael W.

Hi, That is correct. Please see the text in the spec about double hyphen being different from hyphen. Cheers MichaelW


SVG not supported 5:16pm Sat 7th May, Michael W.

Hi, Anonymous is fine. I'd rather you post anonymously than not at all Re the date due, it is the Monday of Week 12. I could make it a little later that week, but clearly no further because unless there is no exam, assessment cannot extend past the e...


SVG not supported 5:11pm Sat 7th May, Michael W.

Hi Justin Good question. Of course you are right, but for the purposes of this assignment 's will only be a possessive, please. To go beyond that would entail part-of-speech tagging and linguistic analysis, which is very interesting, but WELL beyond t...


SVG not supported 4:16pm Wed 4th May, Michael W.

Hi, Just to let you know that today's recording has no sound. With all that is going on in the unit I don't have time to record a new version, so I'll briefly recap the content next class. As it was I didn't complete the material, so will also use the t...


SVG not supported 5:35pm Tue 3rd May, Michael W.

There was meant to be. Thanks for letting me know. Confusion, I expect. My apologies otherwise; I believed we had it covered. Cheers MichaelW


SVG not supported 5:12pm Tue 3rd May, Michael W.

Hi, Just a reminder that for the time being (so probably to the end of the unit), all labs are on-line. While restrictions have formally eased, the incidence of Covid19 is increasing. Sitting in a lab for 2hrs with someone who probably does not Covid, b...


SVG not supported 9:38pm Mon 2nd May, Michael W.

Hi James, If the "do" was below the "for" there is no need of a semicolon (which is how I set it out in my examples). When it's on the same line it gets confused as to whether the do is actually one of the things the for loop is iterating over. I the...


SVG not supported 2:57pm Mon 2nd May, Michael W.

Hi, Given that it will be marked by a human, I don't think it matters either way. It goes into the realms of bells and whistles, which are no substitute for solid code doing the job. However, if your code is solid, then like the proverbial chicken sou...


SVG not supported 2:57pm Mon 2nd May, Michael W.
Edited: 2 mins later

(This got tagged to the wrong thread )


SVG not supported 8:58am Mon 2nd May, Michael W.

Hi, I understand some of you have been finding the first assignment a stretch, and are uncomfortable with the ambiguity of tests you've not seen. I do get that, so believe I should say something about why it is that I'm doing what I'm doing. My view is...


 UWA week 17 (1st semester, week 8) ↓
SVG not supported 12:16pm Sat 30th Apr, Michael W.

Hi, Given that these are very common words in real texts, they are only capitalised at the starts of sentences. And rarely appears at the start of a sentence, for example. In other words, it doesn't much matter. FWIW, I don't change the capitalisation...


SVG not supported 12:10pm Sat 30th Apr, Michael W.

Hi, Yes, title case.py will remain being called title case.py. Doing anything else would be slightly perverse, no? ;-) (I'm really not that bad.) Cheers MichaelW


SVG not supported
.sh  (both)
9:52am Sat 30th Apr, Michael W.

Hi, As far as Bash and Unix are concerned, the suffix is irrelevant. Ditto any Shell or other scripts you use within your overall program. However, the top level names have to be precisely the ones specified in the spec; otherwise my testing script wil...


SVG not supported 1:29pm Fri 29th Apr, Michael W.

BTW, also in response to a question raised at today's lab session, I'll begin Monday's lecture with a comparison of Shell for and while loops, which you use and why. Have a good weekend Cheers MichaelW


SVG not supported 1:24pm Fri 29th Apr, Michael W.

Hi, Just to let you know that I have posted an updated version of title case.py, which deals with the issue of hypenated names not being capitalised correctly. Before this, Timor-Leste was converted to Timor-leste, which is clearly not correct. That def...


SVG not supported 9:53am Fri 29th Apr, Michael W.

Hi, First off, please bear in mind that everything in brackets can be ignored (and Sudan, given the ambiguity about which Sudan we're talking about). The truth is that this is intended as a Shell programming exercise, not real data-science. The teachi...


SVG not supported 9:44am Fri 29th Apr, Michael W.

Hi, Let's keep it simple. Just return one of them. (No problem if you return of the equal best.) Cheers MichaelW


SVG not supported 9:38am Fri 29th Apr, Michael W.

Hi, I will only use the existing text, not contractions, which would be unfair. I also said to please ignore Sudan, as it's genuinely ambiguous, and assume that anything in brackets can be ignored. After using the helper program to deal with capitals ...


SVG not supported 9:33am Fri 29th Apr, Michael W.

Hi Everyone, There is no "Chat with Camillo", or rather, there was, but it was meant to be a private chat with Camillo, in this case online, rather than in my office, as you all can do. Unfortunately, it was yet another Teams gotcha, and the invitatio...


SVG not supported 10:25pm Thu 28th Apr, Michael W.

Hi, I am not suggesting that you use cat -vet to remove the non-ASCII characters; it was just my way of showing that they are present. There is another Unix command which I have used several times (likely you too) that will do the trick rather more si...


SVG not supported 10:20pm Thu 28th Apr, Michael W.

Most of the issues will disappear if use the Python program I created. However, Viet Nam Vietnam will required special handing, as both are widely used names of that country. Cheers MichaelW


SVG not supported 10:12am Wed 27th Apr, Michael W.

Hi, While the spec could have said most common word across all the file taken together, i.e. in effect one large corpus, the spec actually wants to have the Nth most common word across the largest number of files, so if N 5 and "a" appears in position...


SVG not supported 9:43am Wed 27th Apr, Michael W.

Hi, Without looking at your code (which would be unethical in these circumstances) it's hard to know, but things I can suggest are ) Did you translate upper case to lower case, as in the lectures. The assignment spec says not to. ) It is possible it ...


SVG not supported 9:33pm Tue 26th Apr, Michael W.

Hi Chuanhe, Then you need to start the docker app (if you've not already done so) and use the docker run command (modified for your directory structure). If all that works you will be running a Linux instance in which Python is available and the progr...


SVG not supported 8:40pm Tue 26th Apr, Michael W.

Hi Marc, The second part will inevitably be slower. In the first part you are traversing one file of 2,500 lines. For the second part you are traversing multiple, say 10, files with a total of 95,000 lines of text. Please don't get too fixated on spe...


SVG not supported 8:32pm Tue 26th Apr, Michael W.

Hi, I have now uploaded the marks for Test1 to csmarks https secure.csse.uwa.edu.au run csmarks What you will find is your mark for Test1 and its contribution to 20 of the final mark (called OVERALL). In addition seeing your own mark, if you click on ...


SVG not supported 7:45pm Tue 26th Apr, Michael W.

Hi Terra, Sure. The long and the short of it is that if you have it in same directory as the data, and assuming '.' is on you PATH then you call it like any other Unix program. (It may require chmod). Cheers MichaelW


SVG not supported 4:34pm Tue 26th Apr, Michael W.

Hi, Just to let you know that we have secured the services of Isaac Bergl to look after the Tuesday and Wednesday labs. My apologies for today's lab; that fell between the cracks, but Isaac will be starting tomorrow (Wed 27th). Just to record my thank...


SVG not supported 4:30pm Tue 26th Apr, Michael W.

Hi Chuanhe, The Window's environment won't know what to make of the file. You need to put it in the directory that maps to perm when you run docker. Then the docker instance will see it, and will be able to handle it. Cheers MichaelW


SVG not supported 2:30pm Tue 26th Apr, Michael W.

ANONYMOUS wrote If you are on an older MacBook, Bash is the default shell when you use the Terminal command. Newer models use Zsh, which is very much like bash. There are some differences with the various commands, but the differences, if present, a...


SVG not supported 11:30am Tue 26th Apr, Michael W.
Edited: shortly thereafter

Hi, First off, just to let you know that I have updated the Assignment 1 spec to include all the clarifications I have made via help4470 to the spec, so you can have them all in one place. BTW, what it also illustrates is the necessity of data-cleanin...


SVG not supported 10:06am Tue 26th Apr, Michael W.

Hi Marc, Better not to add the text files because of the space that will consume across all the people in the class. I will be using my own versions of the incidenceOfMalaria.csv and the text files, so it makes no difference whether you include your o...


SVG not supported
Labs  (both)
10:04am Tue 26th Apr, Michael W.

Hi Terra, Yes. The open question is whether they are face to face. The other piece of news is that Ryan has resigned from lab demonstrating, so we are currently short-handed. I'll post something about that in a few minutes. Yet another wrinkle in a un...


SVG not supported 4:10pm Mon 25th Apr, Michael W.

Hi, One thing that immediately follows from my saying that bracketed stuff should be ignored, Sudan is genuinely ambiguous, as there is inconsistency in the data whichever way you turn. Let's agree to set that one aside. Cheers MichaelW


SVG not supported 4:05pm Mon 25th Apr, Michael W.

Hi Rashmi, I'll reply to each question in turn. A sensible rule is that if that can be done unambiguously, then the contraction is okay. Emirates is a very good example, as that is how they are commonly known in English. Viet Nam Vietnam was mentione...


SVG not supported 3:52pm Mon 25th Apr, Michael W.

Hi Daniel That is correct. Cheers MichaelW


 UWA week 16 (1st semester, week 7) ↓
SVG not supported 9:14pm Fri 22nd Apr, Michael W.

ANONYMOUS wrote While logically a hyphenated word-pair logically counts as a single word, for our purposes this time round, I'll keep the definition of a word to simply be what I've been using in the lectures an alphabetic, followed by zero or more ot...


SVG not supported 9:08pm Fri 22nd Apr, Michael W.

Hi, In response to the questions on help4407 regarding how to handle capitalisation in country names, I have created a small program to deal with that. You can find the new helper program linked to the Assignment 1 page (which is linked to the Weekly...


SVG not supported 10:43pm Thu 21st Apr, Michael W.

Hi Hanlin, Greetings from Kalgoorlie. Clearly, Viet Nam and Vietnam are the same place, and it would be incorrect and unhelpful to say that the data is not found in the dataset. Clearly, your program will need to do some data cleaning up front on the co...


SVG not supported 10:29pm Thu 21st Apr, Michael W.

ANONYMOUS wrote Hi, This code was in a file, where 1 - the first argument - is the name of a directory. ' ' matches anything, so .py matches any file that has suffix .py . So, for i in 1 .py is a loop where variable i is given the names of all the...


SVG not supported 10:20pm Thu 21st Apr, Michael W.

ANONYMOUS wrote


SVG not supported 10:20pm Thu 21st Apr, Michael W.
Edited: 4 mins later

ANONYMOUS wrote Hi, The whole point about anti-bugging is foremost, to let the user know that there is a problem, and then do something sensible. For example if N is larger than the number of words, it won't be found. Say something. This relates to th...


SVG not supported
sed  (both)
8:36pm Wed 20th Apr, Michael W.

Ignoring the g at the end of the command, the command will substitute the first instance from the list of characters encountered in the text with the replacement character. The g means it will happen for every instance. Cheers MichaelW


SVG not supported 8:13pm Wed 20th Apr, Michael W.

ANONYMOUS wrote Hi, I think we can agree that you can't simply do nothing. So, with all potential errors, the first requirement is that you spot the error and let the user know that something is not right. If you can sensibly proceed, then let the user...


SVG not supported 8:14pm Tue 19th Apr, Michael W.

ANONYMOUS wrote Hi, That depends on the Part you are tackling. For the second part, the spec says a directory is expected as the second argument. Cheers MichaelW


SVG not supported 6:54pm Tue 19th Apr, Michael W.

Hi Bryan, Seeing that is the format that the data as downloaded uses, that is the format I'll be using for testing. Cheers MichaelW


SVG not supported 6:51pm Tue 19th Apr, Michael W.

ANONYMOUS wrote Hi, Greetings from Kalgoorlie. That is surprising. To inject a little precision into the discussin grin you can use the built-in Bash command time, to account for how much time a command actually takes. On my mid 2016 MacBook Pro, ti...


 UWA week 15 (1st semester, non-teaching week) ↓
SVG not supported 10:02pm Sat 16th Apr, Michael W.

ANONYMOUS wrote Hi, The example you give is where the code would not run. That is a another matter entirely. What happens in that case is that if the marker can see a ready solution, then they'll implement the fix, run the code against the tests, but ...


SVG not supported 11:54am Sat 16th Apr, Michael W.

Hi, Just something you may find useful. When you are testing your program, you can sometimes get lost in all the stuff that the program is printing out. Debugging echo statements are definitely useful (and recommended), but you can end up drowning as th...


SVG not supported 5:40pm Wed 13th Apr, Michael W.

ANONYMOUS wrote Hi, 1) We will be using precisely that file, called by that name. Given that the data is unique, there is no point making the name of input file a parameter 2) Except for a little cleaning (mostly related to using integer data), the fil...


SVG not supported 5:30pm Wed 13th Apr, Michael W.

Hi Terra, For your development, just download a copy of the file. You can assume that the file (with precisely that name), will be in the same directory as the script. Given that this is a unique data file, there is no point making the file name a param...


SVG not supported 12:08pm Wed 13th Apr, Michael W.

Hi With today's lecture you now have what you need to do both parts of the assignment. Good luck. So, whatever you are now celebrating, or will shortly be celebrating Happy Easter Ramadan Kareen Chag Sameach And whether you are celebrating something ar...


SVG not supported 9:28am Wed 13th Apr, Michael W.

Hi Hanlin, Fixed. Thanks for letting me know. The correct name is "common words". Cheers MichaelW


SVG not supported 9:26am Wed 13th Apr, Michael W.

Hi Hanlin All the links on the left hand side of the page have now been fixed. Thanks for letting me know. Cheers MichaelW


SVG not supported 10:30pm Tue 12th Apr, Michael W.

Hi Hanlin Great question. Yes, please, preserve the upper or lower case of the letters, but, as before, only sequences of 1 or more letter can make up words. Thanks for pointing this out. I shall change the spec tomorrow. Cheers MichaelW


SVG not supported 5:39pm Tue 12th Apr, Michael W.

Hi Everyone, I have updated the Assignment 1 web page to add some examples of the programs in action. Please get back to me if anything is unclear, or needs expanding. Cheers MichaelW


SVG not supported 10:29am Tue 12th Apr, Michael W.

Hi everyone, While the system is set up for you to post anonymously, and there are circumstances where you may be more comfortable doing that, why not own the sensible questions you are asking. I much prefer talking to a real person; I suspect Ryan fe...


SVG not supported 10:18am Tue 12th Apr, Michael W.

ANONYMOUS wrote Hi, For example, across the 10 files in the Gutenberg sample, "the" is the most common word in 9 of them, but "I" is the most common word in the 10th. For -nth 2, the most common across the 10 files is "and", with 5 hits. Makes sense? Ch...


 UWA week 14 (1st semester, week 6) ↓
SVG not supported 8:04pm Tue 5th Apr, Michael W.

The exit status is precisely that; did the program successfully complete (i.e. get to the end without having some function fail). In a sense, that is not the same as complete successfully (ie do something sensible). By antibugging you are, in effect, ...


SVG not supported 7:02pm Tue 5th Apr, Michael W.

Hi Ashley, Ryan is, of course, absolutely right; they do identical things and it's a matter of style. Here is why I make the choices I do ) I prefer usr bin env bash (in this case, python, whatever) because it relies on exactly one program being w...


SVG not supported 4:52pm Tue 5th Apr, Michael W.

Hi, It just occurred to me, given the odd questions I have been receiving, that when I say that the material covered in the test includes L1-L8 plus part of L9, I want to emphasise that that includes the demo. There demos were part of those lectures, a...


SVG not supported 12:24pm Tue 5th Apr, Michael W.
Edited: 4 hours later

Hello Michael, I just want to double check about the material for the tomorrow test. The test will contains L1 to L8 including shell arithmetic part from L9 and lab 1 to lab 4 (i.e. from week 2 to week 5). Thank you. That is correct


SVG not supported 11:59am Tue 5th Apr, Michael W.

ANONYMOUS wrote Hi, It just tells the Shell how to interpret the script; by default ordinary Shell is used, not Bash (I believe). Either way, it s good to be explicit about it. Cheers MichaelW


 UWA week 13 (1st semester, week 5) ↓
SVG not supported 12:51pm Sun 3rd Apr, Michael W.

Hi, There are a couple possible explanations. The first is that, as well as bin bash at the start, you also need to made the file executable i.e. chmod u x days (or chmod 700 days). The other possibility is that the shell doesn't know where to look...


SVG not supported 9:12pm Thu 31st Mar, Michael W.

Hi, This query came to me via Daniel Smith. People who have been watching carefully as it did my demos have noticed that at times I have typed on a new line. My apologies; it is rather useful, but also rather obscure (though covered in your introduct...


 UWA week 12 (1st semester, week 4) ↓
SVG not supported 12:32pm Thu 24th Mar, Michael W.

ANONYMOUS wrote Hi, As someone else has pointed out more recently, we use stderr in order to keep error messages, status updates, etc (i.e. not directly relevant to the purpose of the program) away from the program outputs that you, presumably, are inte...


SVG not supported 3:17pm Mon 21st Mar, Michael W.

Hi, While lecturers are professionally coy answering questions about coming exams, and always feign forgetfulness grin , the most truthful answer I can give right now is I don't know. In all the years I've been lecturing, I've never set an open book e...


SVG not supported 9:52am Mon 21st Mar, Michael W.

Hi, The report for our little survey of when to release lab solutions is attached. Largest number were for week after. Cheers MichaelW


 UWA week 11 (1st semester, week 3) ↓
SVG not supported 2:12pm Wed 16th Mar, Michael W.

Hi Everyone, You know how your mother (or your lab instructor, etc) insist that you need to tidy up after yourself? You may notice that the little program I created failed to do that, and left stuff lying around. What more did I need to add to the code?...


SVG not supported 9:04am Wed 16th Mar, Michael W.

Hi Michael, That is correct. As an educator, it is tempting to make the labs assessable, to ensure that people give them a try. OTOH, I believe there needs to be a "safe-place" in the unit where you can make a total mess of question and get help, without...


SVG not supported 4:31pm Tue 15th Mar, Michael W.

Hi, I've been asked to release the answers to the labs. My inclination is to unhide the answers the week after the corresponding lab, the idea being to give you a genuine opportunity to try doing them yourself (In my experience, having the answers right...


SVG not supported 11:31am Tue 15th Mar, Michael W.

Hi, Done. I was asked during the last class to make slides available before the lectures, rather than after. I have now set this us for the next couple of lectures (and posted yesterday's, of course). The point I made to the people I was chatting with, w...


SVG not supported 9:43am Tue 15th Mar, Michael W.

Hi That s because the slides are being posted to the unit web page https teaching.csse.uwa.edu.au units CITS4407 (click the Weekly Schedule tab on the left). I only use LMS as a way of ) posting Announcements (which you can back to later), ) acce...


SVG not supported 9:23am Mon 14th Mar, Michael W.

No, the University, most unhelpfully, includes in the timetable all the slots that we might have used; not those actually being used. Mon 8am was available for a while before the start of semester, but as there were only a few takers it was deemed u...


 UWA week 10 (1st semester, week 2) ↓
SVG not supported 4:23pm Thu 10th Mar, Michael W.

ANONYMOUS wrote Hi, All the labs are currently online due to capacity limits applying the F2F labs. I hope that will change soon. When it does, the F2F labs will be F2F only; the online labs will continue being online. Just before noon I posted an ann...


SVG not supported 10:08am Thu 10th Mar, Michael W.

ANONYMOUS wrote Hi, Done. Cheers MichaelW


SVG not supported 9:50am Thu 10th Mar, Michael W.

Hi, A few people have asked me about a Week 3 test quiz. There is no week 3 quiz. If you find that page, you are looking at an old version of the unit. Please review the first lecture, L0 for details about this year s unit. There will be a test in We...


 UWA week 9 (1st semester, week 1) ↓
SVG not supported 2:45pm Fri 4th Mar, Michael W.

Hi, Welcome to help4407, which is in effect also help2003. help4407 is intended to be the informal counterpart to the more formal announcements that I post via LMS announcements. More importantly, you are able to respond to posts or post your own queries...

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  2:26AM Jan 17 2023
Privacy policy