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

Beginner Questions & Feature Requests
 
 

Hello @all,

im new here and try to work on a personal bot with chatscript.
But there are a few problems and things im missing.
A lot of the requests i could solve with frameworks, but that’s not really elegant. And maybe some of these ideas are useful for Bruce or others?! wink

Questions:

1. “:testpattern (sarah) sarah” tells me the pattern failed, but “:testpattern (test) test” works. Where is the problem?

2. Im german and i would like to talk german with the bots. Has anyone already added german data to the dictionary/wordnet files or anyone knows a source where i can download such german files?

Requests:

1. The server always cancels the connection, what about keeping the connection alive? (Might be important for some of the following requests)

2. Using Signals and Interrupts would be awesome. We simply could cause the bot to throw a new gambit after a user hasn’t answered for a few minutes. But we could also react on external signals from other programs.

3. Easier ways of sharing data wir external applications would be great. For example directly getting the console output of the called application (instead of working with data sharing via files). And parsing/working with xml-data could be useful.

4. Another less important change for working with data would be access to sql databases.

5. What about merging or changing the current user profiles? If setting the user-variable should really change the current user profile, forget that request! :-D
Example: I wanna create the bot for different interfaces like chat, messenger, client application…
So a user could talk with the bot via different interfaces and sometimes his id could be identified by nickname, sometimes by the messenger ID.
If the bot realises a new identity, he will ask whether they know each other and if yes, he tries to find out the other identity and store the fact that this identity is a synonym for another one (to directly change the identity next time).
Now the bot will change the identity of the current user and remember all the things he stored for that person.

6. Talking with multiple persons in a chat room. In that case he could also decide whether he wanna answer on a message or ignore it (because he have nothing to say about that topic or the question was for another user).
Another funny thing would be to write different bots which can all talk together in one chat and maybe learn some facts from each other! wink

