In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.
Chapter 21 // Exercise 13
Write a program to "clean up" a text file for use in a word query program; that is, replace punctuation with whitespace, put words into lower case, replace "don't" with "do not" (etc.), and remove plurals (e.g., ships becomes ship. Don't be too ambitious . For example, it is hard to determine plurals in general, so just remove an 's' if you find both ship and ships. use that program on a real-world text file with at least 5000 words (e.g., a research paper).
Another long one. I read question 15 though and was like "please...WHY".
I used this research paper:
https://dl.acm.org/doi/10.1145/1539024.1508969 (Use Sci-Hub to access it)
Kacmarcik, G. and Kacmarcik, S. G. (2009) ‘Introducing computer programming via gameboy advance homebrew’, in Proceedings of the 40th ACM technical symposium on Computer science education - SIGCSE ’09. New York, New York, USA: ACM Press, p. 281. doi: 10.1145/1508865.1508969.
It was one of the main papers that helped formed my research question for my Bachelors dissertation. It's only 4320 words....but I think Bjarne will let me off.
This exercise ended up disgustingly hacky and it prints out each word on a new line as he didn't specify any output specifications...just to "clean" it up.
No comments:
Post a Comment