balzss/cli-typer

Word marked as completely wrong if extra letter added

Closed this issue · 5 comments

All words are marked as wrong unless the order matches, rather than if the word is correct. Basically this means that words are checked based on letter index, rather than completeness

screen shot 2018-04-17 at 1 05 45 pm

qwhex commented

Hi,
Thanks for the report!

What do you propose as a solution? Jumping to the next word when typing a space and marking the remaining part of the previous word as incorrect?

Currently we calculate WPM by correct chars / 5, not by actual word count, as the latter could be unfair (more likely to be based on luck).

Ideally words should be matched rather than chars individually, therefore, a .split(" ") on spaces could be performed. Then, if the entire word matches (index by word of words rather than chars), mark as correct.

eg.

y = correct (yes)
n = wrong (no)

soil wonder bell rock  six  team oil pay   care
soil wonder taco stone four oil  oil money care
y    y      n    n     n    n    y   n     y
qwhex commented

Yes, that's the simplest implementation I thought of, my concern is that we lose stats on partially correct words. So I think we should perform the current operation word by word, instead of the whole buffer.

Do you have the time and means to implement it?

Word by word sounds like the correct way to go.

time, not really, means, eh code is a lil hard to follow currently

Counting correct words instead of correct chars (with average word length) leads to inconsistent results (maybe you get longer words, etc.) and that's why all major typing practice apps use this approach so thanks for the suggestion but there is no need to implement a word by word counter.