Author Topic: 'Special' Word Classes  (Read 6791 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

'Special' Word Classes
« on: December 26, 2010, 09:40:46 PM »
Here are the words that utilize 'special' word classes (0x002, x004 & x008) in the vocab in the template game (I suppose we should check some of Sierra's games to make sure none have been missed).  From the SCI specs, in the parser section,  footnote 2:

Quote
The three special classes are apparently used for words with very specific semantics, such as "if", "not", "and" etc. It is unknown as of yet whether they receive special treatment by the parser.

Here are the ones known to us (note that class 0x002 is not referenced)
WordWord Class
and004
but004
if004
nor004
or004
about008
for008
until008
while008
with008
without008

I believe that these words must be handled specially by the parser, otherwise why wouldn't they just have a 'compound' (or multiple) class like other words?  Unless the 'special' moniker is just a subclass of a compound class - for example I was thinking that perhaps the 008 class could be a preposition/adjective class.  Examples:

Code: [Select]
take ball with stripes      // 'With' is an adjective (or noun)
dance with troll            // 'With' is a preposition

However, in my mind a word class of 050 would work just as well (010 (prep) + 040 (adj) = 050) - or if you like a class of 110 (010 (prep) + 100 (noun) = 110).

EDIT:  Interesting.  I cannot get the  examples above using 'with' to work unless I explicitly set 'with' to a preposition.
« Last Edit: December 29, 2010, 11:41:35 AM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

'Special' Word Classes - The 008 class - (with, without, etc)
« Reply #1 on: December 29, 2010, 12:25:40 PM »
I ran across an oddity regarding the 008 class & articles.  Note that in the below examples, an unmodified, 'stock' vocab was used from a template game, where 'with' was defined only with a 008 class (and 'the' is simply an article).

Code: [Select]
// works with any 008 word - 'cut boat with knife'
  (if(Said('cut/boat/knife'))
      Print("cut boat with knife OR cut boat without knife OR ...")
  )

// 'cut knife the boat'
  (if(Said('cut/boat/knife'))
      Print("cut knife the boat")
  )
Okay, I guess I'm good with that...

Code: [Select]
// works with 'with' only: 'cut boat with knife' - does not work with 'cut knife the boat'
  (if(Said('cut/boat/knife[<with]'))
      Print("cut boat with knife")
  )

// works with 'cut knife the boat' - does not work with 'cut boat with knife'
  (if(Said('cut/boat/knife[<the]'))
      Print("cut knife the boat")
  )
Interesting, we can limit that only 'the' or 'with' is to be used (optionally).  Good!

Code: [Select]
// works with 'cut boat with knife'
  (if(Said('cut/boat/knife<with'))
      Print("cut boat with knife")
  )

// 'cut knife the boat' - does NOT work!!
  (if(Said('cut/boat/knife<the'))
      Print("You should not see this output")
  )
Whaaaat?  I can't use 'the' in my said string explicitly?  I suppose if you don't want 'with' to be used (or any other 008 classed word) & only 'the' to be used, you'll need to slap the optional brackets ('[' and ']') around it (see the 2nd code example).

The take-away from this (I suppose) is how to use 'with' correctly.  It appears from my testing that it can only be used upon the 'suffix' part of the said string coupled with the semantic operator (<).
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: 'Special' Word Classes
« Reply #2 on: December 29, 2010, 09:34:32 PM »
I can't seem to get any words of the 004 class (and, but, if, or, nor) to work in any user input or said string.  Upon reflection, it seems that there needs to be some kind of pre-processing (or iterative passes made upon the input) before it could be parsed correctly.

Has anyone had any luck with using these words without modifying their word class?
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: 'Special' Word Classes
« Reply #3 on: December 30, 2010, 12:38:10 AM »
I always assumed before now that articles and propositions and such were assumed and generated by simply the nouns, verbs, and adjectives being given in the script. Which proves I completely misunderstood the way the parser works.
Brass Lantern Prop Competition

Offline gumby

Re: 'Special' Word Classes
« Reply #4 on: December 30, 2010, 09:51:27 PM »
I always assumed before now that articles and propositions and such were assumed and generated by simply the nouns, verbs, and adjectives being given in the script. Which proves I completely misunderstood the way the parser works.
Actually, I agree with you that the articles seem to be assumed.  They don't seem to have much impact, except for identifying the subject - I'm still not sure when you would need to use them in the said strings.
« Last Edit: December 30, 2010, 10:46:57 PM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: 'Special' Word Classes
« Reply #5 on: December 31, 2010, 09:12:12 AM »
Interesting.  I just noticed that the 0x002 word class does not even appear in the grammar.  For that matter, the SCI Specs indicate that a word class 0x001 is also valid:
Quote
0x001 - number (not found in the vocabulary, set internally)
...yet it too does not appear in the grammar (or the vocab).  I'm thinking that 002 is probably also 'set internally'.  Which would explain why it's not in the grammar/vocab.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.018 seconds with 23 queries.