This is a bit different sort of question coming from a computer science student, working on a Natural Language Processing project.

As a part of our project we got stuck into a situation where we want to know: how are the essential components in a sentence arranged?

We know that every sentence contains a main verb (V) and then the structure goes on from noun(N) followed by verb(V) to some more complex forms, following some patterns of N, V, Adverb(AV), Adjective(AJ), Determiners(D), Preposition(P), etc.


Apple is red in color is not a correct English sentence. The correct English is "An apple is red in color." So can we infer that N V AJ P N is wrong English and the correct English sentence follows this template D N V AJ P N?

In the same way clauses and phrases also follow some unique patterns of N, V, AV, AJ, A, etc.

Can someone tell me how the pattern is followed? Is there any rule that it follows from which we can infer whether a given sentence is valid or not?

To qualify my previous statement, I want to know whether a given group of words is a valid English sentence or not by recognizing the pattern and combination of N, V, AV, AJ, A, etc.

My goal is to recognize simple sentences; I am not working with complex sentence forms.

Can anyone help me with this?

  • 1
    Apple is red in color is a valid (correct) English sentence. And, by the way, you could start your project by capitalizing English and proofreading your question, including the title, and correcting whatever errors you spot.
    – pazzo
    Apr 17, 2015 at 6:08
  • 2
    @ikis NLP questions are best asked over at Linguistics. That said, Apple is red in color is ungrammatical but George is mad as hell is perfectly idiomatic and follows the pattern N V AJ P N. In fact, for nearly any sentence pattern, I bet you could find utterance that match it which are used unselfconsciously by native speakers. I think, therefore, you're going to have to refine your concept of a "simple sentence".
    – Dan Bron
    Apr 17, 2015 at 10:32
  • 'Apples are red in color': syntax and semantics interact, the choice of word affects syntax. So both rules work, but depend on the words used.
    – Mitch
    Apr 17, 2015 at 14:13

2 Answers 2


You might like to know about Context Free Phrase Structure Grammar (CFPSG), which is similar to the approach you're taking, but it allows for intermediate categories, like NP. I'll give an example reformulation for your example:

S -> NP VP
NP -> D N
D -> an
N -> apple
V -> is
AJ -> red
P -> in
CNP -> color

If there is a way to derive a phrase by starting with S and using rules to make substitutions, then the phrase is said to be generated by the grammar. A set of phrases all of which are generated by such a grammar is said to be a language generated by the grammar.

An advantage of having such intermediate categories as NP available, is that once you have described the fact that "apple" is not a good NP in subject position, it will follow that it is also not good in other sentence positions. *"I'd like apple".

CFPSGs have had much use in grammar and in computer science. The classic Unix tool yacc, "Yet Another Compiler Compiler", is based on CFPSG, for instance, and the languages generated by CFPSGs are those recognized by the push down store automata.


Essentially, the answer is "No". Grammar (both in English and other languages) does follow rules, but they are not the simple ones you seem to be looking for. For example, Apple is red in colour could be 'valid' if Apple is a name: otherwise it needs to be replaced by Apples are red in colour normally, or An apple is red (in colour) if the context makes it clear whether you are talking generally or about a single apple.

Additionally, language is not universal in the way that mathematics is; color and colour are accepted in different countries, but there is nowhere where they are both correct. And that is without even starting on different regional pronunciations: computer linguistics tends to ignore this, but linguistics professionals see spoken language as the real object of study, and written language as a (sometimes flawed) transliteration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.