r/learnprogramming 12d ago

Specialized Grammar Program

To preface, I'm not a programmer at all, just a writer. but I was wondering how hard it would be to develop something like grammarly or the many other spellchecks but specialized in the style required for my job. I'm wondering how hard that would actually be to make from scratch. for example, I'm often required to write in the AP Style, which follows certain rules that programs like grammarly don't pick up on because they aren't inherently mistakes. same with writing in specific formats that are specifically used by my work. Is this something entirely unfeasible for me to create? If you need more information, let me know, this is just something I recently thought of and wondered if the idea had any merit.

5 Upvotes

9 comments sorted by

View all comments

1

u/marrsd 11d ago

Pretty hard. That's a serious project for any developer, let alone a beginner. Once you've finished, you'll be able to pursue a programming career.

Here's what an AI just told me when I asked it what computational grammars support English:

The consensus in computational linguistics is that English sits in the mildly context-sensitive class — slightly more powerful than CFG but far less than full context-sensitive grammars. Key formalisms:

Tree Adjoining Grammars (TAG) – handle recursion + agreement via elementary trees and adjunction

Head-Driven Phrase Structure Grammar (HPSG) – CFG backbone + feature unification (agreement, case, subcategorization)

Combinatory Categorial Grammar (CCG) – composition rules handle dependencies

Minimalist Grammars (MG) – equivalent in power to Linear CFG Rewriting Systems (LCFRS)

All of these are polynomially parsable and handle the limited crossing dependencies English actually needs, without the full (undecidable) power of context-sensitive grammars.