Skip to content

Commit 260c969

Browse files
Merge pull request #102 from solyaris/master
wiki doc updates
2 parents 6df7f49 + 56b8913 commit 260c969

File tree

8 files changed

+1960
-537
lines changed

8 files changed

+1960
-537
lines changed

WIKI/ChatScript-Advanced-User-Manual.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ the active string implicitly invokes the equivalent of sprintf.
114114

115115
User variables also come in permanent and transient forms.
116116

117-
|Variable scope| syntax example | description
117+
|variable scope| syntax<br>example| description
118118
|--------------|------------------|-----------------------------------------
119119
| permanent | `$permvar` | start with a single `$` and are preserved across user interactions (are saved and restored from disk). You can see and alter their value from anywhere.
120120
| transient | `$$transientvar` | start with `$$` and completely disappear when a user interaction happens (are not saved to disk). You can see and alter their value from anywhere.
@@ -354,27 +354,27 @@ the topic name and the (keywords list). You may have multiple flags. E.g.
354354

355355
The flags and their meanings are:
356356

357-
|flag | description
358-
|:----------------:|--------------
359-
|__`random`__ | search rules randomly instead of linearly
360-
|__`norandom`__ | (default) search rules linearly
361-
|__`keep`__ | do not erase responders ever. Gambits (and rejoinders) are not affected by this
362-
|__`erase`__ | (default) erase responders that successfully generate output.<br>Gambits automatically erase unless you suppress them specifically.
363-
|__`nostay`__ | do not consider this a topic to remain in, leave it (except for rejoinders)
364-
|__`stay`__ | (default) make this a pending topic when it generates output
365-
|__`repeat`__ | allow rules to generate output which has been output recently
366-
|__`norepeat`__ | (default) do not generate output if it matches output made recently
367-
|__`priority`__ | raise the priority of this topic when matching keywords
368-
|__`normal`__ | (default) give this topic normal priority when matching keywords
369-
|__`deprioritize`__| lower the priority of this topic when matching keywords
370-
|__`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.
371-
|__`user`__ | (default) this is a normal topic
372-
|__`noblocking`__ | should not perform any blocking tests on this topic in `:verify`
373-
|__`nopatterns`__ | should not perform any pattern tests on this topic in `:verify`
374-
|__`nosamples`__ | should not perform any sample tests on this topic in `:verify`
375-
|__`nokeys`__ | should not perform any keyword tests on this topic in `:verify`
376-
|__`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.
377-
|__`bot=name`__ | if this is given, only named bots are allowed to use this topic. See [ChatScript Multiple Bots](ChatScript-Multiple-Bots.md) manual.
357+
| flag | description
358+
|--------------|--------------
359+
|`random` | search rules randomly instead of linearly
360+
|`norandom` | (default) search rules linearly
361+
|`keep` | do not erase responders ever. Gambits (and rejoinders) are not affected by this
362+
|`erase` | (default) erase responders that successfully generate output.<br>Gambits automatically erase unless you suppress them specifically.
363+
|`nostay` | do not consider this a topic to remain in, leave it (except for rejoinders)
364+
|`stay` | (default) make this a pending topic when it generates output
365+
|`repeat` | allow rules to generate output which has been output recently
366+
|`norepeat` | (default) do not generate output if it matches output made recently
367+
|`priority` | raise the priority of this topic when matching keywords
368+
|`normal` | (default) give this topic normal priority when matching keywords
369+
|`deprioritize`| lower the priority of this topic when matching keywords
370+
|`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.
371+
|`user` | (default) this is a normal topic
372+
|`noblocking` | should not perform any blocking tests on this topic in `:verify`
373+
|`nopatterns` | should not perform any pattern tests on this topic in `:verify`
374+
|`nosamples` | should not perform any sample tests on this topic in `:verify`
375+
|`nokeys` | should not perform any keyword tests on this topic in `:verify`
376+
|`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.
377+
|`bot=name` | if this is given, only named bots are allowed to use this topic. See [ChatScript Multiple Bots](ChatScript-Multiple-Bots.md) manual.
378378

379379

380380
## Rules that erase and repeat
@@ -1453,7 +1453,7 @@ Whereas most programming language separate their arguments with commas because
14531453
they are reserved tokens in their language, in ChatScript a comma is a normal word. So
14541454
you separate arguments to functions just with spaces.
14551455

1456-
?: ( hi) ^FiveArgFunction( 1 3 my , word)
1456+
?: ( hi) ^FiveArgFunction( 1 3 my , word)
14571457

