forked from ChatScript/ChatScript
-
Notifications
You must be signed in to change notification settings - Fork 6
/
changes.txt
1887 lines (1602 loc) · 104 KB
/
changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Version 10.4 5/30/2020
1. MySQL now supported both as filesystem and for script access. BINARIES now has ChatscriptMysql.exe
See Esoteric-ChatScript/ChatScript-mysql manual.
^mysqlinit, ^mysqlclose, ^mysqlquery and command line parameter mysql=
2. !-word !!-word supported for backwords not
3. $$cs_badspell is set if NLP partially shut down after too many spelling mistakes (if you set $cs_badspellLimit )
4. ~replace_spelling instead of ~replace~ in ^testpattern call.
5. $cs_showtime if set will print to terminal time taken for volley
6: $cs_summary - shows ms spend in preparation vs rule process vs cleanup in current volley (to terminal)
7. %badspell - how many severe bad spellings happened in what size current sentence "15-40" means 15 in 40 word sentence.
8. :timelog shows size of largest message as well
9. replace: ?_da now also changes units even when no separation is needed because word follows number
e.g. replace: ?_km kilometer will change both 50km and 50 km to 50 kilometer
10. ^reportbug(text) puts text into LOGS/bugs.txt (std bug log) thus allowing scripts to message bugs
in addition to the engine's messaging.
11. $cs_outputlimit if set will generate a bug message if cs wants to output messaging larger than that
When recording cs output into a db, a field might be limited to 4K bytes and fail if message is bigger.
This will record the attempt as a bug so you can find out why your script did that.
12. $cs_sentences_limit, if set, will cause CS to not process remaining sentences above that limit in
a volley. Internal default was 50. Presumed that any user saying that much will not be well
handled by bot and not worth investment of further time by bot.
13. upgrades to engine manual documentation
Version 10.3 5/2/2020
1. :timelog now reports both engine NLU time and separately q wait time to get to engine (Linux)
2. canon: x y now supports 3rd argument MORE_FORM or MOST_FORM for marking adjectives and adverbs
3. German adverb/adjective MORE and MOST form flags now done by engine (when in german language mode)
4. ^spell now actually pays attention to its 2nd argument (factset id)
5. $cs_indentlevel controls indenting when tracing in ^testpattern.
6. $cs_tracetestoutput - set to 1 to force tracing in ^testoutput
7. updated to Duktape 2.5 Javascript embedded engine
8. cs_initmore.txt config file (if present) will load additional params and override cs_init.txt
and corresponding run time parameter config2= filename
9. cs_initenglish.txt (based on the current language being english - or can be any other language)
useful because foreign languages tend to require higher dictionary entry counts - reads AFTER cs_initmore
10. if language is set to "ideographic" then spellcheck is disabled and tokenization will be each character
is its own token (japanese, korean, chinese, etc)
11 %crosstalk1 - second communicator variable across users in engine
12. you can force a server to begin server logging w/o restarting it by creating top level file
serverlogging.txt with arbitrary content. remove file to restore prior state of server logging.
This is also done by :serverlog 1 and :serverlog 0 to force logging by script
13. documentation in Esoteric Chatscript - ChatScript Engine expanded
Version 10.2 4/19/2020
1. concept intersect now allows 3 in a row instead of just 2.
2. Practicum on spelling and interjections has additional writeup at end about handling marking
without changing a word permanently or dedicating a rule to performing marking.
3. Builtin support for emojis provided, words starting and ending in : will be in the concept
~emoji and are easy to pattern match, eg: in script have:
replace: 🤲 :palms_up_together:
replace: 😄 :grinning_face_with_smiling_eyes:
or add just the pairs to the implied replace: files in the substitution files in LIVEDATA
Thanks to Andy Heydon of Kore.AI for this.
4. BINARIES has a Mac compiled executable for 10.1+ version and NON-WINDOWS Non-C has
updated XCODE project (thanks Andy)
5. ^pos(grade $_word) shows the system's knowledge of grade word is learned in:
0 = kindergarten 2 = grades 1-2 4 = grades 3-4 6 = grades 5-6 8 = beyond grade 6
6. engine compile flag FNVHASH, when used, replaces hash algorithm DJB2 with FNV1a, which seems to have
fewer collisions with utf8 emoji characters (if you have a lot of them)
Version 10.1 3/29/2020
1. ^original(rawuser)
2. #! comment #! inside a pattern sent to compilepattern function
is %crosstalk documented?
3. ^addwordafter
4. ChatScript-ClientServer-Manual at end documents client commands.
5. CS Spellcheck can accept german nouns in lower case (singular or plural) and make them
upper case. Common pluralizations are handled that involve suffixes, but not yet ones that
change accent marks on vowels.
6. factset limit raised from 20 to 30, so @29 is legal.
7. ^addwordAfter(word _0) - inserts word into sentence after the position of given match variable.
_0 designates a position, and can be a match variable name or something that evaluates into a
word index. Does not alter pos-tagging or parsing and does not mark itself.
8: ^original(rawuser) returns exactly what user sent in, before any adjustments are made to it.
9. ^pos(xref wordindex kind)
This returns the index of the word in sentence cross-referenced by some parser data found
at the designated in wordindex. Kind includes: crossreference, indirectobject, object,
complement, phrase, verbal, clause. Returns 0 if no xref found.
10. Commandline paramenter debuglevel=n to enhance or reduce server log with more data.
11. Commandline paramenter buglog and nobuglog to enable or disable bug logging. Order dependent
with serverlog and noserverlog
12. %lastcurltime shows statistics on the last call to jsonopen
13. :labelremap for a topic builds an xref of internal tags to their labels (if they have one) into TMP/labels.txt
14. keyword concept intersection supported in patterns. E.g.
~animals~tasty will reference all animals considered tasty.
Version 10.0 1/26/2020
1. $$cs_tracepattern for returning trace from ^testpattern in addition to results.
2. $cs_addresponse holds name of ^fn(message ruletag) to tap CS user output queue
usage: 1. multiple reacts for different speech to text interpretations
2. detect already given answer and tell user: I already told you.
Version 9.8 11/10/2019
1. ^MemoryFree($data) - now takes optional argument whose data is to be available after freeing up everything. Can be string or can be JSON object (in which case a new transient json structure will be created to hold it).
2. :variables takes more arguments
3. You can call ^memorymark multiple times and free one by one
4. ^testpattern accepts trace field and ~replace~ concept to be equivalent to replace: in script
5. :clearlog to erase current user log file
6. ^trace() turns on all trace for the duration of this call, even if within ^notrace code
Version 9.7 8-31-2019
1. New manual Advanced Layers explains layering in cs and the boot layer.
2. Patterns are now allowed as concept members.
concept: ~leaving( sayonara "(going *~2 now)" exiting)
Version 9.62 8/18/2019
1. :listvariables
reports all references (set and get) of variables - see finalizing a bot manual
2. :build xxx quiet -- says nothing if compile works except done.
does not issue warning. If compile doesnt work, summarized the fails.
3. ^counttopics - new choices "responders" "availableresponders", renamed argument
"available" to "availablegambits" but system still accepts "available" to mean that
4. ^purgeboot(what) - what is either a factset id or a bot id.
All facts stored in the boot layer from that factset or owned by that botid are
erased from the boot layer. This enables one to revise facts in the boot layer by
removing old ones and making new ones with flag FACTBOOT
Version 9.61 7/28/2019
1. @retry in pattern allows pattern to self retry without output execution of
^retry(rule)
2. :regress batch
if your 1st argument to :regress is "batch", then CS will quit with return
code 0 when it passes or return code 1 when fail. Good for batch file autotesting.
3. ^delete now allows 2nd argument BOOT to authorize killing system facts
4 ^setFactOwner(fact idbits)
Changes ownership bits on a fact.
5 1st argument to ^format deprecated. No longer need to say INTEGER or FLOAT
6 ^csboot allowed to be multiply defined without error message
because Multibot deploys
Version 9.6 7/14/2019
1. unmark(@ _0) changed to unmark the width of the match, not just the start position
2. JSONLOOP (x y z OLD/NEW)
choose which way to walk a json object/array either newest first or oldest first
3. TAB macro flag
Be able to treat table data using tabs to mean * for that tab
4. ^bug()
be able to report a bug to system bug log (or script compiler) for runtime code (particularly in a table being compiled)
5. %tableinput - current input line to table processing
6. ^mark(word _0 ALL/ONE) when marking, either propogate marks to all encompassing concept sets or just mark this one word
Version 9.5 6/26/2019
1. Testoutput now returns field error: true if code execution failed.
2. you can force ^testpattern to trace user regardless of whether tracing is on or not or whether nouserlog is set. Just prepend to your input ":tracepattern"
3. unmark(@ _0) unmark everything starting there (but only at that 1 start spot, not range implied. This include sthe concepts and topics list and marks themslelf.s
4. Serious bug fixed if you have topics in both level 0 and level 1. CS shipping of level 0 does not have topics so almost no one noticed this bug til now.
Version 9.41 - EMERGENCY RELEASE 6/4/2019
9.4 has a bug wherein it inadvertently writes logging data to the user log file while processing
json parse data. This can blow out disk space in a heavily used server. This has been fixed.
Other changes:
1. ~filename - words with file suffixes
2. crashpath= names where to write about fatal signal handers in linux... writing in the cs directory might be erased by an auto redeploy
3 %zulutime adds elapsed time at end
4. ^jsonloop($jsonstruct $var1 $var2)
similar to loop but runs thru json members and is the most
efficient and compact way to do so
version - 9.4 5/27/2019
1. You can treat a json object as an array of fields.
$data = ^jsoncreate(transient object)
$data.tablet.testit = 1
$cx = 0
$_field $data.tablet[$cx]
returns field name of object after which you can do
$data.tablet.$_field to get the value
2. $data.something[-1] is the opposite end from [0], applies to object or arrays
For arrays it's the highest index value. For objects its the first field name.
3. ^pos(preexists word) -- was word in dictionary BEFORE this volley?
4. to use a variable name AS a field name, escape it
$data.\$varname = hello uses $varname as field name and not indirecting via $varname
5. full := assign in pattern
6. data format for testpattern simplified, now patterns is array of strings not array of objects
7. Rule-based spellchecking added to spelling practicum
8. ^changebot(botname botid) change identity on the fly, allowing this bot to see facts, functions,
and topics of botname instead of itself.
9. updated documentation to note that RESPONSE_NOCONVERTSPECIAL on $cs_ response is default.
version 9.31 4/30/2019
0. pattern assignment now allowed with system variables also (_0:=%time)
1. changes to the ^testoutput function. it does NOT erase its changes. It may return null
for variable assignments. It will return a text string representing the json data if
a returned variable is a json structure name.
2. for both ^testinput and ^testoutput, if the value of an incoming variable looks like
a json structure, it will be converted into the std internal json data structure and
the variable set to its json name.
3. ^testpattern matchvar returns the original text, not the canonical
version 9.3 4/26/2019
0. new practicum document: Practicum-Concepts-and_meaning
1. %factexhaustion , which can take assignment to false to turn off the flag
2. assignment in patterns _0:= var or matchvar or 'matchvar- eg
3. ^compilepattern
4. ^testpattern
5. ^compileoutput
6. ^testoutput
The above 4 functions allow you to synthesize a rule from its component parts. This allows some other dialog system to use CS capabilities as an external API (e.g. web-based scriptwriting). It also means you can store compiled patterns and outputs in a database and mix and match rules in synthetic topics on the fly. #2 supports ^testpattern by allowing a pattern to glean data and return values.
version 9.2 3/24/2019
1. replace: blackdecker \BLACK+DECKER now allowed to prevent +
from interpreting to space
2. ChatScript Advanced Manual has been split so that main areas of cs like concepts, topics, etc
have their own advanced manuals and the Advanced manual itself is just a grab-bag of unique
capabilities
3. ^pos(ismixedcase $_word) returns 1 if word is has both
upper and lowercase letters. Fails otherwise.
4. $cs_json_array_defaults
Normal syntax: $data.array[] = data1
This will store data1 non-uniquely (you can get repeats).
You can use ^jsonarrayinsert(UNIQUE $data.array data1) to
avoid this, but its clumsy. So now you can define for your
bot $cs_json_array_defaults = #JSON_ARRAY_UNIQUE to default
all such assigns to be unique unless specified otherwise
5. %serverlogfolder %userlogfolder %tmpfolder give the current
paths to those folders
version 9.12 2/20/2019
1. bug fixes
version 9.11 2/13/2019
1. bug fixes
version 9.1 2/12/2019
1. restored USER_FLAG4 for facts
2. command line parameter "trustpos" allows things like
concept: ~all(feel~n)
to work. By default we dont trust pos-tagger and CS will tolerate
all forms.
3. ^responsepattern(responseid)
part of the ^response.. world, returns the pattern that matched inside []
of rule generating output (if it is matched that way)
For a rule like:
u: ([ (pattern 1) (pattern 2) ([try 3])])
It will tell you which piece of the pattern matched.
Handy for debugging why a pattern matches incorrectly w/o
having to read a trace log and analyzing each + and -.
4: replace: 'xxx yyy
allows you to split during tokenization any word followed by 'xxx into two words,
original sans 'xxx and yyy. eg
replace: 've have
gives "companies've => "companies have"
version 9.0 1/1/2019
1. param inputlimit=n truncates user input to this size.
On a server, users have a default limit of 80K per volley
but malicious users abuse this. You can set this to explicitly limit
how much input users can actually provide. Consequences of excess
input are, for example, sluggish performance because it may try to spell correct junk input.
2. ^eval1(arg)
like ^eval(x) but evaluates its argument before passing into ^eval.
3. mark ~PASSIVE_VERB on such.
4. !~set in concept declaration - see advanced concepts: exclusion.
e.g., concept: ~wildanimals (!~pet_animals ~animals)
5. "fundamental meanings" can now be used as keywords in concepts, topics, and patterns.
see advanced cs: advanced concepts: fundamental meaning (quoted below)
Fundamental meaning consists of an actor, an action, and an optional actee.
In the active voice sentence "I love you", the actor is "I", the action is "love",
and the actee is "you". In the passive voice sentence "I was arrested", there is no actor,
the verb is "arrested", and the actee is "I". Wherease in the passive voice sentence
"I was arrested by the police", the actor is "police".
Fundamental meaning patterns always have a verb, which as a keyword is designated as
"|arrest|" or whatever word or concept you want to detect.
A pattern which includes a fundamental actor is shown as
"~pronoun|arrest|". One that includes an actee is
"|arrest|~police", whereas one that has both actor and actee is
"~pronoun|arrest|~police".
Version 8.8 11/26/2018
1. ^spellcheck(input dictionary)
input is tokenized words separated by spaces
dictionary is json array of words
It outputs the input words adjusted by any spelling correction.
Useful if you read dynamic menus from an API endpoint and then want
to match user input against that menu, whose elements may not be
in the main CS dictionary
2. Interjections from LIVEDATA now also mark their words as a normal
concept set entries, so you can suppress changing the words to an
interjection and yet still match on the interjection concept. This
make writing scripts for interjections significantly easier. See new
document below.
3. new document Practicum- spelling and interjections
4. you cannot use { or ( immediately after a bidirectional wildcard
and *~0b is now legal
Version 8.7 11/11/2018
1. $cs_userfactlimit = * means keep all facts
2. documented #SPLIT_QUOTE tokencontrol (removes double quotes from input)
3. ^stats(TEXT) bytes of heap left, ^stats(DICT) dictionary entries left
4. ^jsontext(FactId) adds quotes if object of fact is a json text
FAILS if not a json fact. CS represents json text as ordinary
unquoted text, but text that looks like float numbers would be
subject to possible float truncations or expansion of digits.
5. ^replaceword(word location) arguments are like ^mark and ^unmark, except this changes the
actual original word at the position (which is just 1 word of the sentence). This changes no concept
markings (which you can do yourself with mark and unmark). With this, for example, you could unrevise a spellfix
like this:
u: (_~emosad) $_tmp = ^original(_0) ^replaceword($_tmp _0)
6. Parameter: repeatLimit=n
Servers are subject to malicious inputs, often generated as repeated words over and over.
This detects repeated input and if the number of sequential repeats is non-zero and equal or
greater to this parameter, such inputs will be truncated to just the initial repeats. All
other input in this volley will be discarded.
Version 8.6 10/4/2018
1. configurl=http://xxx as a command line or config file parameter allows you to
request additional parameters from a url. This would be important if for security reasons
you didn't want some parameters visible in a text file or on the run command of CS.
2. Normally facts created by user script only impact that user (saved in their topic file).
Now you can create facts that can affect all users. Maybe you want to write a bot that
learns from users like Microsoft's Tay did.
a) (secondary) When you modify some pre-user fact (layer 0, layer 1, boot layer) the change
will move into the boot layer and thereafter be visible to all users.
b) (primary) When you create JSON data in a special way, it will migrate to the boot layer at the
end of the user's turn and not be saved in the user topic file. To do this,
merely use BOOT instead of PERMANENT or TRANSIENT on the initial args to a
json structure creator, eg ^jsoncreate(BOOT OBJECT).
Facts moved to boot will be lost if the server restarts or you call the boot
function. A command line argument of "recordboot" will direct CS to write the
these facts into a top level file "bootfacts.txt" as they are migrated to boot. You would be responsible
for writing a boot function that reads it on execution to recover these facts on startup. Direct modification of
system facts in (a) are not saved. You would have to write your own scripts to track
those changes.
There is no way of collecting garbage from abandoned pre-user data, so do the
above too often and the server may run out of memory and die.
3. ^stats(FACTS) returns how many free facts are left.
Version 8.5 8/23/2018
1. ^walktopics('^func) finds the topics current bot can access
and calls ^func with topic name, iteratively.
2. ^walkvariables('^func)
3. ^reset(VARIABLES) - sets all global user variables to NULL
4. ^reset(FACTS) - kills all permanent user facts
5. ^reset(HISTORY) forget what was said previously
6. not new but now documented %input = n sets that system variable
Other system variables can be set as well, sometimes locking them
into that value until you do %xxx = .
7. indirect function call ^$_xx() if $_xx holds a function name
version 8.4 8/12/2018
1. ^findrule(label) finds a rule with that label (not tag) anywhere in all topics
and returns the tag for it (presumes unique label)
2. in filesxxx build file, if you name a directory with two tailing slashes,
then the system will compile all files recursively within and below that folder.
3. $cs_responseControl RESPONSE_NOFACTUALIZE to suppress fact creation of bots output
4. script compiler directive ignorespell: to block some kinds of spelling warnings
ignorespell: word1 word2 ... (use lower case form of word, will not warn about upper and lower case mixtures)
ignorespell: * turn off all spelling warnings on casing
ignorespell: !* turn on all spell warnings on casing
version 8.31 6/18/2018
1. ^readfile(line filename 'function) will read lines from the file and pass them untouched
as the sole argument of function. This is formerly called: ^jsonreadcvs which is legal but
deprecated.
2. max match variable is now _30 instead of _20
version 8.3 6/9/2018
1. new manual Practicum - Messaging
2. loop now allows function call as argument: loop( ^length(@0)) {...}
3. new manual Practicum-ControlFlow
4. may now use match variables and quoted match variables in json indirections:
$_x[_5] = 4
$_x._5 = 5
$_x['_5) = 5
$_x.'_5 = 5
$_tmp = $_x._5
etc
5. :allmembers ~concept ~nonconcept ~nonconcept dumps the members of ~concept into TMP/tmp.txt, one per line,
but excludes any that are member of the ~nonconcept sets.
6. command line param "authorize" allows all server users to use : commands, regardless of authorized.txt.
7. new manual Practicum - Gleaning
version 8.2 4/1/2018
1. debugger has autosizing to your screen and save/restore for size/location adjustments you make
2. ^query(exact_svrange x y ? -1 ? ? lowvalue highvalue) Finds facts whose object is x<=object<=y numeric
3. ^query(exact_vrange ? y ? -1 ? ? lowvalue highvalue) see Predefined queries section in Facts Manual
version 8.1 2-18-2018
1.CS Debugger now has been released in Release mode, so maybe it works for you, and has new features-- read the manual again.
2. new manuals: Practicum- Rejoinders and Practicum- Patterns
3. $cs_sequence wins over default sequence limit of 5 words in a row
4. !<< >> is now legal
version 8.0 1/31/2018
1. files to compile by script compiler must now end with suffix .top or .tbl so you can
allow other files in same directories (like readme.txt, etc).
2. :timelog computes avg/min/max of a server log response times
3. for json arrays can now do: $_array1 += $_array2 and $_array1 += value
4. Windows GUI debugger for CS. See ChatScript debugger manual.
version 7.73 12/7/2017
1. several fixes to pattern matcher
version 7.72 IMPORTANT FIX FOR BUG INTRODUCTION IN 7.6 -- KNOWLEDGE of adverbs in dictionary lost
1. param traceuser=username to make a server trace that user only
version 7.71 11/29/2017
1. :spellit some sentence, tells you what spellcheck found to modify it
version 7.7 11/19/2017
1. DLL version of ChatScript now part of std release (untested)
2. $cs_outputchoice to force random output choice
3. :trace treetagger
4. Spellcheck will fix words with excessive repeated letters will be adjust. 3 or more in a row truncated to 2. If not recognized, each single pair of
2 will be tested as one. so hellllloooooo becomes helloo becomes hello
5. ~noun_phrase added to allow you to grab noun phrases in input
6. treetagger chunks (if available) get marked
7. :trace INPUT to see input w/o all the concept bindings
8. :tokenize - subset of :prepare that just shows resulting transformations on input, no pos and concept marking.
9. :trace all universal - sets engine to trace everything listed (even in server mode)
10. System now handles multiple upper case forms of a word, so it can
memorize the particular ones you do differently in concepts and return
the correct one.
version 7.61 11/04/2017
1. ^pos(canonical xx all) get all canonical forms (for foreign use)
2. ^mark(_0 value single) dont mark the entire implication chain, just the argument given
3. Advanced manual now has a section on advanced tokenization
version 7.6 10/22/2017
1. ~capacronym - acronyms that are all caps, all letters
2. :trim now supports optional quoted first param :trim "keepname"
which instead of dumping all files it sees into a single tmp/tmp.txt file
keeps the names of the files it sees separated into tmp/*.txt
3. you can now specify db name to postgres
4, ^pos(isalluppercase xxx)
5. implicit concept set for [] and {} in patterns when simple words/phrases/concepts
6. :dedupe filepath, outputs into tmp/filename just unique lines from the input
7. command line parameter defaultbot=name gives the name of the default bot to use, overriding the defaultbot table value.
8. ^timeinfofromseconds now returns 2 more values, the months index and the dayofweek index
Version 7.55 9/24/2017
1. new PDF document: ChatScript Coding Standards
2. RESPONSE_CURLYQUOTES converts on output plain quotes to curly ones
Version 7.54 8/27/2017
1. limit on arguments to outputmacros raised to 31 from 15
2. ^setresponse(index message) # revises existing response to this (can be used in postprocessing)
3. CS server protocol allows a single null-terminated string, with user and bot components separated by ascii 1 instead of ascii 0.
4. ^pos(canonical xxx yyy) takes optional 3rd argument yyy, the pos-tag of the word (since words using foreign dictionaries may have
different canonical values based on pos-tag).
Version 7.53 8/12/2017
1. :tsv convert tsv to table form (putting quotes around things without it)
2. %externaltagging
3. improved control script manual
Version 7.52 7/8/2017
1. ^respond(~xxx TEST) conditional execution of a topic to see if a match would occur (no output)
2. revision of german noun pos tags in dictionary
version 7.51 6/25/2017
1. ^pos(isuppercase xx) does it begin with uppercase letter
2. $cs_proxycredentials // "myname:thesecret"
$cs_proxyserver // "http://local.example.com:1080"
$cs_proxymethod 1 is most common value to use- see https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
3 tmp= command line -- reassign location of TMP directory
4. ^jsonopen allows json composite reference to be postdata argument, will write it into text as the data for you
5. :quotelines file, reads lines and puts doublequotes around them
6. Spanish concepts (ontology) and Livedata
version 7.5 6/18/2017
1 :dualupper - list words that have more than one uppercase form
2. hidefromlog param - list json fields not to save into user or server log
3. ^jsonparse autoconverts \unnnn into corresponding utf8 characters
4: :trim 12 - put out rule label then input then output
5. $cs_saveusedJson - destory any json not referred to via a user variable when saving user
6. new spelling-marking manual
Version 7.43 5/28/2017
1. Numeric Substitutions - replace ?_km kilomenters converts 1.2km into 1.2 kilometers
2. tokenization of 65' and 65" changed to leave token as is.
before it became 65 feet and 65 inches. You can get that same effect
by adding into your script somewhere:
replace: ?_" inches
replace: ?_' feet
3. $cs_topicretrylimit (default 30) allows you change when error occurs with too many topic retries.
4. $$topic_retry_limit_exceeded set if limit is hit
Version 7.42 5/7/2017
1. *~8b for bidirectional search
2. ^burst($val digitsplit) splits into two pieces a word part and a digit part (dd12 => dd 12) and
(12dd => dd 12) - if it starts with digit, gets all consecutive digits as second value and all the
rest as first. Otherwise if ends with digit, gets all consecutive rear digits as second value and
rest of word before as first value.
3. may now call outputmacros from patterns, it protects match variables across the call
Version 7.411 5/7/2017
1. fixing numeric bugs
Version 7.41 4/30/2017
1. ^setposition now allows a wildcard id as the second and last argument
2. the ? operator can now check for value in json array.
3. ^format( integer/float formatstring value) does format of doublefloat or int64 integer
4. ^clearmatch() resets all match variables to unmatched
5. ^wordatindex() now support ranges, allows optional 3 argument end. Or second argument can be "_0"
6. $cs_numbers = french, indian, american or other
Version 7.4 4/24/2017
1. $x.y[] = 1 autogenerates a json array
2. $cs_fullfloat & 64bit float & e-notation means the system gives you full precision, not 2 digit
3. JSONOPen now performs urlencoding automatically
4. servertrace command line param - forces all users to trace
5. erasename command parameter - full user reset if found in input
6. compile outputmacros in any order (but must already be defined if used by a table)
7. ^pos(IsModelNumber x) and ^isInteger and ^isFloat
Version 7.31 4/8/2017 --- NEED TO RECOMPILE YOUR BOT! format has changed in TOPIC folder
1. ^wordAtIndex({original, canonical} n) retrieves word at index either original or canonical
2. ^cs_reboot and ^reboot
3. $x.y = 1 autogenerates
4. replace: now takes quoted expressions on the right side, decoding to x+y
5. Livedata- internalconcepts.top is a concept listing all internal non-enumerated concepts
6. Livedata- numbers.txt (per language) describes canonical numeric value of numerically oriented words
7. Previously undocumented ^makereal function changed and documented to take an argument. It allows to make transient facts
in a factset permanent (or such facts created after a given fact)
Version 7.3 3-4-2017
1. topic files of user stored by language as well as user id and bot name if not english
2. NO_CONDITIONAL_IDIOM
3. ^tokenize(WORD xxx ) and tokenize(FULL)
4. MemoryGC
5. ?$var pattern test
6. %timeout
7. ^isnormalword(value) ^isnumber(value)
8. string comparison in IF or pattern now supports < > <= >= for string ordering (case insensitive)
9: :redo FILE filename xxxxx -- to name file to open instead of std backup of last turn
10: loglimit=n where n is number of MB log rolling
11. ^removeproperty supports HAS_SUBSTITUTE to turn off a substitution from LIVEDATA
version 7.2 2-9-2017
1. ^jsonreadcvs takes optional 3rd argument - function to invoke with the fields instead of returning json
2. ^tokenize($_text) returns facts of (sentence ^tokenize ^tokenize)
3: :mixedcase - lists all words which have multiple case forms
4. %language returns current dictionary language
5. engine concept ~model_number marks words with both alpha and digit in them
6. command line buildfiles=xxxx to tell where filesxxx.txt are
7. French, German, Spanish dictionarys and utf8 spellcheck support
version 7.12 1-28-2017 -- recompile your bot. TOPIC format has changed slightly
1. ^jsonreadcvs to read spreadsheet files
2. fixed concurrency bug -- CHANGING to VS2015 since source using C++11 no longer compiles in VS2010 and you cant easily
get that compiler version any more.
3. :trim 11 shows when exchange happened, and noob argument can now control input and/or output trimming
4. Command line parameter manual split off from system concepts and variables
5. topic= command line parameter
6. renamed $cs_factowner to $cs_botid
7. Moved and expanded discussion of multiple bots from advanced manual to new ChatScript Multiple Bots manual
version 7.111 1/15/2017
1. fixed major bug in concept reading I introduced in 7.11
version 7.11 1/15/2017
1. allowing @ and . in user file names at login
2. bot: 1 harry -- sets bot fact owner at same time (see $cs_factowner)
3. allow bot: command as a line in the filesxxx.txt build file to change bot restrictions from there
version 7.1 1/7/2017
1. command line parameter apikey for :translateconcept
2. :translateconcept to use google translate on concepts from english
3. conditional block comments now supported:
##<<German .....
..
##>>
4. noboot command line param
5. cyclomatic complexity listed in map file (described in Debugger manual)
6. command line parameter userencrypt enables encrypting user topic file if encrypt= and decrypt= is set
7. command line parmater config= (default is cs_init.txt)
8: optional {} around output macro
9. consolidated all command line parameter descriptions into ChatScript System Variables and Engine-defined Concepts
10. new manual ESTORIC/ChatScript-Foreign-Languages
version 7.01 1/1/2017
1. fixing $_variables in topics where changing rules destroys the value assigned
version 7.0 12/30/2016
1. logsize - bytes for the log buffer to use (see advanced manual)
2. outputsize - bytes for main output buffer to use (see advanced manual)
3. autoinitfile: username-init.txt at top level (see advanced manual)
4. new manual- ChatScript Debugger and corresponding :debug command described within
5. @_10 anchor pattern element (see advanced manual)
6. ~integer, ~float, ~positiveinteger, ~negativeinteger refine ~number
7. RESPONSE_NOCONVERTSPECIAL on $cs_ response or as flag to ^log will block conversion of escaped n,r,t into their ascii counterparts
8. conditional compilation per line supported- see advanced manual conditional build
9. language= command line param (defaults english) revised DICT/LIVEDATA data access per language-
WARNING: data organization within LIVEDATA has changed. If you are running your own copy, mimic the new structure.
version 6.91 12/3/2016
1. autodelete and USER_flag1...4 for json
2. :trace -userfact
3. deleting a json fact will recurse and delete the object referred to UNLESS it has some other reference to it still on another json fact.
4. Match(~concept)
5. added ^callstack(@1) --- removed ^backtrace()
6. $cs_factowner can be assigned a bit value to control what facts you can see
version 6.9 11/20/2016
1. ^nth now accepts json object or arrays, returns the factid of the nth member
2. command line parameter root=xxxx to tell where CS root directory is
3. for ^jsonpath, if you give a field name first without ., CS defaults the dot
^jsonpath(field $_obj) == ^jsonpath(".field" $_obj)
4. ^jsonkind($_obj) returns array or object if a json thingy, or fails if not
Version 6.87 11/5/2016
1. Backtrace() to show calls to get to you
2. :trace output ^function --- you can control function tracing bits in detail
3. ^pick(jsonarray or jsonboject) returns factid
4. $xx.subject or $xx.verb or $xx.object if $xx has fact id
5. %restart - can be set and then retrieved across a system restart (:restart)
6. can use local vars in function definition: outputmacro: ^x($_arg1 $_myarg)
version 6.86 10/23/2016
1. ^delete now always succeeds. For undeletable things like text, it merely ignores it
2. JSON_DIRECT_OOB tokencontrol for json that is too large for being a token
3. optional 5th param to jsonopen, timeout in seconds for this call (applied 1st to connection, then to transfer)
so total max is double
4. ^environment(variablename) retrieves environment variable value
5. like json object references $x.y.z you can now do array references like $x[$tmp].y[5]
BUT you cannot do assignment into an array for a new index, only on an existing index.
6. input tokenizer from user input NO LONGER auto converts "&" into "and"
7. ^jsoncopy no longers fails if what you pass is not a json structure, it merely returns what you passed
version 6.85 10-8-2016
1. If (^function()) fails if function returns false (as well as previously returning 0 or failing
2. @4 = ^jsongather(jsonstructure) - now allowed in addition to ^jsongather(@4 jsonstructure)
3. source= command line parameter will start up using that file as input
4. ^jsongather(xx xx limit) gets facts thru the limit level deep.
5 :trim xx xx nooob - display outputs without oob data
6. $x.a = null clears as does ^jsonobjectinsert($x a) use of "" or ^"" sets json literal null
9. $$csmatch_start $$csmatch_end tell range of where ^match matched
8. ^jsonarraydelete(VALUE $array value ALL)
9. ^jsonobjectinsert(DUPLICATE $object name value)
10: $t.test.$foo = or $test.test.foo += are now legal
11: :coverage and :showcoverage - the first dumps data on what rules have been output executed so far into
/TMP/coverage.txt. The latter displays an abstract of all of your scripts, marking rules that
have been executed and those that have not (by omission)
12: ^import and ^export have special behaviors if the name includes the substring "ltm"
13: outputmacros may now be called with factset references as arguments
14: safe as argument to jsonobjectinsert or jsonarraydelete will not recursively delete json content
^jsonarraydelete("safe index" $array 3)
^jsonobjectinsert(safe $object $key null)
version 6.84 9/25/2016
1. supports json path argument with string for key so you can do ^jsonpath(."st. helens".data $$x)
2. dotted notation supports $x.y.z and $x.y.z =
3. findtext now also returns $$findtext_word which is what word it was found at
4. ^actualinputrange(start end) from ^original data, naming a range of words, what actual words are covered
returns range (begin<<16) | end
5. ^sleep
6. ^originalinputrange(start end) from ^actual data, naming a range of words, what original words generated it
returns range (begin<<16) | end
7. command line paramter login= (documented in advanced manual)
8. ^return(null) now made to be equivalent to ^return() to avoid errors
9. ^jsonopen(direct - returns the read text directly to the answer, rather than converting to json facts
10. %pid - process id
11. encryption, encrypt= decrypt= command line parameter (documented in clients and servers manual under encryption)
12. :time (performance measurement) documented in debugging manual
13. bootcmd= command line parameter executed before CSBOOT is run (if it is run) (documented in advanced manual)
version 6.83 9/11/2016
1. ^extract now also takes signed arguments to perform relative or backwards extractions,
eg ($$source 5 +2) to extract 2 characters beginning at position 5
($$source 5 -2) to extract 2 characters ending at position 5
($$source -1 +1) to extract last character – from end, start 1 character before and get 1 character
($$source -5 -1) from end, start 5 characters before and get 1 character before, i.e. the 6th char from end
2. $cs_usermessagelimit sets max user/bot message saves. range 0...20
3. $var.key
4. clarify ^all = 1 and such assignments to function variables
5. Full wiki documentation up-to-date, with HTMLDocumentation folder corresponding. I have not
proofread the wiki or html, so it may have minor glitches still.
PDFDocumentation not generated from Wiki yet (manually updated).
7. boottrace param to request trace over a startup boot loading of data
8. proofread of all documentation
Version 6.8a 8/27/2016
1. :trace full renamed :trace always, merely allows you to pass thru ^notrace but you can still choose bits you are tracing
2. mongo support for filesystem changed...
3. ^authorized() allows a script to test for authorization of current id just as debug commands do
4. Giorgio Robino has transcribed 1st half of the CS documentation into wiki format in directory WIKI.
In the future I will update it and remaining documents as I ongoingly revise documents. So currently wiki matches 6.8
Renamed DOCUMENTATION to PDFDOCUMENTATION
Version 6.8 8-13-2016
1. JsonParse allows optional argument before the data of NOFAIL - will return null without error if something is wrong
2. ^jsonpath can end a path with *, which means return fact id rather than object of fact. EG
^jsonpath(.value* $$id) or ^jsonpath(".foo[5]*" $$id)
3. full local variables in topics and outputmacros, $_xxx (see Advanced manual- Local Variables)
Version 6.7b 8-5-2016
USER TOPIC FILE FORMAT now detects the old format again, and accepts it, along with newer format.
1. %zulutime - format: 2016-07-27T11:38:35.0Z
2. documented :trace factcreate x y z in debugging manual to trace specific fact creations
Version 6.7a 7-31-2016
1. ^'xxxxx' -- active json string. Advanced manual.
2. postgres user storage name now includes USERS/ and .txt at end
3. renamed %http_response to %httpresponse. Json manual
4. Mongo DB now supported. Mongo manual
5. param nosuchbotrestart to force server restart if bot not recognized. Advanced Manual or Server manual
6 ^layer(word) tells you when word entered into the dictionary. System functions manual
7. no longer building linux postres version as part of standard. You can build it or mongo as needed.
Version 6.62 7-24-2016
WARNING- USER TOPIC FILE FORMAT CHANGED, old ones will self destruct and clear to empty
1 :restart can take a 1st argument of "erase" which means system should erase topic file of current user (changing systems)
and it can take up to 4 replacement command line parameters
2. ^jsonlabel(label)
3. ^jsonundecodeString(field)
4. $cs_externaltag ^setoriginal, ^setcanon, ^settag, ^setrole
Version 6.61 7-17-2016
1. jsonobjectinsert will delete old value if exists, then insert replacement.
2. ^jsonarraysize is now deprecated in favor of ^length - you get nonfatal warning messages
3. ^jsondelete is now deprectated in favor of ^delete - you get nonfatal warning messages
Version 6.6 7-4-2016
1. ^matches - returns string of word indices detected by a match
2. :trace $var
3. DO_SPLIT_UNDERSCORES
4. LEAVE_QUOTE documented from $cs_token
5. ^wordinconcept(wordreference ~concept)
6. ^conceptlist returns facts whose third argument is now start<<8 + end (range rather than just start)
7. MARK_LOWER tokenflag
8. ^clearcontext()
Version 6.5b 6-11-2016
1. ^serialize(@set) ^deserialize(string) convert factset to a string and back out again.
2. ^query can now also directly return a field value from a match by naming field on the TO argument
$$tmp = ^query(exact_sv meat eat ? 1 ? @1object)
3: :restart now accepts up to 4 commandline parameters
4. ^savesentence(label) and ^restoresentence(label) will save and restore an entire
sentence preparation, so you can jump back and forth between sentences in pattern matching w/o real cost.
Version 6.5a 5-18-2016
1. ChatScript now enforces a rule that a function variable name should not be the name of an existing function (hides the function).
This may cause your builds to break until you rename your variables in question.
2. :trace full -- when set, disables NOTRACE() so everything is traced using all flags
:trace ignorenotrace just turns on the flag, leaving your other bits intact
:trace none turns off all bits and any ignorenotrace flag
3. PRIVATE_CODE now requires PrivateInit() and PrivateRestart() and PrivateShutdown() functions and
file privatetestingtable.cpp for any :test overrides, a command line paramemter private= passes its value
thru to PrivateInit
4. ResponseRuleID(-1) does all to date
version 6.5 -- 5-7-2016 WARNING- change of directory structure in TOPIC
0. TOPIC now gets subdirectories for each of the build layers. While it will work with content in the old format (all at top level)
or the new format (subdivided into BUILD0 and BUILD1 subdirectories, it will only :build into the new format. If you have
deployment scripts, make sure when they perform builds that CS can create these subdirectories.
1. when using pattern- u: ($$test?) which would see if word was found in sentence,
if it is a quoted string "buy me" it will be able to find that sequence as matching.
2. ^jsonarraydelete([INDEX,VALUE] array index) to remove element and renumber later ones down
3. while !not in pattern checks that not doesnt appear later in the sentence, !!not checks that it is not the next word
4. :trace RULEFLOW will just show the rules as it does their outputs. It is a terse flow of control view.
version 6.4 4/30/2016
1. ^importfacts may have null as its set value. It wont store the facts created in a factset.
2. ^conceptlist takes optional 3rd arg, prefix to filter by
3. ^words(word) get all dictionary entries with this spelling, upper and lower case, spaces vs underscores
4. #define DISCARDDATABASE renamed to DISCARDPOSTGRES
5. ^dbinit(EXISTS ...) will return normally when db is already open
6. :restart autocloses a postgres db
7. ^CSBOOT will now print its results to console and if a server, to server log
8. ^CSSHUTDOWN added for system going down behaviors
version 6.3a 4/16/2016
1. jsonarrayinsert allows a leading flag UNIQUE, in which case it does not add to array if already there.
2. ^notrace(... ) turns off regular tracing for the given stream. Explicit function and topic traces are not blocked, just normal :trace xxdx
3. $cs_jsontimeout sets json wait delay (300 second default)
4. save/restore local variables allow you to avoid naming collisions -- see advanced manual outputmacros:
e.g. outputmacro: ^myfunc(^arg1) ($$tmp $$tmp1)
code
the values of $$tmp and $$tmp1 are saved and restored across the call, so the macro may safely write on them.
5. ^return(...) see advanced manual outputmacros:
version 6.3 4/10/2016
1. ~twitter_name detected as concept for @xxx names and ~hashtag_label detected as concept
2. $cs_beforereset and $cs_afterreset if, assigned to functions, will execute them before and
after a :reset. This is your chance to pass some information across to the newly reinited user.
I store data in _match variables before and retrieve them after.
3. Outputmacros can be declared as executable javascript code. New manual in Esoterica for that.
version 6.2g 3/27/2016
1. fixed slowdown introduced into the engine a few versions ago.
version 6.2f 3/25/2016
1. ^jsonparse now accepts a flag argument of SAFE, which means you can use it against data the extends beyond the minimal, meaning
if you memorize OOB data after [, you dont have to care to find the closing ], which will be hard since JSON itself has ] in it. Eg
u: ( \[ _* ) $$jsonfacts ^jsonparse(safe _0)
2. support for spanish spellchecking
version 6.2e 3/20/2016
version 6.2d 3/14/2016
1. ^substitute 1st arg can now be "insensitive", meaning character search and case insensivive. Or you can
provide a string like "word insensitive" to pass 2 arguments.
2. %originalSentence will give you the raw user input for the current sentence (after tokenization)
3. ^original(_0) will give you the original text of the user that this match derives from (see docs for more details)
version 6.2c 3/5/2016
1. You no longer have to backslash [ in an active string. You can do ^"[$count]" with impunity.
That means that using [] [] notation to designate a choice of text is no longer effective inside
an active string"
2. ^Next(loop) will skip the rest of code in a loop and begin the next interation (NO MATTER how far
up the call chain the loop actually is)
3. CS can now be run old-style (all executables at top level) or within BINARIES
4. %host gives you the name of the currently running host.
5. ^pos(verb be present/past XXX) optional 4th arg to verb form, names pronoun or noun used, so better handles irregular verbs
6. $cs_language, if set to spanish, alters spellchecking for spanish
version 6.2b 2/24/2016
1. Moved executables and DLLS to folder BINARIES. You must now run CS from there rather than top level.
CS changes current working directory up 1 level after starting.
Revise Cron jobs and shortcuts to the exe appropriately.
version 6.2a 2/20/2016
1. ^norejoinder() makes this rule unable to set its rejoinder.
2. CS now allows multiple forms of uppercase words, e.g., ID and Id
3. Recently a major security hole in glibc, open source c library was announced and patched. CS uses glibc.
This build uses the new version. If you are running older versions of CS, there is some security risk and
you are advised to upgrade to this executable linux version, or apply sudo yum update to glibc (or equivalent
commands) and then rebuild your existing sources.
4. optional 3rd argument to ^jsonpath(xx yy safe) tells it to return ugly data with doublequotes around it. Things with
embedded json data or whitespace need to be passed into jsonformat using safe data.
version 6.2 2/14/2016
1. documented existing assignment abilities: @3 = @2 @3 -= @2 @3 += @2 @3 = $$factid
@3 += $$factid @3 -= $$factid
2. new command line parameter timer=15000x10 to control how long a volley can last before being abandoned
by time. 1st number is millisecond limit, 2nd is a checking frequency (reducing load of getting the time
frequently)
3. %maxmatchvariables and %maxfactsets given the highest legal number for those respective things
4. UNLIKELY INCOMPATIBLE CHANGE: previously if you used match variables inside a nested pattern component, e.g.,
u: ( _this ( my _*1 ) )
it would be discarded on return to the top level. THEREFORE except in unusual cases, you would not have nested match
requests. NOW... they are not discarded. If the above matches, _0 and _1 are both defined. Same for
u: (this _(my _{often} dog))
which sets 3 match variables
version 6.1d 2/7/2016
1. new command line parameter debug= allows you to execute a :debug command on bootup and then exit.
eg. "debug=:trim USERS 4"
2. IF tests can now be made of a std rule pattern (including memorization etc) using form
if (pattern ....) {} which means you can match input and even memorize during the if test
Version 6.1c 2/2/2016
1. ^sequence added, similar to refine, except instead of only executing one rule, executes all matching rules.
2. Added :common word1 word2 to tell you the concepts they both particpate in, closest first.
3. $bot has been renamed $cs_bot and $login has been renamed $cs_login with script errors if you use the older names.
4. added internal ~timewords as an enumerated concept as well.
Version 6.1b 1/25/2016
1. variables owned by the bot can be defined (always resident unchanged accessable to all users) - see Advanced Variables in
advanced manual
2. $cs_trace enables and tracks traces by user
3. right hand side of a comparison in a pattern may now be a double-quoted string, looks at the inside of the quotes
Version 6.1a 1/21/2016
Version 6.1 1/17/2016
1. concept from ontology concepts: ~daynumber renamed to ~dayindex so as not to collide with engine concept.
2. ~common7 redacted
3. ^load(name) to dynamically load a layer of topics (analogous to layers 0 and 1 that load on startup)
Version 6.01a 1-9-2016
1. DICT/BASIC has a small dictionary of words thru grade 6, suitable for use on mobile devices seeking
to minimize CS memory use. See end of Finalizing a bot: Mobile size issues
Version 6.01 1-7-2016
1. easier to follow output tracing
2. jsonopen now supports PUT as a type (with arguments just like POST)
3. ^length now accepts the name of a json object or array, and returns the number of elements it has
4. ^match can take a rule tag instead of a pattern, using the pattern of that rule.
Version 6.0 1-02-2016
1. easier to understand pattern tracing
2. ^print accepts more flags (RESPONSE_ ) controlling output
3. %timenumbers for a complete second minute hour dayinweek dateinmonth month year data
Version 5.93 12-31-2015
1. New manual "ChatScript Common Beginner Mistakes"
2. time.tbl file removed from worlddata, its 2 concepts merged into ontology concepts, whose order of data has changed
concept: ~month_names (Apr April Aug August Dec December Feb February Jan January Jul July Jun June Mar March May may Nov November Oct October Sep Sept September )
concept: ~month_names_index DUPLICATE (3 3 7 7 11 11 1 1 0 0 6 6 5 5 2 2 4 4 10 10 9 9 8 8 8 )
concept: ~daysinmonth DUPLICATE (30 30 31 31 31 31 28 28 31 31 31 31 30 30 31 31 30 30 30 30 31 31 30 30 30) # 0-based
concept: ~month_proper_names DUPLICATE (April April August August Decemeber December February February January January July July June June March March May May November November October October September September September )
3. :trace none now also turns off all topic and macro tracing
4. $cs_utcoffset now accepts time notation as well, like -02:30 to adjust 2.5 hours before utc.
5. :trace notthis ~topic will suppress tracing in this topic AND below it
Version 5.92 12-27-2015
1. Jsondelete now only takes 1 argument, name of json composite to delete
2. :prepare now takes optional initial argument NOPREPASS to avoid using prepass topic
version 5.91 12-23-2015
1. all debug commands have a 2character abbreviation of 1st and last letter (those that conflict
tie goes to the the first in the table).
2. src directory renamed SRC (must use new executables which have correct directory case in LINUX)
3. ~email_url split off from ~web_url and recognized by the engine
4. add ^jsoncopy( jsonref) to duplicate a json fact structure given its name
5. ^jsonparse now accepts extended object references that get or dereference existing json structures
6. %originalinput gives the original volley input
7. new manual ChatScript System Variables & Engine-defined concepts split off from various manuals.
8. the json argument "unique" has been deprecated. it is no longer needed.
9. PRIVATE_CODE define supports you appending code to functionexecute.cpp w/o changing engine source.
See new manual INSTALLING AND UPDATING CHATSCRIPT
version 5.9 12-14-2015
1. renamed ~verbs to ~verblist, ~prepositions to ~prepositionlist, ~adverbs to ~adverblist and
~adjectives to ~adjectivelist - these lists are not from the pos-tagger and should not be used
in scripts. They are aggregation data about what is in the corresponding files in ONTOLOGY.
2. :show newline forces newlines to remain in the log file for respond: and start: lines.
3. renamed ^jsonprint to ^jsontree so you can remember it vs ^jsonwrite
4 ^jsonformat( textstring) takes a json string and writes it so that all keys have double
quotes around them. So you can build a json string from a CS format string w/o having to
have (and escape) quotes around the field names
5. new system variable %http_response returns most recent response code from libcurl (for ^jsonopen)
6. optional 1st argument to ^jsonopen, ^jsonparse, ^jsoncreate,
^jsonobjectinsert, ^jsonarrayinsert is word "permanent" to tell the facts to
not be transient and "unique" to make the facts unique across volleys.
7. ^decodeinputtoken(number) given %token or $cs_token will give english values for the enabled bits.
8. Added writeup just after OutputMacros in advanced manual, comparing them and ^reuse().
9. added ^jsonarraysize(string) to count how many elements are in the given json array name.
10. added discussion of using complex headers to JsonOpen
version 5.8f 12/10/2015
1. Jsonprint takes optional 2nd argument depth to print to
2. optional first argument to :reset makes it safe to call from inside a script
Version 5.8e 12/5/2015
1. removed ^setposition(value). Now you must use ^setposition(_var start end) you can use @_x+ to create an equivalent effect.
Version 5.8d 11/29/2015
1 ^undelete can take a field restriction like ^undelete(@0object) which insures
that the fact and/or the object is unique
Version 5.8c 11/28/2015
1. improved :testpattern trace
Version 5.8b 11/26/2015
Version 5.8a 11/22/2015
1. :build option NOSUBSTITUTION will disable warning you about various substitutions.
2. Sample comment can now include F to indicate the pattern is NOT supposed to match
3. $cs_utcoffset is hours from utc, %time returns current time in that timezone
4. ^timefromseconds takes optional second argument, timezone (hour) displacement (+ or -)
Version 5.8 11/13/2015
1. ^jsongather(set jsonid) takes the facts involved in the json structure named by jsonid and stores
them in the factset set.
2. ^jsonparse and ^jsonopen take optional 1st argument "UNIQUE" allowing array and object naming
to be unique based on volleyCount
3. $cs_looplimit, if defined, will replace the default 1000 value limit on how many iterations of a
loop the system will stop at to protect against runaway loops
4. Findtext will now substitute _ to space in source and target before matching, to provide
matching either notation.
5. ^canon(word canonical) is analogous to :canon word canonical, and only works during :build. Used
for table control over setting canonicals.
6. ^jsondelete(factset jsonfact) will delete the fact and all facts referred to by it and if the
fact is an array fact, will renumber all later array value facts down 1.
7. ^jsonobjectinsert( object key value) inserts key and value into object named
8. ^jsonarrayinsert(array value) adds value to end of array
9 ^jsoncreate({object array}) creates an empty json composite.
10 New CS manual ChatScript JSON
Version 5.72d 10/24/2015
1 ^conceptlist fixed (bad edit destroyed the name)