EmilCzorniej / pwp-capstones

0 stars 0 forks source link

Summary #1

Open Aerodlyn opened 6 years ago

Aerodlyn commented 6 years ago

I've noticed two issues that I believe are the reason why you are finding Lily to be the killer (it should be Gregg):

Your values for average sentence length is slightly off. I believe this is due to this: return (text.count(" ") + 1)/len(sentences_in_text). Remove the + 1 and you'll get the right values after the fix the next issue.

It looks like you misunderstood what prepare_text is supposed to do. You're almost correct, except you're doing a bit more than you're supposed to. I see what you were thinking, but "i'm" is a word in itself and while the apostrophe is a punctuation mark, it is considered part of the word in this project. So, you can still remove it if you want, but I wouldn't convert "i'm" to "i am" as this will skew your data if one person uses a lot of contractions.

These are the only issues I see right away. Otherwise, great job!

EmilCzorniej commented 6 years ago

Hi Aerodlyn,

I think you are wrong about my average sentence length function. I believe it works correct. I checked it with a simple test:

print(get_average_sentence_length("Emil's correct. Emil's wrong? Emil's correct!"))

and it returns 2. Please may you look at it again and say where I'm wrong (as I understood well the averages my function produces for the samples are different from the correct results).

Regarding the 2nd issue this should have been stated precisly in the instruction how to intepret the apostrophes. I wouldn't argue if it wasn't so crucial for the final outcome of the project but as you see depending on how you understand you may obtain different result.

Regards Emil

Aerodlyn commented 6 years ago

So, I'm not quite wrong but I'm not quite right either. I was mistaken the first time I looked at it. You're missing one important corner case that's giving you the wrong sentence length for Gregg. You have the correct value for everyone else. However, just because you checked it with one test does not mean it's correct, that will almost never be true when you're working with software.

The error with your method lies in a subtle difference in the names of the suspects (hint: Gregg has a middle name that isn't spelled out).

Now, I agree with you in regards to the 2nd issue. I think this definitely should be stated as not every learner's first language is English.