14581458
Outputmacros can return a value, just like a normal function. You just dump the text as
14591459
you would a message to the user.
@@ -1908,13 +1908,17 @@ nothing. If the boot layer is not current, then you call ^REBOOT() which erases
19081908
boot data and treats the remainder of the script as refilling the boot layer with new facts and
19091909
variables.
19101910

1911+
19111912
## `^CSSHUTDOWN()`
19121913

19131914
outputmacro: ^CSSHUTDOWN()
19141915

19151916

19161917
This function, if defined by you, will be executed on shutdown or restart of the ChatScript system.
19171918

1919+
1920+
## `^cs_topic_enter()`
1921+
19181922
outputmacro: ^cs_topic_enter(^topic ^mode)
19191923

19201924
When the system begins a topic and this function is defined by you, it will be invoked
@@ -1923,6 +1927,8 @@ representing the way it is being invoked.
19231927
Values of `^mode` are: `s`, `?`, `u`, `t`, which represent statements, questions, both, or gambits.
19241928
While your function is executing, neither `^cs_topic_enter` or `^cs_topic_exit` will be invoked.
19251929

1930+
## `^cs_topic_exit()`
1931+
19261932
outputmacro: ^cs_topic_exit(^topic ^result)
19271933

19281934
When the system exits a topic and this function is defined by you, it will be invoked after

WIKI/ChatScript-Basic-User-Manual.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@ in the documentation.
3939
## Input and output sentences
4040

4141
ChatScript take one or more _input sentences_ from the user.
42-
A _sentence_ in CS nominally means the sequence of words up until some sentence _terminal token_ chars. Default charcters: `.`, `?`, `!`, `;` and `-` end sentences. E.g. the following user phrase is split in three sentences:
42+
A _sentence_ in CS nominally means the sequence of words up until some sentence _terminal token_ chars.
43+
By default these characters end sentences:
4344

44-
What's your name? My is Alfred ; I'm from London.
45+
| dot | question<br>mark | exclamation<br>point | semi<br>colon | colon | hyphen |
46+
|:---:|:----:|:---:|:---:|:---:|:---:|
47+
| `.` | `?` | `!` | `;` | `:` | `-` |
48+
49+
E.g. the following user phrase is split in three sentences:
50+
51+
What's your name? My is Alfred; I'm from London.
4552

4653
One can also disable sentence ending.
4754

WIKI/ChatScript-Command-Line-Parameters.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# ChatScript Command Line Parameters
2-
3-
> Copyright Bruce Wilcox, gowilcox@gmail.com brilligunderstanding.com
4-
5-
<br>Revision 4/24/2017 cs7.4
2+
Copyright Bruce Wilcox, gowilcox@gmail.com www.brilligunderstanding.com<br>
3+
Revision 4/24/2017 cs7.4
64

75
# Command Line Parameters
86

@@ -68,14 +66,15 @@ to have enough normal working room.
6866
| option | description
6967
|--------------------|-----------------------------------------------------------------------------
7068
| `output=nnn` | limits output line length for a bot to that amount (forcing crnl as needed). 0 is unlimited.
71-
| `outputsize=80000` | is the maximum output that can be shipped by a volley from the bot without getting truncated.
72-
Actually the value is somewhat less, because routines generating partial data for later incorporation into
73-
the output also use the buffer and need some usually small amount of clearance. You can find out how close
74-
you have approached the max in a session by typing `:memstats`. If you need to ship a lot of data around,
75-
you can raise this into the megabyte range and expect CS will continue to function. 80K is the default.
76-
77-
For normal operation, when you change `outputsize` you should also change `logsize` to be at least as much, so that
78-
the system can do complete logs. You are welcome to set log size lots smaller if you don't care about the log.
69+
| `outputsize=80000` | is the maximum output that can be shipped by a volley from the bot without getting truncated.
70+
71+
72+
Actually the `outputsize` value is somewhat less, because routines generating partial data
73+
for later incorporation into the output also use the buffer and need some usually small amount of clearance.
74+
You can find out how close you have approached the max in a session by typing `:memstats`.
75+
If you need to ship a lot of data around, you can raise this into the megabyte range and expect CS will continue to function.
76+
80K is the default. For normal operation, when you change `outputsize` you should also change `logsize` to be at least as much,
77+
so that the system can do complete logs. You are welcome to set log size lots smaller if you don't care about the log.
7978

8079

8180
## File options

0 commit comments

Comments
 (0)