Said() Strings - Comprehensive Examples

From SCI Wiki
Jump to: navigation, search

By Gumby

These examples were tested against the template game with minor modifications (several word additions, as well as making the word 'of' a noun).

Verbs

User Input Parts of Speech Said string syntax Notes
look verb look will match any input starting with 'look' ('look', 'look around', 'look at troll', etc)
jump verb jump will match any input starting with 'jump'

Nouns

take a breath verb/noun take/breath Don't include articles in said strings – also responds to 'take breath'
eat the goodies verb/noun eat/goodies Don't include articles in said strings – also responds to 'eat goodies'
take key verb/noun take/key  

Adjectives / Nouns acting like Adjectives

User Input Parts of Speech Said string syntax Notes
take golden sword verb/adj/noun take/sword<golden  
drop heavy black sword verb/adj/adj/noun drop/sword<black<heavy also reponds to 'drop the heavy black sword'
drop heavy goodies basket verb/adj/noun/noun drop/basket<goodies<heavy  
take goodies basket verb/noun/noun take/basket<goodies  
take basket of goodies verb/noun/prep/noun    take<of/basket/goodies dont need to make 'of' a noun
take basket of goodies verb/noun/noun-prep/noun take/goodies<basket<of need to make 'of' a noun for this to work – this appears to be the best thing to do.
drop heavy basket of goodies verb/adj/noun/noun-prep/noun drop/basket<heavy/goodies  
take black magic voodoo sword verb/noun-adj/noun-adj/noun-adj/noun take/sword<magic<black<voodoo Can use any number of noun-adjs (black/magic/voodoo), in any order (both the user input & said string)
take top secret water sword verb/noun/noun/noun/noun take/sword<top<secret<water Can use any number of nouns to describe the subject (top/secret/water).  Position unimportant.  'Sword' must remain in the same position however.  Othe nouns can be in any order (both in user input & said syntax)

Adverbs

User Input Parts of Speech Said string syntax Notes
where is sword adverb/indverb/noun is<where/sword as in a question “where is sword”
throw basket of goodies quickly verb/noun/prep/noun/adverb throw<quickly/basket<of<goodies note that 'of' needs to be a noun for this to work
quickly throw basket of goodies adverb/verb/noun/prep/noun throw<quickly/basket<of<goodies note that 'of' needs to be a noun for this to work
crawl under table slowly verb/prep/noun/adverb crawl<under<slowly/table same as 'slowly crawl under table'
slowly crawl under table adverb/verb/prep/noun crawl<under<slowly/table same as 'crawl under table slowly'
quickly run down troll adverb/verb/adverb/noun run<quickly<down/troll also responds to 'quickly down run troll' (jibberish), 'run down troll quickly', 'quickly run troll down', does NOT work for 'run troll down quickly', 'run troll quickly down'

Prepositions

User Input Parts of Speech Said string syntax Notes
turn lamp on verb/noun/prep turn<on/lamp same said as 'turn on lamp'
turn on lamp verb/prep/noun turn<on/lamp same said as 'turn lamp on'
talk to troll verb/prep/noun talk<to/troll  
look in keyhole noun-verb/prep/noun    look<in/keyhole  
walk behind curtain noun-verb/prep-noun/noun walk/curtain<behind  
swing sword at troll verb/noun/prep/noun    swing<at/sword/troll  
throw sword at thief verb/noun/prep/noun    throw<at/sword/thief  
eat goodies with troll verb/noun/prep/noun eat<with/goodies/troll  
put knife upon ledge noun-verb/noun/prep/noun put<upon/knife/ledge see non-working example 'put knife up on ledge'
swing sword at fat troll verb/noun/prep/adj/noun swing<at/sword/troll<fat  
swing heavy sword at troll verb/adj/noun/prep/noun swing<at/sword<heavy/troll  
swing heavy sword at fat troll verb/adj/noun/prep/adj/noun swing<at/sword<heavy/troll<fat  

Making words optional '[]'

