AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Creating new words
 
 

Hello all,

I’m new to ChatScript (using v2.0 as it seems the only version available now) and am enjoying the learning process very much. The documentation and tutorials for it are excellent and this forum is an equal, if not greater, resource.

I have, however, run into a problem I can’t seem to figure out. As my project involves discussion of a lot of technology tools with non-word names, I’m running into issues with the words not being recognized by ChatScripts dictionaries. Below, I’ll use the word ‘wiki’ as a the the example.

Suppose I want to create the following topic:

topic: ~WIKI [wiki "wiki markup"]

t
you are having an issue with the wiki?

     
#! yes
     
a: (~yesWhat is the problem?

     
#! no
     
a: (~noMy mistakeHow can I help

I’ll receive the warning: “*** Warning- wiki is not a word. Did you misspell something?” But if I run the engine, it will identify the phrase keyword [“wiki markup”] though not [wiki] (or [“wiki”] in quotes for that matter).

Following the debugging guide, I tried to create concepts with these words in top-level files.

I added the following concept to RAWDATA/ONTOLOGY/concept.top

concept: ~tech_tools (wiki xtool ytool ztool

I still get the same issues, however. Other investigation has left me unsure of the problem. When I use :prepare, it looks like a simple spellcheck issue.

:prepare wiki

Original Input
wiki
Tokenized Input
wiki
Spellchecked Input
Iwaki 

But when I use :word it appears that my created concept is doing its job:

:word wiki

wiki
ImpliedNOUN NOUN_PROPER_SINGULAR cannonicalwiki

Synonyms
:
Direct Sets: ~wiki ~tech_tools
Facts

Any idea what I’m doing wrong?

 

 
  [ # 1 ]

Hi Josephry,
  Search the user manual for this:

  The allownonwords.txt file is a list of non-words that the script compiler should allow in a pattern or output w/o warning you they may be misspellings.

 

 
  [ # 2 ]

Thanks for the suggestion Davaris.

I forgot to mention in the OP that I had also previously tried this (I’ve tried a lot of things raspberry). Although adding “wiki” to this .txt file suppresses the warning on start-up, the word will still not match either as a keyword alongside a topic or in a pattern alongside a responder.

 

 
  [ # 3 ]

I tried it on a 2.9x version and it worked okay with your code. So you will likely have to wait for version 3, which is coming soon.

 

 
  [ # 4 ]

Either that or you will have to change something in the dictionary.

 

 
  [ # 5 ]

Thanks for the help.

I thought it could be an old version issue. I’ve taken a look at the DICT files and briefly read up on the components of these WordNet entries, but I’m not sure how I’d go about creating a WordNet ID or “synset offset” for a new word. Also, Bruce’s admonition in the debugging manual that editing the dictionary is “not for the faint of heart” definitely gives me some pause. smile

Has anyone edited the dictionary who might be able to give a quick tutorial?

 

 
  [ # 6 ]

I had a look at the debug manual and found this:

Editing the main dictionary is not a task for the faint-hearted. But ChatScript maintains
secondary dictionaries in the TOPIC folder and those are easy to adjust.  To alter them,
you can define concepts that add local dictionary entries. The names of important word
type bits are in src/dictionarySystem.h but the basics are NOUN, VERB, ADJECTIVE,
and ADVERB.
concept: ~morenoun NOUN (fludge flwoa boara)
A concept like the above, declared before use of those words, will define them into the
local dictionary as nouns and suppress the warning message. You can be more specific as
well with multiple flags like this:
concept: ~myverbs VERB VERB_INFINITIVE (spluat babata)

Did you try adding those flags to your tech_tools concept?

 

 

 
  [ # 7 ]

I tried that earlier after seeing the section you quoted above (and just retried doing so again now). If I add the POS tag to the concept (either in ‘concept.top’ or as a declaration in the ‘simpletopic.top’), it doesn’t recognize the concept and breaks.

E.g.

*** Error-
in simpletopic.top at 39concept: ~tech_tool NOUN (wiki)
Unknown top-level declaration in RAWDATA/simpletopic.top 

 

 

 
  [ # 8 ]

In ver 2.0, Wikipedia works in place of wiki. Sorry, that’s the best I can do. smile

 

 
  [ # 9 ]

Despite remaining stuck, I really appreciate the help!

Just to understand you, though: you don’t mean that somehow the presence of “Wikipedia” is responsible for my issue, right? As in, if I were to remove it, it would fix the problem? There are a number of “wiki-” words in various word and fact files, just no plain-old “wiki,” unfortunately. I suppose I’ll continue looking for hacky work-arounds while I wait for v3.0. smile

 

 
  [ # 10 ]

Just to understand you, though: you don’t mean that somehow the presence of “Wikipedia” is responsible for my issue, right?

I tried using Wikipedia and it worked, while wiki did not.

I don’t think removing Wikipedia would help, it might even do bad things. lol

I suppose I’ll continue looking for hacky work-arounds while I wait for v3.0.

Yes, I think that is the best thing to do. I had problems with v2.0 recognising other words, so I didn’t worry about it much. The later versions are a lot better.

 

 

 

 
  [ # 11 ]

I commented out the concept you created, added noerase repeat and when I type in Wiki with a capital letter, it works. It does not work with lowercase wiki though.

topic: ~my_wiki_topic noerase repeat (wiki)
#! Testing wiki topic

t: () You are having an issue with the wiki?

     
#! yes
     
a: (~yesWhat is the problem?

     
#! no
     
a: (~noMy mistakeHow can I help
 

 
  [ # 12 ]

A bug in chatscript 2.0 forces “wiki” to “Wiki”.  It will be fixed for 3.0 (which has been submitted to outfit7 for approval, but has not yet been answered).

 

 
  login or register to react