Chat Script Advanced Pattern Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 13

Scroll down to view the document on your mobile browser.
ChatScript Advanced Pattern Manual©Bruce Wilcox, gowilcox@gmail.com www.brilligunderstanding.com Revision3/24/2019 cs9.2ADVANCED PATTERNSKeyword PhrasesYou cannot make a concept out with a member whose string includes starting ortrailing blanks, like " X “. Such a word could never match as a pattern, sincespaces are skipped over. But you can make it respond to idiomatic phrases andmultiple words. Just put them in quotes. E.g.concept: ~remove ( "take away" remove )Normally in patterns you can write?: ( do you take away cheese )and the system will match sentences with those words in order.In WordNet, some words are actually composite words like : TV_show. Whenyou do:prepareon what is your favorite TV show you will discover that theengine has merged TV_show into one composite word. The system has notrouble matching inputs where the words are split apart?: ( what is your favorite TV show )But if you tried a word memorize like?: ( what is your favorite *1 *1 )that would fail because the first*1memorizes TV_show and there is thereforeno second word to memorize.Likewise when you writeconcept: ~viewing ("TV show")`the system can match that concept readily also. In fact, whenever you write thequoted keyword phrase, if all its words are canonical, you can match canonicaland noncanonincal forms. “TV show” matchs TV shows as well as TV show.Implied concept SetsWhen you make a pattern using [] or {} and it only contains words, phrases,And concept sets, the system will make an anonymous concept set out of them.This allows the system to find the soonest match of any of them. otherwise []1
and {} take each element in turn and try to find a match, which may be later inthe sentence than a later element in the set would match.Dictionary Keyword setsIn ChatScript, WordNet ontologies are invoked by naming the word, a~, andthe index of the meaning you want.concept: ~buildings [ shelter~1 living_accomodations~1 building~3 ]The concept~buildingsrepresents 760 general and specific building wordsfound in the WordNet dictionary – any word which is a child of: definition 1 ofshelter, definition 1 of accommodations, or definition 3 of building in WordNet’sontology.How would you be able to figure out creating this? This is described under:upin Word Commands later.Building~3 and building~3n are equivalent.The first is what you might say to refer to the 3rd meaning of building. Internallybuilding~3n denotes the 3rd meaning and its a noun meaning.You may see that in printouts from Chatscript. If you write 3n yourself, thesystem will strip off the nmarker as superfluous.Similarly you can invoke parts of speech classes on words. By default you get allof them. If you write:concept: ~beings [snake mother]then a sentence like I like mothering my baby would trigger this concept, aswould He snaked his way through the grass. But the engine has a dictionary anda part-of-speech tagger, so it often knows what part of speech a word in thesentence is.You can use that to help prevent false matches to concepts by adding~n ~v ~aor ~b (adverb) after a word.concept: ~beings [snake~n mother~n]If the system isn’t sure something is only a noun, it would let the verb matchstill. Thus a user single-word reply of snakes would be considered both nounand verb.The notation run~46 exists to represent a meaning.There is mild inherent danger that I might kill off some word meaning that isproblematic (eg ifrun~23turned out mark the~cursesset and I didn’t wantthe resulting confusion), said kill off might strand your meaning by renumberinginto either non-existence (in which case the script compiler will warn you) or2

Navigation menu