User Input Parts of Speech Said string syntax Notes
take long knife verb/adj/noun take/knife[<long] This will enforce that only the adjective 'long' is used, no other adjective is valid.  Note that if the said string was 'take/knife', any adjective could be used & it would be valid
take up sword verb/prep/noun take[<up]/sword Note that string will also accept 'take sword' as user input

Grouping words '()'

User Input Parts of Speech Said string syntax Notes
lift up sword OR raise sword verb/prep/noun OR verb/noun (lift<up),raise/sword Both phrases will work, however it is interesting to note that 'raise <any preposition> sword' will also work.

Matching any word/no word/exact phrase

User Input Parts of Speech Said string syntax Notes
look verb look[/!*] OR look[/noword] will only match 'look', not 'look this' or 'look at...'
look wall OR look bird OR etc... verb look/* OR look/anyword will only match if there is a word following 'look'
look troll verb look/troll[/!*]  
play game verb/noun play/game[/noword] only will match 'play game', will not match 'play game with troll' unless the 'noword' syntax is removed, then it would match
take knife verb/noun take/knife note that this will also match 'take long knife', 'take rusty knife', etc.
lift up sword OR raise sword verb/prep/noun OR verb/noun (lift<up),(raise[<noword])/sword This will ONLY accept 'lift up sword' or 'raise sword'

Exhaustive & Complex Examples

User Input Parts of Speech Said string syntax Notes
give food to the dog verb/noun/prep/article/noun give/food/dog preposition not represented in said string, unnecessary
give food to dog verb/noun/prep/noun give/food/dog  
give dog the food verb/noun/article/noun give/food/dog  
give dog food verb/noun/noun give/food<dog dog being treated here as an adjective (similar to goodies in 'take goodies basket')
give food dog (nonsense) verb/noun/noun give/dog<food  
give food the dog (nonsense) verb/noun/article/noun give/dog/food Adding the article changes said string (see 'give food dog')
take troll to game verb/noun/prep/noun    take<to/troll/game see non-working example 'take troll out to game'
take troll to game verb/noun/prep/noun take/troll/game see alternative parse of 'take<to/troll/game'
take troll to ball game verb/noun/prep/noun/noun take<to/troll/game<ball ball should probably be classified as an adjective...
take troll ball game verb/noun/noun/noun take/game<ball<troll nonsense! But it does work... also accepts 'take ball troll game'
take troll game ball verb/noun/noun/noun take/ball<troll<game also responds to 'take game troll ball' – utter nonsense.
take troll to ball game verb/noun/prep/noun/noun take/troll/game<ball similar to 'take troll to game', but with additional 'ball' noun which acts as an adj
play game with troll verb/noun/prep/noun    play<with/game/troll  
play checkers game with troll verb/noun/noun/prep/noun play<with/game<checkers/troll  
play game of checkers with troll verb/noun/noun-prep/noun/prep/noun play<with/checkers<game<of/troll note that 'of' needs to be a noun for this to work
play game of checkers with grey troll verb/noun/noun-prep/noun/prep/adj/noun play<with/checkers<game<of/troll<grey note that 'of' needs to be a noun for this to work
play short game of checkers verb/adj/noun/noun-prep/noun play/checkers<short<game<of note that 'of' needs to be a noun for this to work
play short game of checkers with troll verb/adj/noun/noun-prep/noun/prep/noun play<with/checkers<short<game<of/troll note that 'of' needs to be a noun for this to work
quickly play short game of checkers adverb/verb/adj/noun/noun-prep/noun play<quickly/checkers<short<game<of note that 'of' needs to be a noun for this to work
quickly play short game of checkers again adverb/verb/adj/noun/noun-prep/noun/adverb play<quickly<again/checkers<short<game<of 41 characters.  Maximum possible in user input string!
again play short game of checkers quickly adverb/verb/adj/noun/noun-prep/noun/adverb play<quickly<again/checkers<short<game<of same syntax as 'quickly play short game of checkers again'

Does not work

User Input Parts of Speech Said string syntax Notes
put knife up on ledge noun-verb/noun/adverb/prep/noun   Parser reports bad sentence.
take troll out to game  verb/noun/prep/prep/noun   Parser reports bad sentence.