You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WIKI/ChatScript-Advanced-User-Manual.md
+30-35Lines changed: 30 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,25 +346,25 @@ The flags and their meanings are:
346
346
347
347
|flag | description
348
348
|:----------------:|--------------
349
-
|__`Random`__ | search rules randomly instead of linearly
350
-
|__`NoRandom`__ | (default) search rules linearly
351
-
|__`Keep`__ | do not erase responders ever. Gambits (and rejoinders) are not affected by this
352
-
|__`Erase`__ | (default) erase responders that successfully generate output.<br>Gambits automatically erase unless you suppress them specifically.
353
-
|__`NoStay`__ | do not consider this a topic to remain in, leave it (except for rejoinders)
354
-
|__`Stay`__ | (default) make this a pending topic when it generates output
355
-
|__`Repeat`__ | allow rules to generate output which has been output recently
356
-
|__`NoRepeat`__ | (default) do not generate output if it matches output made recently
357
-
|__`Priority`__ | raise the priority of this topic when matching keywords
358
-
|__`Normal`__ | (default) give this topic normal priority when matching keywords
359
-
|__`Deprioritize`__| lower the priority of this topic when matching keywords
360
-
|__`System`__ | this is a system topic. It is automatically `NoStay`, `Keep`.<br>`Keep` automatically applies to gambits as well. The system never looks to these topics for gambits. System topics can never be considered pending (defined shortly). They can not have themselves or their rules be enabled or disabled. Their status/data is never saved to user files.
361
-
|__`User`__ | (default) this is a normal topic
362
-
|__`NoBlocking`__ | should not perform any blocking tests on this topic in `:verify`
363
-
|__`NoPatterns`__ | should not perform any pattern tests on this topic in `:verify`
364
-
|__`NoSamples`__ | should not perform any sample tests on this topic in `:verify`
365
-
|__`NoKeys`__ | should not perform any keyword tests on this topic in `:verify`
366
-
|__`More`__ | normally if you try to redeclare a concept, you get an error. `MORE` tells CS you intend to extend the concept and allows additional keywords.
367
-
|__`Bot=name`__ | if this is given, only named bots are allowed to use this topic. See `ChatScript Multiple Bots manual`
349
+
|__`random`__ | search rules randomly instead of linearly
350
+
|__`norandom`__ | (default) search rules linearly
351
+
|__`keep`__ | do not erase responders ever. Gambits (and rejoinders) are not affected by this
352
+
|__`erase`__ | (default) erase responders that successfully generate output.<br>Gambits automatically erase unless you suppress them specifically.
353
+
|__`nostay`__ | do not consider this a topic to remain in, leave it (except for rejoinders)
354
+
|__`stay`__ | (default) make this a pending topic when it generates output
355
+
|__`repeat`__ | allow rules to generate output which has been output recently
356
+
|__`norepeat`__ | (default) do not generate output if it matches output made recently
357
+
|__`priority`__ | raise the priority of this topic when matching keywords
358
+
|__`normal`__ | (default) give this topic normal priority when matching keywords
359
+
|__`deprioritize`__| lower the priority of this topic when matching keywords
360
+
|__`system`__ | this is a system topic. It is automatically `nostay`, `keep`.<br>`keep` automatically applies to gambits as well. The system never looks to these topics for gambits. System topics can never be considered pending (defined shortly). They can not have themselves or their rules be enabled or disabled. Their status/data is never saved to user files.
361
+
|__`user`__ | (default) this is a normal topic
362
+
|__`noblocking`__ | should not perform any blocking tests on this topic in `:verify`
363
+
|__`nopatterns`__ | should not perform any pattern tests on this topic in `:verify`
364
+
|__`nosamples`__ | should not perform any sample tests on this topic in `:verify`
365
+
|__`nokeys`__ | should not perform any keyword tests on this topic in `:verify`
366
+
|__`more`__ | normally if you try to redeclare a concept, you get an error. `more` tells CS you intend to extend the concept and allows additional keywords.
367
+
|__`bot=name`__ | if this is given, only named bots are allowed to use this topic. See [ChatScript Multiple Bots](ChatScript-Multiple-Bots.md) manual.
368
368
369
369
370
370
## Rules that erase and repeat
@@ -1552,7 +1552,7 @@ early termination effects.
1552
1552
# System Functions
1553
1553
1554
1554
There are many system functions to perform specific tasks. These are enumerated in the
1555
-
[ChatScript System Functions Manual](ChatScript-System-Functions-Manual.md)manual and the [ChatScript Fact Manual](ChatScript-Fact-Manual.md) manual.
1555
+
[ChatScript System Functions Manual](ChatScript-System-Functions-Manual.md) and the [ChatScript Fact Manual](ChatScript-Fact-Manual.md).
1556
1556
1557
1557
1558
1558
## Randomized Output Revisited `[ ]`
@@ -1995,7 +1995,7 @@ $tmp = ##first
1995
1995
1996
1996
## Defining private Queries
1997
1997
1998
-
see [ChatScript Fact Manual](ChatScript-Fact-Manual.md) manual.
1998
+
see [ChatScript Fact Manual](ChatScript-Fact-Manual.md).
1999
1999
2000
2000
2001
2001
## Documenting variables, functions, factsets, and match variables
@@ -2211,7 +2211,7 @@ The user prompt wants to use the user's login name so it is a format string, whi
2211
2211
processed and stored on the user prompt variable. The botprompt wants to force a space
2212
2212
at the end, so it also uses a format string to store on the bot prompt variable.
2213
2213
2214
-
### In color.tbl is there a reason that the color grey includes both building and ~building?
2214
+
___In color.tbl is there a reason that the color grey includes both building and ~building?___
2215
2215
2216
2216
Yes. Rules often want to distinguish members of sets that have supplemental data from
2217
2217
ones that don't. The set of ~musician has extra table data, like what they did and doesn't
@@ -2221,7 +2221,7 @@ has supplemental data available.
2221
2221
This is made clearer when the set is named something list `~xxxlist`.
2222
2222
But the system evolved and is not consistent.
2223
2223
2224
-
### How are double-quoted strings handled?
2224
+
___How are double-quoted strings handled?___
2225
2225
2226
2226
First, note that you are not allowed strings that end in punctuation followed by a space.
2227
2227
This string _"I love you. "_ is illegal. There is no function adding that space serves.
@@ -2262,7 +2262,7 @@ spacing and punctuation, and stripping off the double quotes.
2262
2262
u: (test) ^"This $var is good." # if $var is kid the result is This kid is good.
2263
2263
```
2264
2264
2265
-
### What really happens on the output side of a rule?
2265
+
___What really happens on the output side of a rule?___
2266
2266
2267
2267
Well, really, the system "evaluates" every token. Simple English words and punctuation
2268
2268
always evaluate to themselves, and the results go into the output stream. Similarly, the
@@ -2303,7 +2303,7 @@ value.
2303
2303
Calling a function discards any output stream generated and aside from other side
2304
2304
effects means did the function fail (return a fail code) or not.
2305
2305
2306
-
### How does the system tell a function call w/o ^ from English ?
2306
+
___How does the system tell a function call w/o ^ from English?___
2307
2307
2308
2308
If like is defined as an output macro and if you write:
2309
2309
```
@@ -2319,7 +2319,7 @@ When it is a user function, it looks to see if the
2319
2319
Contiguous is treated as a function call and apart is treated as English.
2320
2320
This is not done for built-ins because it's more likely you spaced it accidently than that you intended it to be English.
2321
2321
2322
-
### How should I go about creating a responder?
2322
+
___How should I go about creating a responder?___
2323
2323
2324
2324
First you have to decide the topic it is in and insure the topic has appropriate keywords if
2325
2325
needed.
@@ -2330,7 +2330,7 @@ sentence. This will tell you how the system will tokenize it and what concepts i
2330
2330
trigger. This will help you decide what the structure of the pattern should be and how
2331
2331
general you can make important keywords.
2332
2332
2333
-
### What really happens with rule erasure?
2333
+
___What really happens with rule erasure?___
2334
2334
2335
2335
The system's default behavior is to erase rules that put output into the output stream, so
2336
2336
they won't repeat themselves later. You can explicitly make a rule erase with `^erase()` and
@@ -2347,12 +2347,11 @@ These can never erase themselves directly, so the erasure will again rebound to
2347
2347
2348
2348
Note that a topic declared system NEVER erases its rules, neither gambits nor responders,
2349
2349
even if you put ^erase() on a rule.
2350
-
2351
-
> How can I get the original input when I have a pattern like
2352
2350
```
2353
2351
u: (~emogoodbye)
2354
2352
```
2355
-
### How can I get the original input when I have a pattern like `u: (~emogoodbye)` ?
2353
+
2354
+
___How can I get the original input when I have a pattern like `u: (~emogoodbye)` ?___
2356
2355
2357
2356
To get the original input, you need to do the following:
2358
2357
```
@@ -2562,8 +2561,7 @@ does a "cd ChatScript" to be in the right directory, and then runs ChatScript wi
0 commit comments