jrnxf / thokr

✨ sleek typing tui with visualized results and historical logging
MIT License
518 stars 18 forks source link

Adds sentence functionality. Allows the -f <number_of_sentences> flag… #8

Closed merelymyself closed 2 years ago

merelymyself commented 2 years ago

… to indicate that the user wishes to type-test full, grammatical sentences.

What: Added -f as a flag to allow for the generation of random sentences instead of just words.

Why: Personally, I felt that thokr's random words didn't really help certain typists as much (such as myself) due to the lack of structure. While nonsensical, the sentences generated by thokr with this new flag are grammatical, and have the necessary full stops and spaces.

How: Through use of cgisf_lib. I shamelessly reused one of my own side-projects to expedite the process of sentence generation.

Checklist:

jrnxf commented 2 years ago

I'm headed out of town for a week but will take a look at this when I get settled back in!

jrnxf commented 2 years ago

@merelymyself Lol so last night I pushed a small README update not realizing I was on your main branch, and so these changes got pushed up as well! No problem though – I just looked over everything and it looks good to me 👍🏼 I might make a few minor changes before cutting a new release, but otherwise excited to get this merged. Thanks for the contribution!

Also cgisf is a super cool package! I'd never heard of the ‘Colourless Green Ideas Sleep Furiously’ sentence before. It looks like the main cgisf method implements an algorithm where you specify things like adverbs, adjectives, nouns, etc. Was that part of the research? I'm curious on how you arrived at that!

merelymyself commented 2 years ago

The whole idea came from the sentence, because it made sense but also didn't. From there, it was just researching on sentence structures, ordering of adjectives and similar things.