How can I create a custom style checker without building Grammarly from scratch?
Asked by
riddle.within
I'm a writer rather than a programmer, and I'm interested in creating a tool that checks writing against a specific style guide or workplace format. For example, AP Style includes preferences that general grammar checkers usually don't flag because they aren't technically errors. I might also want to add custom rules for different jobs or projects. How difficult would this be to build, and are there affordable ways to customize an existing tool instead of creating an entire grammar checker from the ground up?
Answers
It depends on what you mean by โfrom scratch.โ A basic rules-based checker is achievable, but building a full grammar and spellchecking system involves some surprisingly complex language-processing problems. Youโll probably save a lot of time by extending an existing tool rather than creating the entire engine yourself.
Reply to this answer
Youโll likely get the best results by creating a custom ruleset for an existing linter, such as LanguageTool. Its custom XML rules can flag particular words, phrases, punctuation choices, capitalization patterns, and other style requirements. That lets you enforce a house style without having to develop a complete natural-language-processing system.
frozen.lake.thickness: A ruleset is especially useful when the requirements are consistent and specific. You can add rules gradually as you encounter examples that the default checker misses.
Reply to this answer
This is feasible, and there are already tools that check some AP Style conventions. Since this would mainly be for personal use, you donโt need to build a commercial product or support every possible writing situation. Start with the rules you actually use most often and see whether an existing checker can be configured for them.
riddle.within: Personal use is the main goal. AP Style was just an exampleโIโd like to adjust the rules depending on what Iโm working on.
Reply to this answer
Add your answer
Answers are reviewed before publication.
riddle.within: That makes sense. Iโd definitely prefer an approach that doesnโt require a huge budget or years of programming experience.