Reference chek-up

Hi everyone !

I am a complete (complete) beginner in Ruby with no prior experience in programming at all.
We need to do a certain project in for my transdisciplinary course at university, and it should be a reference check up programmed in Ruby: we need to figure out how to write a code that will tell us whether a written reference is correctly written ( style, punctuation, order, capital letters etc.) and in case it is not the program would correct it.

Might sound complicated, but it should be as simple as possible since I repeat, it’s for complete beginners.

Does anyone of you have an idea or could help with suggestions on how to do this in the easiest way?

Thanks in advance. :slight_smile:

In friendship,

Hristina.

I think the very first thing you should do is nail down the scope of this project: what sort of mistakes should it be able to correct. Something like "style" is very vague and could be taken to mean a full blown grammar checker which is obviously a complicated endeavour. Even just "punctuation" can be complicated - a program that know that " Let's eat grandpa" should probably be corrected to "let's eat, Grandpa" would also be pretty sophisticated.

Instead I would start with very specific errors (for example, a full stop should be followed by whitespace and then a capital letter), and implement these one at a time. Think carefully about each one, both the happy case when the rule should be applied and false positives where it shouldn't.

This is a case where a good suite of unit tests would be particularly helpful - they can be living documentation of what the program can correct and guard against regressions when adding new errors. Even simple errors like that all have exceptions that you need to handle, for example if I wrote "I helped launch the example.com website." then you wouldn't want to apply your end of sentence rule to the period inside the domain name.

Fred.