7. What about translation functions? This could be one help to get bots that partially speak multiple languages. It could help to identify which language is currently used. It can be simply used as a service so a user could ask “what is the german word for dog?”.

 

 
  [ # 1 ]

A lot of questions smile  so I will have to add replies over time.

1. first level of debugging is always to type :prepare xxx to see how the system handles it.
While input is case insensitive, patterns are NOT.  in the pattern, “sarah” is not a normal word, it is a proper name. So the input is converted to UPPER case “Sarah” and cannot match lower case “sarah” in the pattern.  The pattern must be “correct” case.  So if you write a pattern like ( What is your name), that will NOT match any input.  the actual words are all lower case no matter HOW the user enters them.

2. I don’t know of anyone who has worked with german files. If you did work with german, the parser can be disabled as it is dedicated to English. Doubtless there is a wordnet German dictionary. It is NOT in the format of ChatScript’s dictionary though one could perhaps write an exporter. Be advised that I have, over time, REMOVED a bunch of things from the english wordnet that are legal words that cause problems (simple things like “I” is a noun in wordnet standing for Irridium or whatever).

3. Given that a chatscript server is intending to service a lot of simultaneous users, I don’t intend to ever maintain an open socket. I would run out of socket resources too quickly.  When one wants the bot to send content to the user if the user idles too long, the CLIENT program can send a message to the server and get back the bot response. There is no reason to have this logic on the server itself.  Similarly, “external signals” from other programs—- You can always have an intermediary server doing this sort of thing and sending a message to the chatscript server. 

Similarly for access to SQL databases, depends on what access you want. Chatscript server can invoke functions of the main system (albeit not graciously) and you can put intervening servers between your client and chatscript. So you have to specify more precisely what you want to do with the SQL database.

On multiple interfaces/personalities… I’m not fully clear on what you want… However, chatscript tracks a user via a single data file. This file is unique, which means you are somehow responsible for uniquely identifiying a user. This may mean having your own server stand in the middle, accepting logins of varying styles from a user on varying services, and then either sending back to the client the “correct” username to send to the chatscript server, OR sending the request on thru this login relay each time with the correct user name.  The uniqueness of a user can be from his IP address (though his identity will disappear when he gets a new IP) or from his email address or whatever.  Chatscript does not provide a login credentials validation capability. That’s unique to each organization’s applicational use of chatscript.

 

 
  [ # 2 ]

Hallo @Hendrik Motza

Ich bin auch Deutch.. and work in Spanish and have got English Wordnet but no Spanish nor other languages
I also assembled many libraries to get accessfrom any platform.

Your points are good and are about the same as mine initial ideas, here are some Insights.

Working in German will became complicated if you dont get a good adn fast morphologic analyzer at least or a good inflection dictionary! The declinations are as complicated (or even more) as Spanish verb conjugations and the many used inflections. Which you luck, tell me if you got something I also wanted it to speak Deutsch (German).

My engine is Event driven, and believe me Events - across multiple domains and servers - requieres special skills not available on ‘normal’ programmers - only freaks!, I have had a hell of threads, dispatchers and locks to get it working.

Even I got to design in it some high-availability capablities (while a new engine starts another was working and the conversations migrate from the descending one towards the new one, missing no line of text, nor user interaction or event) this rose a hell in my system, until now (am actually changing and debugging this newe version uising C# + windows + Tcp along with .NET and remoting RPC).! Whish me luck (I need it)!

Actually we got running this interfaces: MSN, XMPP, AIM, ICQ, HTTP (web-bot) and GoogleTalk, Facebook, Twitter (Direct Messages, Feeds, Searches and Tweets)

The whole thing took me many months (pehaps 3-4) trying to understand all protocols and gettting working libraries here and there, putting them alltogether into a service.

Also the constant changing of the Social platforms is struggling, my last version failed after 1 year of being un-actualized.

best!

 

 
  [ # 3 ]

Hi Hendrik, hi all,

Helmut Schmids RFTagger for German is the best one I know:
http://www.ims.uni-stuttgart.de/projekte/corplex/RFTagger/

Unfortunately, you have to pay for the german version of WORDNET (GERMANET).
Does anybody here know a bracket for it?

Perhaps DICT could recieve german forms by this:
http://www.danielnaber.de/morphologie/

For me, the first problem which should be solved to create a german CHATSCRIPT
is the difficulty CHATSCPRIPT has with “Umlaute” (Ä Ö Ü ä ö ü) + ß (see UTF-8-discussion here).

All the best
Andreas

 

 
  [ # 4 ]

This is the closest I’ve found to a German WordNet: http://www.sfs.uni-tuebingen.de/lsd/ (GermaNet—how’s that for a name? smile )

The data used in the German OpenThesaurus is also available for download: http://www.openthesaurus.de/about/download

One project you might find interesting is Link Grammar: http://www.link.cs.cmu.edu/link/ The authors built a toy English/German translator using their parsing algorithm to restructure translated sentences. The real limitation of this system is that they choose word-for-word a translation, and then attempt to make it grammatical. Obviously there are a lot of subtleties between languages, and many constructions that you just can’t translate word-for-word. (Not to mention most words don’t map directly to just one other word, instead translating to a variety depending on context!) However, it’s an interesting idea nonetheless.

 

 
  [ # 5 ]

I see we overlap, Andreas. smile It looks like you can get a free license for GermaNet if your project is affiliated with university research. I imagine the R&D license isn’t so expensive compared with the commercial one.

 

 
  [ # 6 ]

Hi C R,

you are right, OpenThesaurus could be helfful, too,
for example to “fill” synonyms into ChatScript,
so it could match not only “Hund” (dog),
but “Kläffer” (barker), too.

And speaking of GermaNet:
If someone started an university research
on ChatScript and GermaNet,
I would help as good as I can.

All the best
Andreas

 

 
  [ # 7 ]

a little off-topic, so please feel free to move if needed.

@Andres: Could you perhaps give a small example in German or Spanish where you can only differentiate if you know the intonation of the word/sentence? (I am supposed to know German, I had it in high-school for 2 years/1 hour. But somehow, that didn’t stick)

 

 
  [ # 8 ]
Jan Bogaerts - Jul 10, 2012:

a little off-topic, so please feel free to move if needed.

@Andres: Could you perhaps give a small example in German or Spanish where you can only differentiate if you know the intonation of the word/sentence? (I am supposed to know German, I had it in high-school for 2 years/1 hour. But somehow, that didn’t stick)

Here’s an example in German that messes with me (because I can’t hear the difference at all!): bruder/brüder = brother/brothers.

I think the biggest problem with German is that every word can end differently depending on what it’s modifying. There are special declensions for nominative, accusative, dative, and genetive forms as well as separate endings for adjectives depending on whether they’re modifying a masculine, feminine, or neuter noun. (I’m trying to learn German now and have sheets filled with tables of these animals.) And some nouns have more than one form depending if they’re behaving femininely or masculinely. grrr

The reason this is a problem is twofold:

1) WordNet (at least in English) doesn’t include tenses for verbs (which German has more of as well!) and certainly doesn’t include more than one form of each noun/adjective/adverb (not even plural forms). So all irregular forms have to be handled yourself, and

2) Word order in German sentences is often flipped around or otherwise mixed compared to English. Sometimes, the only way to tell just what the subject is—context free—is to recognize which gender the noun is and whether or not it is appearing as a nominative. (This can be a nightmare if you don’t know the word’s gender: the nominative masculine and dative feminine, for example, both use the article “der”. And although the dative form in English is almost always accompanied by a preposition, this is not the case in German. So no help there.)

All of this is why I wonder if learning German is a hopeless cause. Memorizing does little good: you’ve got to feel what sounds right to speak and think in the language. The only time I really can speak German in a fluent way is via word groupings that I know intuitively because I’ve heard them so many times. Makes me wonder if Link Grammars aren’t the most “human-like” way to develop parsers.

 

 
  [ # 9 ]

Ah wow a lot of answers and it seems i forgot to submit my answer to the first answer from bruce. So here my reaction to bruce, i will try to answer tp the other posts asap :-D


1. Ah okay i thought everything (excepting quoted strings) will be converted to upper or lower case so i always just used lower case. But as you said: “While input is case insensitive”. When the input is case insensitive, why does the input get converted to “Sarah”?

2. I will see whether i can transform and use the german wordnet data. Otherwise i probably have to keep it that way and just add a few german data on my own wink

3. I can solve many of my requests with a framework i guess. But external signals can be still a problem. Example:

Im going to integrate wake on lan in my bots. So on request i can tell them they shall start a specific pc at home for myself. This message could be created from a client pc which does not offer any server port. Well, my bot will start the wol-pc AND shall send me a message when the wol-pc has successfully started (let’s say that wol-pc sends a signal via network after startup). The client pc can’t receive this signal (so it will not get informed and can also not tell the client to send any message to the server). The server could receive the signal from the wol-pc, but the server can’t force the bot to send a message to the client pc…

Currently im not sure how to solve this. The only solution i know would be, that the client pc always sends a request to the server (on a specific port especially for those use-cases) and waits all the time for a signal. This is just one of many use-cases and you could be right, for simple chatbots which interact with lots of players keeping connections alive might be crazy.

 

 
  [ # 10 ]

@Andres Hohendahl:
Of course i wish you good luck! wink
For the most messengers (excepting skype) i currently use pidgin. Later i wanna try to write a plugin for pidgin that connects to the bot server. This should solve my problems with protocols a little bit.
Of course such a bot is a lot of work, a project for my life time! And as you said, those protocols and interfaces are problems, because they can change. Especially when im going to build parsers for some websites that dont offer API’s…
A friend of mine will probably help in that project (maybe some others, but they have no or less programming skills).
Atm he mainly wanna test the possibilities with kinect and also try out microsofts speech api.

@all:
Thanks for all that feedback! I will take a look at all these links soon (currently still busy with studying).
I have to agree, english is really a simple language, german is not that easy. I will try to make a german chatbot anyway, but i also doubt that i will get it done with dictionary/wordnet. I probably have to try to manually add important words, relations and forms, using concepts and try to compensate these things with good pattern.

UTF-8: Haven’t read the topic in detail yet, but i guess this can be also solved in a framework by substitutions like ü<->ue.

Im student at the Technische Universität Berlin. We have the DAI-Labor (http://www.dai-labor.de) and the Connected Living (http://www.connected-living.org) was initiated by them and others. My plans with the chatbot is currently a personal project, but i guess it should be an interesting topic for the dai-labor too. I wanna try to participate in some of their projects in future, but for the moment im just studying and working on my home projects.
But of course i could try to contact some of the prof’s which are included in these projects. Maybe they have some useful informations we could use. I also could ask them whether they are interested to start a similar project in future.

 

 
  [ # 11 ]

when I say: input is case insensitive, I mean that we cannot count on a user using correct case in their input. So chatscript has to decide what the REAL case of input words should have been. If a user SHOUTS IN ALL CAPS, the system does not require patterns be sensitive to this. If the user writes in all lower case, the system does not require patterns be sensitive to this.  If the user input has typos, the system’s patterns don’t have to account for typos.

The system converts all input it gets into an attempt at a standard input. Actually, it’s like the system generates two streams of input. What the user said in a standard way. And a canonical form of it (plural->singular, verb tense->infinitive, etc).

So a user types:  sarah ate the elephants   and the system “sees”

Sarah ate the elephants
Sarah eat a elephant

and matches THOSE against its patterns.  The crucial case sensitive part is the patterns themselves. The system “trusts” you mean what you say in a pattern.  If you say:
u: ( Sarah eats the elephants)

then THIS WILL NOT MATCH because no input stream had eats as a choice.

u: (sarah)
then this will not match because Sarah coming from the user ALWAYS converts to upper case Sarah.

 

 
  [ # 12 ]

My point on external signals is:


HOWEVER you would solve this NOT involving chatscript is how you can solve this using chatscript as an additional server.

You have a server of your own.  It can have a permanent socket between itself and some client machine. It can also receive requests and signals from various places.  Whenever some EVENT happens to it, it can send a message to chatscript server, get back an answer, and then pass that answer over to whererever.  ChatScript need not be aware of any of this per se.

 

 
  [ # 13 ]

Yep that’s probably the best solution for making a framework.

Is chatscript your personal project, are you usually working on it alone?! That was really awesome work. I had some of those ideas too (before i found this forum), but i guess i never would have created such a nice chatbot structure! :-D

 

 
  [ # 14 ]

Yes, it is my personal project. While the system is open source, ONLY I have authorization to alter the public release code.
People who discover bugs tell me about them and I verify and fix. Or people request features and I decide whether they make sense and how to do them.  People are free, of course, to modify their own copy in any way they want.

 

 
  [ # 15 ]

okay next problem =(

topic: ~CMD_CHANGE_BOT system repeat ()
tSARAH () ^sarah() $bot=Sarah ^reuse(CHANGE)
tDANIEL () ^daniel() $bot=Daniel ^reuse(CHANGE)
tCHANGE () Heywas kann ich für dich tun

I wanna change the bots on request and it successfully works. After asking for sarah, the function sarah() get called and i get the sarah-botprompt. But $bot has still the value “Daniel” and it seems i can’t change that (like tried in the code above).

By the way in stand alone mode im not able to change the bot via :bot NAME. Maybe there is a relation to my problem…

 

 1 2 > 
1 of 2
 
  login or register to react