Does NLTK (or any other Python natural language module) have the ability to determine the order of multiple modifier adjectives? For example:

metal round huge bowl (incorrect)
huge round metal bowl (correct)

Copied and formatted from the link, the order is given by:

  1. Opinion: An opinion adjective explains what you think about something (other people may not agree with you). For example: silly, beautiful, horrible, difficult.
  2. Size: A size adjective, tells you how big or small something is. For example: large, tiny, enormous, little.
  3. Age: An age adjective tells you how young or old something or someone is. For example: ancient, new, young, old.
  4. Shape: A shape adjective describes the shape of something. For example: square, round, flat, rectangular.
  5. Color A color adjective, of course, describes the color of something. For example: blue, pink, reddish, grey.
  6. Origin An origin adjective describes where something comes from. For example: French, lunar, American, eastern, Greek.
  7. Material A material adjective describes what something is made from. For example: wooden, metal, cotton, paper.
  8. Purpose A purpose adjective describes what something is used for. These adjectives often end with “-ing”. For example: sleeping (as in “sleeping bag”), roasting (as in “roasting tin”)

In the example above, the correct order would be [size,shape,material].

  • How would something like "foggy early morning" be classified?
    – dwn
    Commented Jan 16, 2015 at 13:26
  • Adjectives - word order: When there are two or more adjectives before a noun there are some complicated "rules" for the order in which they should appear. These are the most important: opinion adjectives come before fact adjectives fact adjectives appear as follows: size - age - colour - origin - material"esl.fis.edu/grammar/rules/adadv.htm
    – ARi
    Commented Jan 16, 2015 at 16:41
  • Oh hey. You guys just answered a question I didn't even ask yet with your links. Commented Jan 18, 2015 at 19:53

2 Answers 2


Do you actually need to come up with the properties for your adjectives, or is the goal to determine whether some order is valid (and properties are just a way of making that determination)?

If the goal is to simply say that e.g. "metal round huge bowl" is incorrect, then you can skip the tagging of your adjectives for their properties entirely and go straight to the task of determining whether some combination of adjectives is in a good order. This would be a fairly common NLP task, deciding if some order of words is good or not (this is very vague on purpose since there are many, many approaches to this problem). You should be able to do this with something like NLTK and planning. For example, you could try using a parser and limit your training data to adjective phrases.

If you need to go beyond saying "good"/"bad" for some adjective combination and have each adjective tagged with one of its properties, it's a more involved task. Perhaps you could leverage something like a POS tagger, or something that performs a similar function. In your situation, you have some tags (opinion, size, age, shape, color, etc.) and some words that occur in some order. You'll need to provide some heuristics like "opinion before size, size before age" and start tagging the adjectives in your adjective phrases. Just as a very basic idea. Presumably, if the tags are correct and if the order of properties does hold true in the vast majority of cases, you'll end up with the ability to construct grammatical adjective phrases and make determinations about grammaticality.

I think the problem you're going to run into is your training data. Not sure if something already exists out there that contains these property judgments regarding different adjectives (something to search for!). You'll need a corpus that contains a lot of adjectives and enough adjective phrases with multiple adjectives that you'd be able to derive the property and/or build a model for ordering them. Adjective phrases with multiple adjectives may be common in fiction, but they are far less common in e.g. Wall Street Journal.

  • It is the former, determine if a set of adjectives are in a "good order". Thanks for the information, it what I figured I would have to do if somebody hasn't done before. I was hoping not to reinvent the wheel.
    – Hooked
    Commented Jan 15, 2015 at 2:55
  • 2
    I remembered something that might help with the problem. Check this out, I know that one of the people who worked on Midge worked on adjective order, among other things: Midge: paper, Midge: code
    – aalto
    Commented Jan 15, 2015 at 8:17
  • thanks for the reference! This should be enough to get me started, with it, it is enough for me accept this as an answer. Thanks again.
    – Hooked
    Commented Jan 15, 2015 at 15:00

You mean like giving it a list of adjectives and it prints them in correct order (or anything logically equivalent)? I'm quite certain that none of them has such a functionality. Furthermore I neither know nor could I find one where the adjectives are annotated with this classification. So the idea of asking it of which class those adjectives are and then doing the ordering yourself won't work, either.

However, it should be able to tell you in what order adjectives appear within the corpus. From this you could write your own module which could determine the correct order by asking the corpus which order occurs more often.

Though note that not all adjective combinations will actually appear in corpus and direct combinations will also not be sufficient to make a call. So given adjectives A and B you'll have to ask not just for whether A-B or B-A but also whether there is a chain of adjectives X, ..., Z (1-6 of them) such that A-X X-...-Z Z-B or B-X X- ... -Z Z-A to transitively determine order.

  • What's the last paragraph mean?
    – dwn
    Commented Jan 13, 2015 at 14:00
  • Suppose you want to know in what order "tiny" and "blue" should appear, but in the corpus there's nothing like "tiny blue" (or the reverse). But maybe there is "tiny square" and "square blue". Then you can conclude that "tiny square blue" would be correct and thus "tiny blue" would be the correct order. That's the basics, one can make the algorithm far more sophisticated: "tiny old", "old square" and "square blue" form a longer sequence. It could be made far more complicated, but presumably it would be easier to get a bigger corpus instead.
    – user66554
    Commented Jan 13, 2015 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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