With AI, I used a round robin method to create a VBA script that would automate some rules that I felt would always work.
The idea: I first create three lists.
1- She, He, My, me, etc.
2- Dad, Mom, Father, Mother, etc.
3- Sir, Professor, Ma'am, Master, etc.
Step One
List one and two - the system lower cases.
List three - upper cases.
ALWAYS
This is 99% of the case, and later in the macro I'll deal with exception. The "name" test where you can replace the pronoun or familial title with a name you can capitalize it.
My dad put on his jacket.
This is Dad's jacket.
The first one,
My Bob put on his jacket.
It does not work.
This is Bob's jacket, would work.
Step Two:
Where you see ," it upper cases items in list 1 and 2.
This and a few other triggers like after a comma seem to always be capitalized familial titles, but it failed. A good example was "and"
I added a step where if it finds two familial titles with an and between them it applies the capitalize of the first title to the second.
So, at least Brother and Sister or brother and sister. You may be wrong about them, but you'll be wrong about both.
Then I addressed Book-saidisms, because this is the bane of my existence.
"Dad, are you there?" Aunt Julie asked.
Would be
"Dad, are you there?" aunt Julie asked.
But
"Dad, are you there?" Aunt Julie smiled and fingered her butt.
Now, we start getting into the nitty gritty where purists would tell you that you have two sentences.
It's called a "Book saidism" and in creative writing it is an accepted practice. There are some who shit on it, and every now and then someone will send me a nasty gram. That's what prompted me to think I had it figured out because with pronouns, you almost always lower case. Familial titles is much more situational.
Try as I might I could not find code that addresses that.
I wrote code Lowercases dialogue attribution verbs after comma ("said", "asked", "smiled", etc. โ saidism/bookism rule)
Example:
"Hello," He Smiled.
becomes
"Hello," he smiled.
It's just a dumb habit of mine to capitalize like that at random.
Fixes missing comma before coordinating conjunction + subject in compound sentences (adds comma before "but/and/or/so/yet" when followed by pronoun)
Example:
I wanted to go but he said no.
becomes
I wanted to go, but he said no.
another dumb habit. I also addressed To and Too. There are a couple times it's going to be too, and otherwise it's always to.
Adds comma after interjections ("Oh", "Ah", "Well", "Hey", "Look") when followed by more dialogue
Example:
"Oh no" she whispered.
becomes
"Oh, no," she whispered.
This is another one that I have to painstakingly fix by hand. There is no automatic way. Grammarly removed it's automatic fix of this. Programmatically, it's very rare that you will not have the comma.
Normalizes ellipsis to three dots and adds space after ellipsis when continuing a sentence with capital letter
Example:
"I was thinking..maybe later"
becomes
"I was thinking... Maybe later"
I can't tell you how many times I've seen this in my writing and other writing.
..
it's like the elipsis but it literally means nothing except bad punctuation.
It would be great if it actually could mean something. I tend to think of it as an unneccesary erm, um, or breath in the middle of a sentence. When I write dialogue, I write what I hear in my head and I am southern (united states) so my dialogue is often colliquial.
I don't use AI to create stories for me, but I do use AI to write VBA code. I use it to check it. I use it to help me create British dialogue, stuff like that.
In this case, I put it into Gemini, Grok, Claude and ChatGPT. I don't subscribe to Claude of ChatGPT but my goal was to validate my code. One would say "don't run this code, it's doing XYZ" and another would catch the mistake that one re-introduced.
Grok is the least censored, but it's a bit like a drunken pervert. It will truncate your list of pronouns down to two for instance, and you will have to ask why.
"Oh my bad," it will say. It's like it has this incredibly short attention span.
CEO's of companies want it to take all our jobs, but it can not remember the error that it made when it reintroduces it again, or that it created a very narrow use case to only work in a very specific circumstance instead of a broad "works everytime" macro.
"Don't you remember we tried this before, and you literaly told me not to do this?" you can ask ten minutes later.
It's very frustrating.
After all of it, I added
Last Step:
Upper case first character of every sentence. So "dad, are you there?" would find the d not the " and fix it. It would also fix Dad, are you there. It skipped the " because it's not a letter.
It seemed to me it would be a very rare occurance that I would not do capitalize and word really should just automatically do that. I have it set to capitalize the first letter but it doesn't do it.
I also have it set to fix dont' and other contractions that end up wrong like that, but for whatever reason, I constantly find myself with the keyboard creating strange contractions like that.
Tonight, I do not want to write the code. It's frustrating. I'd rather just grab code that already works. Has anyone else worked on something like this and want to share?
I am happy to send the actual code, but I recently realized that there are several use cases above that it does not work on and so the current iteration is not right.