When trying to enter a user name (‘my name is Carlos’), Chatscript returns “unknown-word” instead (‘your name is unknown-word’) . Code below works fine for names that are common. Only Basic & English dicts used for build using default “harry” files.
# test topic for getting and or returning user name
TOPIC: ~name repeat keep ()
#!what is your name?
t: Tell me now, what is your name?
^repeat()
a: ( My name is _*1 _*1 >)
$firstname = _0
$lastname = _1
So formal! Nice to meet you $firstname $lastname.
a: ( My name is _*1 >)
$firstname = _0
First name basis! Nice to meet you $firstname.
a: ( _*1 >)
$firstname = _0
First name basis! So nice to meet you $firstname.
u: ( what [my] name)
^repeat()
I do not yet know your name!
u: ( what is my name ($firstname) )
^repeat()
One match- Your name is $firstname.
u: ( what is my name ($firstname && $lastname))
^repeat()
Two matches- Your name is $firstname $lastname.
debug from :prepare carlos
‘...Original User Input: carlos Tokenized into: Carlos Actual used input: carlos Xref: 1:carlos 1:carlos badparse Tagged POS 1 words: carlos/unknown-word…’
so it seems that the POS tagging is returning the ‘unknown-word’. Is they an easy way to catch/fix this type of parsing error?
-cb