Skip to content

Commit 5622b4b

Browse files
committed
CS7.41 release
1 parent eabd2f5 commit 5622b4b

File tree

87 files changed

+2100
-72343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2100
-72343
lines changed

BINARIES/ChatScriptmongo.exe

-1 KB
Binary file not shown.

BINARIES/LinuxChatScript64

-694 Bytes
Binary file not shown.

BINARIES/chatscript.exe

-1 KB
Binary file not shown.

BINARIES/chatscriptpg.exe

-512 Bytes
Binary file not shown.

HTMLDOCUMENTATION/CLIENTS-AND-SERVERS/ChatScript-ClientServer-Manual.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ <h1 id="revising-a-topic">Revising a topic</h1>
7373
<h1 id="preparing-for-compiling-on-the-server">Preparing for compiling on the Server</h1>
7474
<p>I develop the source on a Windows machine and transfer it to a LINUX box. To insure the source does not have carriage returns, I use :clean to read and write all src directory files without carriage returns.</p>
7575
<h1 id="testing-for-server-presence">Testing for server presence</h1>
76-
<p>If you send the message: null 1 null (that’s the null string user id, the string of the character “1” as bot id, and the null string message, the server will send back the string of [you have no user id]with no logging done and minimal load on the server. This constitutes an echo-test to prove the server is running.</p>
76+
<p>To truly know if the server is alive, you actually need to send it a message that it responds to. This means implementing <code>something</code> in your bot that reacts rapidly to your message. The fastest messages are OOB ones, because they do not parse. So early in your control script you can do something like:</p>
77+
<pre><code>u: ( \[ ping \]) Pong.</code></pre>
78+
<p>and use that to prove the server is fully functional.</p>
7779
<h1 id="server-crashes-cron">Server Crashes &amp; cron</h1>
7880
<p>If the server crashes, it may automatically recover, generating the message</p>
7981
<p><em>Sorry. I forgot what I was thinking about.</em></p>

HTMLDOCUMENTATION/ChatScript-Advanced-User-Manual.html

Lines changed: 351 additions & 177 deletions
Large diffs are not rendered by default.

HTMLDOCUMENTATION/ChatScript-Basic-User-Manual.html

Lines changed: 321 additions & 175 deletions
Large diffs are not rendered by default.

HTMLDOCUMENTATION/ChatScript-Pattern-Redux.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<h1 id="chatscript-pattern-redux">ChatScript Pattern Redux</h1>
12-
<p>© Bruce Wilcox, mailto:[email protected] www.brilligunderstanding.com <br>Revision 4/24/2017 cs7.4</p>
12+
<p>© Bruce Wilcox, mailto:[email protected] www.brilligunderstanding.com <br>Revision 4/30/2017 cs7.41</p>
1313
<p>Pattern matching information was introduced in the Beginner manual and expanded in the <a href="ChatScript-Advanced-User-Manual.html">Advanced User Manual</a>. Since pattern matching is of such importance, this concise manual lists everything about patterns in one place.</p>
1414
<p>NOTE<br> despite the extraordinary range of weird matching abilities, almost all of my normal code is based on one of three patterns:</p>
1515
<pre><code># rule 1
@@ -200,7 +200,7 @@ <h3 id="relations">Relations <code>&gt;</code> <code>&lt;</code> <code>?</code>
200200
</tr>
201201
<tr class="even">
202202
<td align="center"><code>?</code></td>
203-
<td>is member of 2nd arg concept or topic.<br>if no argument occurs after, means is value found in sentence</td>
203+
<td>is member of 2nd arg concept or topic or JSON array.<br>if no argument occurs after, means is value found in sentence</td>
204204
</tr>
205205
</tbody>
206206
</table>

HTMLDOCUMENTATION/ChatScript-System-Functions-Manual.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<h1 id="chatscript-system-functions-manual">ChatScript System Functions Manual</h1>
12-
<p>© Bruce Wilcox, [email protected] www.brilligunderstanding.com <br>Revision 4/24/2017 cs7.4</p>
12+
<p>© Bruce Wilcox, [email protected] www.brilligunderstanding.com <br>Revision 4/30/2017 cs7.41</p>
1313
<ul>
1414
<li><a href="ChatScript-System-Functions-Manual.html#topic-functions">Topic Functions</a></li>
1515
<li><a href="ChatScript-System-Functions-Manual.html#marking-functions">Marking Functions</a></li>
@@ -182,6 +182,7 @@ <h3 id="marked-word"><code>^marked ( word )</code></h3>
182182
<p>returns <code>1</code> if word is marked, returns <code>FAILRULE_BIT</code> if the given word is not currently marked from the current sentence.</p>
183183
<h3 id="setposition-_var-start-end"><code>^setposition ( _var start end )</code></h3>
184184
<p>Sets the match location data of a match var to the number values given.</p>
185+
<p>Alternatively you can do <code>^setposition ( _var _var1 )</code>, which is redundant with just doing <code>_var = _var1</code>.</p>
185186
<h3 id="setcanon-wordindex-value"><code>^setcanon ( wordindex value )</code></h3>
186187
<p>Changes the canonical value for this word.</p>
187188
<h3 id="settag-wordindex-value"><code>^settag ( wordindex value )</code></h3>
@@ -516,6 +517,8 @@ <h3 id="load-name"><code>^load ( name )</code></h3>
516517
<p>You can write script that calls <code>^load</code>, naming the <code>xxx</code> part and they will be dynamically loaded, for that user only, and stay loaded for that user across all volleys until you call <code>^load</code> again. Calling load again with a different name will load that new name. Calling <code>^load(null)</code> will merely unload the dynamic layer previously loaded.</p>
517518
<p><strong>WARNING</strong></p>
518519
<p>It's erroneous (you get whatever happens to you), if you call <code>^load</code> from within topics you have loaded via <code>^load</code>.</p>
520+
<h3 id="clearmatch"><code>^clearmatch()</code></h3>
521+
<p>This clears all match variables to empty.</p>
519522
<h3 id="match-what"><code>^match ( what )</code></h3>
520523
<p>This does a pattern match using the contents of what (usually a variable reference). It fails if the match against current input fails. It operates on the current analyzed sentence which is usually the current input, but since you can call ^next(input) or <code>^analyze()</code> it is whatever the current analysis data is.</p>
521524
<pre><code>if (%more AND ^match(^&quot;(&lt; ![~emocurse ~emothanks] ~interjections &gt;)&quot; ) )
@@ -1097,6 +1100,8 @@ <h3 id="sexed-word-he-choice-she-choice-it-choice"><code>^sexed ( word he-choice
10971100
<p>would return <em>she</em></p>
10981101
<h3 id="uppercase-word"><code>^uppercase ( word )</code></h3>
10991102
<p>Is the given word starting with an uppercase letter? Match variable binds usually reflect how the user entered the word. This allows you to see what case they entered it in. Returns 1 if yes and 0 otherwise.</p>
1103+
<h3 id="format-integerfloat-formatstring-value"><code>^format( integer/float formatstring value)</code></h3>
1104+
<p>This is a thin wrapper over sprintf. The first argument tells ChatScript what kind of argument you are passing (since everything is a string to ChatScript). The second argument is a string which is the format string for sprintf. The third argument is the number to convert. For floats, you will always be passing a double float so bear that in mind with your formatting. For integer, if you use a %d format, you will be using a 32-bit value. For ll formats you will be using 64-bit but it won't work well on Windows output because Windows uses their own sprintf notation.</p>
11001105
<h3 id="addproperty-word-flag1-flagn"><code>^addproperty ( word flag1 … flagn )</code></h3>
11011106
<p>given the word, the dictionary entry for it is marked with additional properties, the flags given which must match property flags or system flags in <em>dictionarySystem.h</em>. Typically used to mark up titles of books and things when building world data.</p>
11021107
<p>In particular, however, if you are adding phrases or words not in the dictionary which will be used as patterns in match, you should mark them with <code>PATTERN_WORD</code>. To create a dynamic concept, mark the set name as CONCEPT.</p>
@@ -1144,6 +1149,8 @@ <h3 id="iterator-member-concept"><code>^Iterator ( ? member ~concept )</code></h
11441149
}</code></pre>
11451150
<h3 id="wordatindex-original-canonical-n"><code>^wordAtIndex ( ({original, canonical} n))</code></h3>
11461151
<p><code>^wordAtIndex</code> retrieves the word from the current sentence at the index given, as either the original word or as a canonical word (as a match variable sees it)</p>
1152+
<p><code>^wordAtIndex ( canonical n n1)</code> gathers a range from n thru n1.</p>
1153+
<p><code>^wordAtIndex ( original &quot;_0&quot;)</code> gathers a range from that which _0 represents (but uses the original data so it is not like merely saying _0, which may not have real data if you did an arbitrary assignment to it setting its position).</p>
11471154
<h1 id="multipurpose-functions">Multipurpose Functions</h1>
11481155
<h3 id="disable-what"><code>^disable ( what ? )</code></h3>
11491156
<p>What can be <code>topic</code> or <code>rule</code> or <code>inputrejoinder</code> or <code>outputrejoinder</code> or <code>save</code> or <code>write @set</code>.</p>

HTMLDOCUMENTATION/ChatScript-System-Variables-and-Engine-defined-Concepts.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<h1 id="chatscript-system-variables-and-engine-defined-concepts">ChatScript System Variables and Engine-defined Concepts</h1>
12-
<p>© Bruce Wilcox, [email protected] www.brilligunderstanding.com <br>Revision 4/24/2017 cs7.4</p>
12+
<p>© Bruce Wilcox, [email protected] www.brilligunderstanding.com <br>Revision 4/30/2017 cs7.41</p>
1313
<ul>
1414
<li><a href="ChatScript-System-Variables-and-Engine-defined-Concepts.html#engine-defined-concepts">Engine-defined Concepts</a></li>
1515
<li><a href="ChatScript-System-Variables-and-Engine-defined-Concepts.html#system-variables">System Variables</a></li>
@@ -1434,6 +1434,10 @@ <h1 id="interchange-variables">Interchange Variables</h1>
14341434
<td><code>cs_botid</code></td>
14351435
<td>when non-zero creates facts and functions restricted by this bitmask so facts and functions created by other masks cannot be seen. allows you to separate facts and functions per bot in a multi-bot environment. During compilation if this is set by a bot: command, then functions created and facts created by tables will be restricted to that owner.</td>
14361436
</tr>
1437+
<tr class="even">
1438+
<td><code>$cs_numbers</code></td>
1439+
<td>if defined, causes the system to output numbers in a different language style: french, indian. All other values are english.</td>
1440+
</tr>
14371441
</tbody>
14381442
</table>
14391443
</body>

0 commit comments

Comments
 (0)