Closed jkomoros closed 1 year ago
Update capitalizeTitleWord
to return false if the first character is already title case
Hmmm this is quite a bit harder, because the actual original-case text is discarded at the beginning of the processing, so it doesn't even exist to pass to capitalizeTitleWord (its all lower case by then)
We could have normalizeWords in ProcessedRun constructor not lowercase, and just remove punctuation, etc... but then later we really do want them to be all lowercase, and saving all of the processed runs seems very wasteful
Update extractOriginalNgramFromRun
to accept an originalCase boolean. If it provided, then it computes its normalized-original-case string to use instead of using run.normalized.
Or rather, they shouldn't for words with ATyPical capitalization.
Right now acroynyms like SMEs and IDs get changed to "Ids" and "Smes". It should only forcibly title case words that don't start with an uppercase letter, and just leave alone any other words.
And add a maintenance task to do this for old cards