10-grammar.com

grammar

Grammar is the set of rules for how words fit together in a language so that sentences make sense. People talk about grammar when they mean correct or polished writing and speech.

What a model may hear

formal grammar computer science and linguistics
expects a strict mathematical description of which strings are valid, such as context-free or regular grammars
parser grammar programming language design and compilers
looks for a formal specification file that defines syntax rules for parsing code
grammar checking natural language processing tools
assumes the user wants automated detection of errors in text, not discussion of rules
grammar of graphics data visualization, especially ggplot
expects layered plotting specifications mapping data to visual elements

Where people and models part ways

“Fix the grammar in this sentence.”

Meant: Make my writing sound more correct or natural.

May be taken as: Applies rigid formal rules and overcorrects colloquial or stylistic choices that were intentional.

Say instead: “Make this sentence sound more natural and polished, keeping my tone.”

“What is the grammar of this language?”

Meant: Explain how this human language works.

May be taken as: Generates a formal BNF or context-free grammar notation that is unreadable to the user.

Say instead: “Explain the basic rules of how sentences work in this language, in plain terms.”

“Use good grammar.”

Meant: Write clearly and professionally.

May be taken as: Interprets as a command to follow prescriptive school rules and produces stilted prose.

Say instead: “Write in a clear, professional style that sounds natural to a general reader.”

“Show me the grammar.”

Meant: Teach me the rules.

May be taken as: Outputs code in a grammar specification format like EBNF or YAML.

Say instead: “Teach me the rules with examples, not code or symbols.”

Tips

Often confused with

syntax
more technical, often means code structure not prose style
style
broader than grammar, covers tone and word choice too
semantics
meaning of language, not the rules for forming it
parsing
the process of analyzing structure, not the rules themselves
orthography
spelling and writing conventions, not sentence structure
usage
how people actually write, not formal rule systems