Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: Alexia92 on January 23, 2010, 03:17:18 am
-
Hello,
As far I know, there is not Ultra-HAL in french. That's why since 2 weeks I am trying to rewrite the Brain of HAL (VBScript) and with a new SQLite Database.
The database has for the moment 1 table "LEXICON" with 2 fields "PHRASE" and "RESPONSE".
It will be very interresting to make first like this, because it is more easy for the french language, then of course, we will add more option in the code like it has for the english version.
(http://icon_paperclip.gif) Download Attachment: Lexicon.zip (http://"http://www.zabaware.com/forum/uploaded/Alexia92/201012331037_Lexicon.zip")
1.5 KB
For the VBScript, I tried to make like this:
When the user ask a question, HAL makes a query of this questions (with more loops) and show the result. Of course, it saves the questions and the answer in his DB for the next time.
I tried this code (from the original program):
Keywords = HalBrain.RemoveExtraSpaces(CurrentSubject & " " & MentionedName & " " & HalBrain.TopicSearch(UserSentence, "topicRelationships") & " " & HalBrain.ExtractKeywords(" " & HalBrain.AlphaNumericalOnly(UserSentence) & " "))
If Len(Keywords) > 2 Or Len(LastTopicList) > 2 Then
If Len(Keywords) > 2 Then
KeywordList = Split(Keywords, " ")
'Create list of tables that exist for each keyword
For i = LBound(KeywordList) To UBound(KeywordList)
TopicTable = HalBrain.TopicSearch(" " & KeywordList(i) & " ", "topicRelationships")
If TopicTable <> "" And InStr(1, " " & TopicList, " " & Trim(TopicTable) & " ", vbTextCompare) = 0 Then TopicList = TopicList & TopicTable & " "
Next
TopicList = HalBrain.RemoveExtraSpaces(TopicList)
End If
If TopicList <> "" Or Len(LastTopicList) > 2 Then
TableList = Split(Trim(TopicList & " " & LastTopicList), " ")
LastTopicList = TopicList
'Search through each table for a good response. If a response exceeds the hurdle
'for a table, no other table will be searched. Otherwise, the highest relevance
'response across all tables are stored for possible later use.
For i = LBound(TableList) To UBound(TableList)
UserBrainRel = 0
HalUserBrain = HalBrain.QABrain(LongUserSent, "_" & Trim(LCase(TableList(i))), UserBrainRel)
If HalBrain.CheckRepetition(HalUserBrain, UserSentence) = True Or HalBrain.CheckRepetition(HalUserBrain, PrevSent) = True Or HalBrain.CheckRepetition(HalUserBrain, PrevUserSent) = True Then UserBrainRel = 0
If UserBrainRel > HighestRel Then
HighestRel = UserBrainRel
HighestRelResponse = HalUserBrain
End If
Score = UserBrainRel + 1
Hurdle = GainControl + 1
If Score > Hurdle Then
GetResponse = GetResponse & HalUserBrain & "<NOMORE>" & vbCrLf
Exit For
End If
Next
End If
End If
HalBrain.DebugWatch GetResponse, "Auto Topic Focus"
But it doesn't work. May be can someone help me?
Thanks
Alexia
-
Hi and welcome Alexia!!
Sorry if I can't help you (I'm not really interested in Hal, I know, it's a shame), but I think trying to make a French version is a GREAT project. A never-ending task, not easy at all (but if it's easy, where is fun?). And I guess some people here will answer you that English and French languages are too different.
But if you need a beta tester, despite what I wrote above, you can count on me.[:)]
-
Hello GT40,
Thank you for your replie.
Yes, it can be a big project because french and english are very 2 differents languages (that's why I want only to test like I explained and make the rest step by step), but for the moment I only need to know how to connect the LEXICON DB and how to search in this DB (with query) to show the result.
That's why I posted a code and I thought it was may be the code where HAL search a response. So if someone can help me, it is will great.
Thanks
Alexia
-
Deafening silence...
-
I have been playing with Babylon and Xanadu but not just yet, a little more time please. I am not a god! sheesh, lol.
Jerry[:D]
-
Ma version 5. en francais tourne bien en modifiant un peut les codes.
Il ne manque que le Halbrain.dll pour le corriger et l'affaire est jouer.
-
My hal 5 french plugin worked fine... too. works on the Corrections function / process substitutions
-
Hello all.
I'm new to this forum, but know Ultra Hal for some time now, when i first tried the demo version. I was pleasantly surprised by the conversational capabilities of the program. BUT...what prevented me from buying Ultra Hal at the time was the fact that I do not want to communicate with in writing, but by the voice. Unfortunately when talking in English, my French accent is so bad That the recognition software can not understand a single word of what i'm saying [:I]
After all this time, I come of curiosity to see the project's progress, and falling on this subject I would like to ask ask if it would be possible to get help from those who managed to get Hal in French: Is a french brain of Hal is made available ? I do not found one unfortunately. It is clear that if i can get my Hal in French, I absolutely would reconsider its purchase, and buy it right now, but absolutely know nothing about doing it by myself.
To those who have accomplished this : Is your french version, or at least his basics is available somewhere, or will it remain a personal project?
Good luck.