[adv3Lite] The "adjective" dictionary property

I need to know the specific way a player refer to a certain object (e.g. whether it’s “X APPLE” or “X RED APPLE”), so I’ve been reading about how the parser and dictionary work.

Most of the explanations about these things came from the TADS 3 documentation instead of adv3Lite specific ones, and a lot of places mention the “adjective” dictionary property. However, in adv3Lite, the tokens “red apple” seems to match a simpleNounPhrase(list) with “red” as a nounWord(noun) and “apple” as a simpleNounPhrase(noun) (which in turn just consists of a single nounWord(noun)). And in advlite.h, I found:

[code]/*

  • The standard parts of speech for the dictionary.
    */
    dictionary property noun, nounApostS;[/code]
    Does this mean that adv3Lite doesn’t adopt the concept of “adjective” for its dictionary and parser? Then what does the “MatchAdj” flag mean? And what is the difference between the second and third part of a Thing’s “vocab” property (like the “red” and “fruit” in “big apple; red; fruit”)? What is the best part of the documentation to read for understanding how this part of the library works?

There is a topic titled The Vocab Property in Detail in the Adv3Lite Library Manual.

Easiest way to find a particular section of this HTML document it is to go to the Table of Contents, scroll down to Part VI: Final Moves and click on the Index item (last one in the Part VI list).

Click on the V in the list of alphabetical links at the top of the page and look for vocab topics.

Yes this is what I needed and looks very helpful. Thanks for the pointer, Jerry.

Jerry has pointed you to the information you need on the vocab property. I’ll just add by way of confirmation that the adv3Lite library doesn’t use the dictionary in the way the adv3 library does. Mike Roberts wrote both (adv3Lite simply takes over Mike’s Mercury parser) so I can’t claim to be intimately acquainted with either, but part of the difference is that the adv3 dictionary associates vocabulary words with specific game objects while the adv3Lite/Mercury parser doesn’t; the way words are matched to objects is different in adv3Lite, allowing greater flexibility (in particular, adv3Lite/Mercury isn’t so fussy about word order, making it easier to define objects with non-standard phrases in their vocab like ‘Kranky the Clown’ or ‘S and P Magazine’, which was fiddly to do in adv3).

Hopefully the section on the vocab property Jerry has pointed you to will tell you all you need to know for the purposes of implementing what you’re after.

Thanks Eric and Jerry. With your guidance I’ve found how to do what I want in adv3Lite.

For the record, the way adv3Lite treats nouns and adjectives differently are mainly for disambiguation purposes, and such information are not stored in the dictionary cmdDisct (therefore not accessible by the parser), but in the individual Thing’s vocabWords property. More specifically, vocabWords is a vector of vocabWord objects, and the posFlags property of such objects stores the information related to MatchNoun, MatchAdj, etc.