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.
 Download Attachment: Lexicon.zip1.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