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..

FEATURE REQUEST: Stand-alone NLU server
 
 

ChatScript combines two powerful functionalities: Natural Language Understanding, and Dialog Management. They are commonly regarded as separate components in the dialogue literature: the former translates the user input to some semantic representation, and the latter handles the topic/status information and decides what to say next.

It could be very useful to have direct access to the NLU component alone, as this could give the option to use this component inside other dialog systems.

This could be done by creating a separate TCP/IP server for NLU, activated like this:

ChatScriptNLU port=1024 

The server will understand two types of commands:
[ul]
[li]

SetListOfInputTemplates <text

: each line in “text” is a possible input-template (such as “~yes I do”). This will tell the server what the possible inputs are.[/li]
[li]

GetInputTemplate <input

: “input” is a sentence uttered by the user. The server will return the index of the first line in “text” that matches “input”.[/li]
[/ul]

Theoretically, this could be achieved with the current system, by telling the bot to “reply” with the line index. However, this requires handling subtleties such as input removing, topic handling etc. It could be much more convenient to have a stand-alone component that would do just the NLU, with no dialog management.

What do you think?

 

 
  [ # 1 ]

Currently the server boots up with all its data. It does not expect to read in a table of data to answer from on each volley. Though it CAN read a file of facts in a volley and then make use of it.

And currently the system has a function to process a table of idioms to mark active topics.

The table looks like this:

^”(? you * do * with * yourself > )” ~philosophy # what do you want to do with yourself
^”(? I * feel down )”  ~DEPRESSION # I am feeling down4

The engine can be told to process this table, which means use the 1st entry as a pattern string, and if it matches, mark the listed topic. (3rd arg is sample input).  But I could easily add to engine that if 2nd arg is a string, it should use that as output instead of marking anything. So you could put a number or name value there and that would be the system’s answer to the pattern.

This table is static—- loaded on server startup… but all it does is create a set of facts (thats all tables ever do) and you could read such a table in via IMPORT and execute it if you were really trying to dynamically use the server to select a choice…

does this handle what you want?

 

 
  [ # 2 ]

This sounds good, but how do I use this?
* How do I import a file into the idioms-table?
* How will it interact with the rest of the topic logic? Will it have precedence over all other rules?
* Is it possible to use variables, such as:
^”(? I want to work in a _* position)”  JobDescription=_1     # “I want to work in a Programmer position” returns “JobDescription=Programmer”

 

 
  [ # 3 ]

I still don’t see why you want tables dynamically loaded instead of being ordinary tables at build time. However,

1. Import reads a file of facts.
2. the function ^idiom takes a verb.  In my word the idioms all use the verb idiom.  So you put all your facts in the file stored as triples whose verb is idiom.
3. executing the idiom table is just a function call to the engine. You do it however whenever you want in your control over the bot.
4. WHEN I amend it to perform output instead of only marking a topic word,  it will take an executable string so you can use variables or whatever inside it.  (will need a new engine release, maybe next week).

 

 
  [ # 4 ]

Is the “^idiom” feature already active in version 2.5, Linux? I get an error “Call to function not yet defined ^idiom”. I also didn’t find that idioms table.

 

 
  [ # 5 ]

the function {"^idioms",IdiomTableCode,1,0,"name a verb whose facts are idiom/mark pairs"},
is defined in 2.5, but it only MARKS the object of the fact. I have to modify the engine to execute it as output.
And there will be no idioms table because this is merely script of some chatbot if scriptor writes one.

 

 
  login or register to react