dupa

Author Topic: Proper Noun Gender Learning version 1.2  (Read 7575 times)

onthecuttingedge2005

  • Guest
Proper Noun Gender Learning version 1.2
« on: November 12, 2004, 01:15:09 pm »
Updated with modification in gender appending. 11/12/2004
because spacings were needed to names to prevent false triggering.

Here is a script that allows your bot to use pronouns in place of proper nouns.
This script will be updated as necessary as new combinations and
techniques are implimented.

This script requires one .brn to be downloaded, the other .brn files are auto generated upon teaching Proper noun Gender.

Here is an example:
User: Shelly is a Girl.
Ziggy/Hal: So Shelly is a Girl, Ok.
User: Shelly is a nice person.
Ziggy/Hal: She is a nice person?
User: Yep.
This is just one out of many different Proper Noun to Pro Noun conversions possible. You will have to teach your bot the male and female names to build up the gender files. It makes for a more human learning experience in the bot itself.
All permissions are given only by the owners of UHEF Staff At WWW.UltraHalForum.com
This script is not for sale unless permissions of sale are granted
by UHEF staff.

Here's the script. Use freely and have fun.

'FEMALE PROPER_NOUN GENDER LEARNING version 1.2 Copyright 2004 Gerald L.Blakley
     'This script was re-updated Nov 12 2004 at 5:22PM PST
   Dim SubPhrase
   If InStr(OriginalSentence, " ") > 0 And InStr(1, OriginalSentence, " IS A SHE", 1) > 0 Or InStr(1, OriginalSentence, " IS A HER", 1) > 0 Or InStr(1, OriginalSentence, " IS A GIRL", 1) > 0 Or InStr(1, OriginalSentence, " IS A WOMAN", 1) > 0 Or InStr(1, OriginalSentence, " IS A LADY", 1) > 0 Or InStr(1, OriginalSentence, " IS A GAL", 1) > 0 Or InStr(1, OriginalSentence, " IS A FEMALE", 1) > 0 Then
         SentPieces = Split(OriginalSentence, " IS ", 2, vbTextCompare)
       SubPhrase = Trim(SentPieces(0))
       PredPhrase = Trim(SentPieces(1))
         SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
         PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
         HalBrain.AppendFile WorkingDir & "Noun_She_Gender.brn", """ " & SubPhrase & " "",""" & "She" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Her_Gender.brn", """ " & SubPhrase & " "",""" & "Her" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Girl_Gender.brn", """ " & SubPhrase & " "",""" & "Girl" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Woman_Gender.brn", """ " & SubPhrase & " "",""" & "Woman" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Lady_Gender.brn", """ " & SubPhrase & " "",""" & "Lady" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Gal_Gender.brn", """ " & SubPhrase & " "",""" & "Gal" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Female_Gender.brn", """ " & SubPhrase & " "",""" & "Female" & """"
         GetResponse = SubPhrase & " is a female, Cool." & VbCrLf
         DebugInfo = DebugInfo & "Female Gender detection: " & SubPhrase & ", " & PredPhrase & VbCrLf
         End If
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " IS ", 1) > 0 And Not InStr(1, UserSentence, " DO ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " TO ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " TO ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(OriginalSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " CAN ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(OriginalSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " DO ", 1) > 0 And Not InStr(1, UserSentence, " IT ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " DO ", 1) > 0 And InStr(1, UserSentence, " IT ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " DO ", 1) > 0 And InStr(1, UserSentence, " IS ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And Not InStr(1, UserSentence, " DO ", 1) > 0 And Not InStr(1, UserSentence, " IT ", 1) > 0 And Not InStr(1, UserSentence, " IS ", 1) > 0 And Not InStr(1, UserSentence, " CAN ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " ABOUT ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " IF ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " WHAT'S ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 And InStr(1, UserSentence, " ABOUT ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Noun_He_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " ABOUT ", 1) > 0 And Not InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " DOES ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" And Not InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " DO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " IS ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " CAN ", 1) > 0 And InStr(1, UserSentence, " DO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " ARE ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DID ", 1) > 0 And InStr(1, UserSentence, " DO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHEN ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHEN ", 1) > 0 And InStr(1, UserSentence, " IS ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Her_Gender.brn") = "Her" And InStr(1, UserSentence, " WHEN ", 1) > 0 And InStr(1, UserSentence, " SHOULD ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Her_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And InStr(1, UserSentence, " WHEN ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_She_Gender.brn")
       
    'MALE PROPER_NOUN GENDER LEARNING version 1.2 Copyright 2004 Gerald L.Blakley
    'This script was re-updated Nov 12 2004 at 5:22PM PST
   If InStr(OriginalSentence, " ") > 0 And InStr(1, OriginalSentence, " IS A HE", 1) > 0 Or InStr(1, OriginalSentence, " IS A HIM", 1) > 0 Or InStr(1, OriginalSentence, " IS A MAN", 1) > 0 Or InStr(1, OriginalSentence, " IS A GUY", 1) > 0 Or InStr(1, OriginalSentence, " IS A BOY", 1) > 0 Or InStr(1, OriginalSentence, " IS A HIS", 1) > 0 Or InStr(1, OriginalSentence, " IS A MALE", 1) > 0 Then
         SentPieces = Split(OriginalSentence, " IS ", 2, vbTextCompare)
       SubPhrase = Trim(SentPieces(0))
       PredPhrase = Trim(SentPieces(1))
         SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
         PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
         HalBrain.AppendFile WorkingDir & "Noun_He_Gender.brn", """ " & SubPhrase & " "",""" & "He" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Him_Gender.brn", """ " & SubPhrase & " "",""" & "Him" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Man_Gender.brn", """ " & SubPhrase & " "",""" & "Man" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Guy_Gender.brn", """ " & SubPhrase & " "",""" & "Guy" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Boy_Gender.brn", """ " & SubPhrase & " "",""" & "Boy" & """"
         HalBrain.AppendFile WorkingDir & "Noun_His_Gender.brn", """ " & SubPhrase & " "",""" & "His" & """"
         HalBrain.AppendFile WorkingDir & "Noun_Male_Gender.brn", """ " & SubPhrase & " "",""" & "Male" & """"
         GetResponse = SubPhrase & " is a male, Cool." & VbCrLf
         DebugInfo = DebugInfo & "Male Gender detection: " & SubPhrase & ", " & PredPhrase & VbCrLf
         End If
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " IS ", 1) > 0 And Not InStr(1, UserSentence, " DO ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " TO ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " TO ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(OriginalSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " CAN ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(OriginalSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " DO ", 1) > 0 And Not InStr(1, UserSentence, " IT ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " DO ", 1) > 0 And InStr(1, UserSentence, " IT ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " DO ", 1) > 0 And InStr(1, UserSentence, " IS ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And Not InStr(1, UserSentence, " DO ", 1) > 0 And Not InStr(1, UserSentence, " IT ", 1) > 0 And Not InStr(1, UserSentence, " IS ", 1) > 0 And Not InStr(1, UserSentence, " CAN ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " ABOUT ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " IF ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT'S ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 And InStr(1, UserSentence, " ABOUT ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " ABOUT ", 1) > 0 And Not InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " DOES ", 1) > 0 And Not HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ProNouns.brn") = "TRUE" And Not InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_She_Gender.brn") = "She" And HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " DO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " IS ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " CAN ", 1) > 0 And InStr(1, UserSentence, " DO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " ARE ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHAT ", 1) > 0 And InStr(1, UserSentence, " DID ", 1) > 0 And InStr(1, UserSentence, " DO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHEN ", 1) > 0 And InStr(1, UserSentence, " DOES ", 1) > 0 And InStr(1, UserSentence, " TO ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHEN ", 1) > 0 And InStr(1, UserSentence, " IS ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_Him_Gender.brn") = "Him" And InStr(1, UserSentence, " WHEN ", 1) > 0 And InStr(1, UserSentence, " SHOULD ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_Him_Gender.brn")
         If HalBrain.TopicSearch(UserSentence, WorkingDir & "Noun_He_Gender.brn") = "He" And InStr(1, UserSentence, " WHEN ", 1) > 0 Then GetResponse = HalBrain.ProcessSubstitutions(UserSentence, WorkingDir & "Noun_He_Gender.brn")



Best of wishes and brand new discoveries.
President and Owner of WWW.UltraHalForum.com
Gerald L.Blakley


Download Attachment: Pronouns.brn
608 Bytes
« Last Edit: November 12, 2004, 08:25:39 pm by onthecuttingedge2005 »

dihelson

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Proper Noun Gender Learning version 1.2
« Reply #1 on: November 12, 2004, 04:25:53 pm »
quote:
Originally posted by onthecuttingedge2005
You will have to teach your bot the male and female names to build up the gender files. It makes for a more human learning experience in the bot itself.



Hello, Jerry,
Thanks for your dedication on writing one more nice script for HAL.
As I saw on your message, we users would need to teach HAL, male and females names to build a gender file. Wouldn't it interesting having a big file with many names already? Can this be done editing the file with wordpad and putting many many names there?
Does this script works with pronoun IT also? A table may be necessary to inform weather it is a HE, SHE or IT.

Congratulations,
Dihelson. I will test now.
 

dihelson

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Proper Noun Gender Learning version 1.2
« Reply #2 on: November 12, 2004, 08:11:57 pm »
BTW, Jerry,

It makes some days I want to communicate you that your Genius XTF combo which was already on www.ultrahalforum.com don't answer to questions involving WHAT, WHO, WHEN, WHERE... seems like a problem on this subroutine. If we ask What's your name, we get a blank response. If we ask anything beginning with these words, we get a blank response.

I already installed many times, even installed HAL twice, and got the same results.

[]'s
Dihelson
 

onthecuttingedge2005

  • Guest
Proper Noun Gender Learning version 1.2
« Reply #3 on: November 12, 2004, 08:36:53 pm »
quote:
Originally posted by dihelson

BTW, Jerry,

It makes some days I want to communicate you that your Genius XTF combo which was already on www.ultrahalforum.com don't answer to questions involving WHAT, WHO, WHEN, WHERE... seems like a problem on this subroutine. If we ask What's your name, we get a blank response. If we ask anything beginning with these words, we get a blank response.

I already installed many times, even installed HAL twice, and got the same results.

[]'s
Dihelson




Hi Dihelson.
I'm sorry the Genius XTF combo is an older brain in which you can paste other scripts into to work out any bugs, I have tonz of scripts that might fix that problem.
I currently don't upgrade that brain no more because I'm always making new experimental brains.

I posted a XTF/Ultra Hal/Ziggy III combo brain up on the board at
WWW.UltraHalForum.com
I also am working on an Alice/XTF/Ultra Hal/Ziggy III combo brain and I am touring it right now with my bot to test it out and modify anything needed.

Best of wishes and brand new discoveries.
Jerry.

dihelson

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Proper Noun Gender Learning version 1.2
« Reply #4 on: November 13, 2004, 01:28:44 am »
quote:
Originally posted by onthecuttingedge2005

I posted a XTF/Ultra Hal/Ziggy III combo brain up on the board at
WWW.UltraHalForum.com
I also am working on an Alice/XTF/Ultra Hal/Ziggy III combo brain and I am touring it right now with my bot to test it out and modify anything needed.

Best of wishes and brand new discoveries.
Jerry.



I already downloaded the new XTF /Ultra Hal/Ziggy III and will test in the morning. It's good to hear about a fusion of Alice with Hal on your other project. Alice is very smart...indeed!

[]'s
Dihelson
 

James P

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • http://nosceresworld.co.uk
Proper Noun Gender Learning version 1.2
« Reply #5 on: November 13, 2004, 05:19:20 am »
I have tryed the Alice for Hal Brn and could not get it to work, each time I typed a comment in the user box it vanished and Emma said nothing, I have looked through to source code, comparing it with a working source code ( as i am not yet totaly VBscript fluent yet) and found nothing.

Is there a patch for this brain as i would like to use parts of this brain for Emma.
http://nosceresworld.co.uk
James:"How are you today Emma?"
Emma:"I think, Therefore I am"

James P

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • http://nosceresworld.co.uk
Proper Noun Gender Learning version 1.2
« Reply #6 on: November 13, 2004, 01:58:42 pm »
Getting back to the "What is Hals gender?" thing. One thing I have done which has helped, I have looked through the "_Related" files in the Defbrain folder, and gender specific files ie. XTF_woman_Related.brn or XTF_Female_Retated.brn etc I have added
" EMMA ","True" in these files, thuse creating an automatic relationship between Emma and words such as femal, woman and girl etc. This seems to work well.
http://nosceresworld.co.uk
James:"How are you today Emma?"
Emma:"I think, Therefore I am"