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.
Hi. I believe what we're expected to do is have one computer phone set up with teams, with the camera facing us and making sure our main computer's screen (where we do the text on LMS) is visible. Otherwise the invigilator can't see what you're doing...
There may be an error in Michael's marking. For the word rank script, he seems to be calculating rank as the 'nth row' in an ordered list, rather than doing a proper rank algorithm, that traverses the list and only increments rank if words have diffe...
Hi Michael. Just wondering what's the best practice for naming our helper scripts. I noticed for our projects, the final scripts don't have a .sh extension, but for our own helper scripts, should we give them the .sh extension?
Many thanks
This is a very good point. Since Michael has said so in the forum, I've made my code take "pickin'-up" as both contraction and compound, even though it does not fit the spec. I hope we will not be penalised either way.
I had a think about this (as I'm doing the same thing), and I realized that in terms of efficiency, it's not a big difference. UNLESS you're cutting data on each sed call to reduce the number of steps. If you loop over n lines 50 times, and perform 2...
Michael, thank you for clarifying. Can I ask, when using a Sed script and running several commands, does it trawl through the data just once, or again for each command?
For instance, if converting text to tokens, and I do sed -e (command that tokenis...
May I just add, the focus in this course is putting pre-built programs together. We haven't studied their underlying implementations. So it would be difficult to ascertain the O complexity of our programs.
I don't think so. I'd expect awk to come up. It's unfortunate that the audio wasn't recorded, but if you read through the lecture slides, they explain it quite clearly. Michael didn't cover anything that wasn't on the slides.
Michael, I'm still getting 95. Here is a manual count. Am I counting any words here that shouldn't be counted? (Proper nouns, words that begin with apostrophes? etc.)
Going through and manually counting the other samples. There's some small discrepancies between Michael's results and the actual results. As long as these are being marked by a human (and not inaccurate automated tests), it should be ok.
This is really great. Thank you for taking the time to do this.
I think in general, there's just been some confusion regarding expected inputs outputs for both parts of the project. Michael's done a great job clarifying this in the forums, but I still...
This is true. The outputs to the tests are very sensitive to how you parse the text.
For instance, I'm not sure if Michael has allowed for apostrophes in words, in his example (he's, she's, don't, won't), as I'm getting Alice as the 11th, not 12th, m...
You should be able to call the python file like any other script, within your shell script. Eg. python file "text"
It just takes an input, returns an output.
That's a very good point Michael, and thank you for clarifying.
A good number of this course will be coming from the point of view of software engineering, where inputs and usage are expected to be thorough and deterministic. For them, it is difficul...
Sorry Michael, I didn't see your reply when I wrote my response below. So we can assume that the user will express a country in the same language format that will be in the CSV? (I'm assuming we're not being asked to implement an algorithm that handl...
This is a really good point, as it applies to every country in the list. Simple examples include "Iran" vs "Iran (Islamic Republic of)" and "Korea" vs "South Korea" vs "Republic of Korea". But truthfully, how an individual may express a country's nam...