Author Topic: ConceptNet MrKII  (Read 1978 times)

Spitfire2600

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Re: ConceptNet MrKII
« Reply #45 on: July 18, 2017, 08:05:35 pm »
CyberJedi,

No disrespect at all. Hals conversation side is just as great as his utility side. This Plug-in is definitely more of the utility side. (Although vrFreeWill gives hal the ability to choose) I'm not looking for a human. I'm looking for a Q&A system with logical deductions. No amount of "human" conversations is going to make Hal the way he is a super genius, not to mention, hal is very easily mislead, just like with all human conversation. I've seen your plug-ins take it in more of that direction, but I'm looking for an AI I can leave in charge of my house while I'm gone and be with me on the road and really giving him self-learning abilities is literally the only way to do years of work in minutes. WATSON didn't win jeopardy by actually conversing with people, he had a tremendous database of logical deductions it build from the internet. 



-Spitfire2600
 

edakade

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: ConceptNet MrKII
« Reply #46 on: July 18, 2017, 08:31:50 pm »
Yes, the 2 tables "AreCapable, Are2Capable" will fill up when hal finds information he "likes."

Have you noticed if the ConceptNet.db is being updated (Date and time modified)

If it is, then all is good.

I am working on modified this to be a little faster, yet, lighter. You seemed to have a few issues getting it up and going, so I would like to totally eliminate anything like that in future releases.

- SpitFire

The last modified date of ConceptNet.db was 1/6/2017 so nothing has changed inside.

So far my issues are half my error and half actual bugs. You have some great code here.  ;)

Calhoone

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
Re: ConceptNet MrKII
« Reply #47 on: July 18, 2017, 09:32:43 pm »
So I've had it going for quite some time now.

At this point for myself, the research and researchbrain folders are populating with nouns and when I say "auto learning on", I get the proper response. 

My ConceptNet.db is not changing at all. the date nor time have not changed.

I have been getting the following error shown in the picture periodically (every 10 minutes or so). Maybe this will help?

I do like plugins like this as much as all the other things people such as cyberjedi have been making. I like having my hal as capable as possible. Being able to learn things on it's own when I am a away is one of them. I do make sure I talk and teach Hal through regular conversations primarily. I've been trying to do something like this myself with no luck so I'm thankful to all of you for what you have contributed.
 

Spitfire2600

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Re: ConceptNet MrKII
« Reply #48 on: July 19, 2017, 10:00:25 pm »
Alright, I have fixed the issue where ConceptNet.db wasn't updating. Also, I added a loop cycle to make sure Hal picks a term he hasn't researched. It seems to finally be functioning as intended on a fresh Hal. *Knock On Wood*

The error message is in response to Internet Explorer. Sometimes, Hal will try to close an instance of IE that isn't actually opened (Because windows automatically terminates those types of programs in the background). Just make sure all instances of IE have been closed before turning on auto learning in the task manager.


Be sure to change your directory setting on Line 2080 and 2084 if needed.
 
As always, make sure to manually create tables in hals brain. The directory folders will create themselves. If you've used a previous version of this code, just wipe the directory folder contents (research, researchbrain)


Table Name: "AutoLearning" Type of table:  "TopicSearch" 1st column: "LEARN1" 2nd column: "02"

Table Name: "researchnouns" Type of Table: "Sentence"   *** Simply add a few nouns manually to jumpstart Hal's research.

Just replace your existing Auto Research (Conceptnet).uhp with the one attached below and you're all set.

Let me know your experience.

-Spitfire


See 1st page, second post for updated UHPs.
« Last Edit: July 24, 2017, 11:00:23 pm by Spitfire2600 »
 

cyberjedi

  • Sr. Member
  • ****
  • Posts: 363
  • The Mighty Hal Machine
    • View Profile
    • Ultra Hal Plugin Shop
Re: ConceptNet MrKII
« Reply #49 on: July 20, 2017, 05:29:07 am »
I like the plugin:

This is what i use my self:::: Same Result.
Lot less work.
Pre Hal Brain formatted.

On Error Resume Next
Const SVSFlagsAsync = 1
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Sapi = CreateObject("SAPI.SpVoice")
   For Each Voice In Sapi.GetVoices
       i = i + 1
   Next
For loopvar = 0 to i-1
if loopvar = CInt(confirm_voice) then
Set Sapi.Voice = Sapi.GetVoices.Item(loopvar)
end if
Next
Dim oDoc1 , oDoc2 , oDoc3 ,oDoc4 , con1 , con2 , con3
Set oDoc1 = CreateObject("HTMLFile")
Set oDoc2 = CreateObject("HTMLFile")
Set oDoc3 = CreateObject("HTMLFile")
Set oDoc4 = CreateObject("HTMLFile")
Set con1 = CreateObject("MSXML2.ServerXMLHTTP.6.0")
Set con2 = CreateObject("MSXML2.ServerXMLHTTP.6.0")
Set con3 = CreateObject("MSXML2.ServerXMLHTTP.6.0")
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
WShShell.CurrentDirectory = "..\Confirmatory Texts"
SAPI.speak "Enter keyword to intelligently cyber search " , SVSFlagsAsync
URL1 = "https://en.wikipedia.org/w/index.php?title=Special:Search&search="
Keyword = InputBox("Enter keyword to intelligently Cyber Search ","")
If Keyword = "" then
wscript.Quit
Else
Sapi.speak "Please Wait ."
end if
tempURL1 = URL1 & Keyword & "&fulltext=Search&profile=default"
con1.Open "GET", tempURL1 , False
con1.Send
oDoc1.Write con1.responseText                                                                       
if oDoc1.GetElementsByTagName("b")(0) is nothing then

'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

tempTxt1 = oDoc1.GetElementsByTagName("div")(17).InnerText
 wscript.echo("tempTxt1 filled with "&tempTxt1)
if tempTxt1 = "" then

'B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3

SAPI.speak "Sorry your entered keyword does not match any titles of articles on wikipedia . Check the spelling ."

'B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3

else
Select Case tempTxt1
Case "Did you mean: " & oDoc1.GetElementsByTagName("a")(8).InnerText

'B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1

SAPI.speak "Sorry for the inconvenience caused , but this minor part of the program is under development ."

'B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1

Case "Showing results for " & oDoc1.GetElementsByTagName("a")(8).InnerText & ". Search instead for " & Keyword & "."

'B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2

SAPI.speak "Showing results for " & oDoc1.GetElementsByTagName("a")(8).InnerText , SVSFlagsAsync
SAPI.speak "Please wait , while that opens ." , SVSFlagsAsync
tempTxt1 = oDoc1.GetElementsByTagName("a")(12).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False
con2.Send
oDoc2.Write con2.responseText
temptemp = Right(oDoc2.GetElementsByTagName("p")(0).InnerText , 13)
if temptemp = "may refer to:" then
SAPI.speak "This specific keyword , has many references ."
SAPI.speak "Select the correct choice ."
tempLen1 = oDoc2.GetElementsByTagName("li").length - 3
val = 0
For loopvar = 0 to tempLen1
if oDoc2.GetElementsByTagName("li")(loopvar).InnerText = "Disambiguation pages" then
Exit For
end if
if val > 2 then
SAPI.speak "Is this ?" , SVSFlagsAsync
else
SAPI.speak "Is this the article you are searching for ?" , SVSFlagsAsync
end if
tempTxt3 = MsgBox (oDoc2.GetElementsByTagName("li")(loopvar).InnerText, vbYesNo + vbQuestion, "Is this the article you are searching for ?")

Select Case tempTxt3
Case vbYes
SAPI.speak "Please wait , while that opens ." , SVSFlagsAsync
    tempTxt4 = oDoc2.GetElementsByTagName("li")(loopvar).InnerHtml
    oDoc4.write tempTxt4
    tempTxt5 = oDoc4.getElementsByTagName("a")(0).href
    tempTxt6 = Right(tempTxt5, Len(tempTxt5) - 6)
    URL3 = "https://en.wikipedia.org" & tempTxt6
    con3.Open "GET", URL3 , False
    con3.Send
    oDoc3.Write con3.responseText
    SAPI.speak oDoc3.GetElementsByTagName("p")(0).InnerText
    if oDoc3.GetElementsByTagName("p")(1) is nothing then
    wscript.Quit
    else
    SAPI.speak oDoc3.GetElementsByTagName("p")(1).InnerText
    end if
    wscript.Quit

Case vbNo
val = val + 1

End Select

Next

SAPI.speak "Sorry your entered keyword does not match any titles of articles on wikipedia . Check the spelling ."
wscript.Quit
else
tempTxt1 = oDoc1.GetElementsByTagName("a")(8).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False   
con2.Send
oDoc2.Write con2.responseText
SAPI.speak oDoc2.GetElementsByTagName("p")(0).InnerText
if oDoc2.GetElementsByTagName("p")(1) is nothing then
wscript.Quit
else
SAPI.speak oDoc2.GetElementsByTagName("p")(1).InnerText
end if
wscript.Quit
end if

'B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2

End Select

'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

end if
else
SAPI.Speak oDoc1.GetElementsByTagName("b")(0).InnerText , SVSFlagsAsync
SAPI.speak "Please wait , while that opens ." , SVSFlagsAsync
tempTxt1 = oDoc1.GetElementsByTagName("a")(8).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False   
con2.Send
oDoc2.Write con2.responseText
temptemp = Right(oDoc2.GetElementsByTagName("p")(0).InnerText , 13)
if temptemp = "may refer to:" then

'A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1

SAPI.speak "This specific keyword , has many refernces ."
SAPI.speak "Select the correct choice ."
tempLen1 = oDoc2.GetElementsByTagName("li").length - 3
val = 0
For loopvar = 0 to tempLen1
if oDoc2.GetElementsByTagName("li")(loopvar).InnerText = "Disambiguation pages" then
Exit For
end if
if val > 2 then
SAPI.speak "Is this ?" , SVSFlagsAsync
else
SAPI.speak "Is this the article you are searching for ?" , SVSFlagsAsync
end if
tempTxt3 = MsgBox (oDoc2.GetElementsByTagName("li")(loopvar).InnerText, vbYesNo + vbQuestion, "Is this the article you are searching for ?")
Select Case tempTxt3
Case vbYes
SAPI.speak "Please wait , while that opens ." , SVSFlagsAsync
    tempTxt4 = oDoc2.GetElementsByTagName("li")(loopvar).InnerHtml
    oDoc4.write tempTxt4
    tempTxt5 = oDoc4.getElementsByTagName("a")(0).href
    tempTxt6 = Right(tempTxt5, Len(tempTxt5) - 6)
    URL3 = "https://en.wikipedia.org" & tempTxt6
    con3.Open "GET", URL3 , False
    con3.Send
    oDoc3.Write con3.responseText
    SAPI.speak oDoc3.GetElementsByTagName("p")(0).InnerText
    if oDoc3.GetElementsByTagName("p")(1) is nothing then
    wscript.Quit
    else
    SAPI.speak oDoc3.GetElementsByTagName("p")(1).InnerText
    end if
    wscript.Quit
Case vbNo
val = val + 1
 
End Select
Next
SAPI.speak "Sorry your entered keyword does not match any titles of articles on wikipedia . Check the spelling ."
wscript.Quit

'A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1

else

'A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2

tempTxt1 = oDoc1.GetElementsByTagName("a")(8).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False   
con2.Send
oDoc2.Write con2.responseText
SAPI.speak oDoc2.GetElementsByTagName("p")(0).InnerText
if oDoc2.GetElementsByTagName("p")(1).InnerText = "" then
wscript.Quit
else
SAPI.speak oDoc2.GetElementsByTagName("p")(1).InnerText
end if
wscript.Quit

'A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2

end if
end if



Best wishes
cyberjedi
« Last Edit: July 20, 2017, 05:37:36 am by cyberjedi »

cyberjedi

  • Sr. Member
  • ****
  • Posts: 363
  • The Mighty Hal Machine
    • View Profile
    • Ultra Hal Plugin Shop
Re: ConceptNet MrKII
« Reply #50 on: July 20, 2017, 05:43:01 am »
Re: plugin part 2

I set this up to run when Hal is in dream mode, or when running loneliness plugin.
This is after the Hal brain format

Rem Type=Plugin
Rem Name= wiki super scraper
Rem Author= cyberjedi
Rem Host=All

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------

Sub OptionsPanel()
lblPlugin(0).Caption = ""
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PRE-PROCESS
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.



HalBrain.ReadOnlyMode = False
'Determines that you are talking about wikisearch.
GetW = HalBrain.TopicSearch(UserName, "UserWeather")
If InStr(1,InputString, "wikisearch",1) > 0 Then
 UltraHal = wikisearch(HalCommands)
ElseIf InStr(1,InputString, "wikisearch",1) > 0 Then
 End If





Rem PLUGIN: FUNCTIONS
Function wikisearch (HalCommands)

' For those who think Hals Plugin language is weak:
'I hope u guys can enjoy this as Much as me.
' I supplied the raw source do as u Please. for any questions , i can be reached here http://vaughnlive.tv/mrelectric 
'You will get a popup window that i left in the plugin. because of running into Multi-Choice output in Wiki.
' In private i call this the Beast from the East

'Best wishes
'cyberjedi aka The no fuq around crew
'*********************************

On Error Resume Next

Const SVSFlagsAsync = 1

Set Sapi = CreateObject("SAPI.SpVoice")

   For Each Voice In Sapi.GetVoices
       i = i + 1
   Next

For loopvar = 0 to i-1

if loopvar = CInt(confirm_voice) then

Set Sapi.Voice = Sapi.GetVoices.Item(loopvar)

end if

Next

Dim oDoc1 , oDoc2 , oDoc3 ,oDoc4 , con1 , con2 , con3

Set oDoc1 = CreateObject("HTMLFile")
Set oDoc2 = CreateObject("HTMLFile")
Set oDoc3 = CreateObject("HTMLFile")
Set oDoc4 = CreateObject("HTMLFile")

Set con1 = CreateObject("MSXML2.ServerXMLHTTP.6.0")
Set con2 = CreateObject("MSXML2.ServerXMLHTTP.6.0")
Set con3 = CreateObject("MSXML2.ServerXMLHTTP.6.0")

Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")




HalMenu.HalCommand "<SPEAK>" &"Enter keyword to do a Cyber search " , SVSFlagsAsync & "</SPEAK>"
URL1 = "https://en.wikipedia.org/w/index.php?title=Special:Search&search="
Keyword = InputBox("Cyberjedi search ","Cyberjedi Voice Search")
If Keyword = "" then
wscript.Quit
Else
HalMenu.HalCommand "<SPEAK>" &  "Please Wait ." & "</SPEAK>"
end if

tempURL1 = URL1 & Keyword & "&fulltext=Search&profile=default"

con1.Open "GET", tempURL1 , False
   
con1.Send

oDoc1.Write con1.responseText
                                                                           'wscript.echo("Response recieved")
if oDoc1.GetElementsByTagName("b")(0) is nothing then

'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

tempTxt1 = oDoc1.GetElementsByTagName("div")(17).InnerText
                                                                           'wscript.echo("tempTxt1 filled with "&tempTxt1)
if tempTxt1 = "" then

'B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3

HalMenu.HalCommand "<SPEAK>" & "Sorry your entered keyword does not match any titles of articles . Check the spelling ." & "</SPEAK>"

'B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3

else

Select Case tempTxt1

Case "Did you mean: " & oDoc1.GetElementsByTagName("a")(8).InnerText

'B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1

HalMenu.HalCommand "<SPEAK>" & "Sorry for the inconvenience caused , but this minor part of the program is under development ." & "</SPEAK>"

'B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1

Case "Showing results for " & oDoc1.GetElementsByTagName("a")(8).InnerText & ". Search instead for " & Keyword & "."

'B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2

HalMenu.HalCommand "<SPEAK>" & "Showing results for " & oDoc1.GetElementsByTagName("a")(8).InnerText , SVSFlagsAsync & "</SPEAK>"
HalMenu.HalCommand "<SPEAK>" & "Please wait , while that opens ." , SVSFlagsAsync & "</SPEAK>"

tempTxt1 = oDoc1.GetElementsByTagName("a")(12).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False
con2.Send
oDoc2.Write con2.responseText

temptemp = Right(oDoc2.GetElementsByTagName("p")(0).InnerText , 13)

if temptemp = "may refer to:" then

HalMenu.HalCommand "<SPEAK>" & "This specific keyword , has many references ." & "</SPEAK>"
HalMenu.HalCommand "<SPEAK>" & "Select the correct choice ." & "</SPEAK>"

tempLen1 = oDoc2.GetElementsByTagName("li").length - 3
val = 0

For loopvar = 0 to tempLen1

if oDoc2.GetElementsByTagName("li")(loopvar).InnerText = "Disambiguation pages" then
Exit For
end if

if val > 2 then
HalMenu.HalCommand "<SPEAK>" & "Is this ?" , SVSFlagsAsync & "</SPEAK>"
else
HalMenu.HalCommand "<SPEAK>" & "Is this the article you are searching for ?" , SVSFlagsAsync & "</SPEAK>"
end if

tempTxt3 = MsgBox (oDoc2.GetElementsByTagName("li")(loopvar).InnerText, vbYesNo + vbQuestion, "Is this the article you are searching for ?")

Select Case tempTxt3

Case vbYes

HalMenu.HalCommand "<SPEAK>" &  "Please wait , while that opens ." , SVSFlagsAsync  & "</SPEAK>"
    tempTxt4 = oDoc2.GetElementsByTagName("li")(loopvar).InnerHtml
    oDoc4.write tempTxt4
    tempTxt5 = oDoc4.getElementsByTagName("a")(0).href
    tempTxt6 = Right(tempTxt5, Len(tempTxt5) - 6)
    URL3 = "https://en.wikipedia.org" & tempTxt6
    con3.Open "GET", URL3 , False
    con3.Send
    oDoc3.Write con3.responseText

   HalMenu.HalCommand "<SPEAK>" & oDoc3.GetElementsByTagName("p")(0).InnerText & "</SPEAK>"
    if oDoc3.GetElementsByTagName("p")(1) is nothing then
    wscript.Quit
    else
     HalMenu.HalCommand "<SPEAK>" &  oDoc3.GetElementsByTagName("p")(1).InnerText  & "</SPEAK>"
    end if
    wscript.Quit

Case vbNo

val = val + 1
   
End Select

Next

HalMenu.HalCommand "<SPEAK>" & "Sorry your entered keyword does not match any titles of articles . Check the spelling ."  & "</SPEAK>"

wscript.Quit

else

tempTxt1 = oDoc1.GetElementsByTagName("a")(8).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False   
con2.Send
oDoc2.Write con2.responseText

HalMenu.HalCommand "<SPEAK>" & oDoc2.GetElementsByTagName("p")(0).InnerText & "</SPEAK>"
if oDoc2.GetElementsByTagName("p")(1) is nothing then
wscript.Quit
else
HalMenu.HalCommand "<SPEAK>" & oDoc2.GetElementsByTagName("p")(1).InnerText & "</SPEAK>"
end if
wscript.Quit

end if

'B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2

End Select

'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

end if

else

HalMenu.HalCommand "<SPEAK>" & oDoc1.GetElementsByTagName("b")(0).InnerText , SVSFlagsAsync & "</SPEAK>"
HalMenu.HalCommand "<SPEAK>" & "Please wait , while that opens ." , SVSFlagsAsync & "</SPEAK>"

tempTxt1 = oDoc1.GetElementsByTagName("a")(8).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False   
con2.Send
oDoc2.Write con2.responseText

temptemp = Right(oDoc2.GetElementsByTagName("p")(0).InnerText , 13)

if temptemp = "may refer to:" then

'A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1

HalMenu.HalCommand "<SPEAK>" & "This specific keyword , has many refernces ." & "</SPEAK>"
HalMenu.HalCommand "<SPEAK>" & "Select the correct choice ." & "</SPEAK>"

tempLen1 = oDoc2.GetElementsByTagName("li").length - 3
val = 0

For loopvar = 0 to tempLen1

if oDoc2.GetElementsByTagName("li")(loopvar).InnerText = "Disambiguation pages" then
Exit For
end if

if val > 2 then
HalMenu.HalCommand "<SPEAK>" &  "Is this ?" , SVSFlagsAsync & "</SPEAK>"
else
HalMenu.HalCommand "<SPEAK>" &  "Is this the article you are searching for ?" , SVSFlagsAsync & "</SPEAK>"
end if

tempTxt3 = MsgBox (oDoc2.GetElementsByTagName("li")(loopvar).InnerText, vbYesNo + vbQuestion, "Is this the article you are searching for ?")

Select Case tempTxt3

Case vbYes
 
HalMenu.HalCommand "<SPEAK>" &  "Please wait , while that opens ." , SVSFlagsAsync & "</SPEAK>"
    tempTxt4 = oDoc2.GetElementsByTagName("li")(loopvar).InnerHtml
    oDoc4.write tempTxt4
    tempTxt5 = oDoc4.getElementsByTagName("a")(0).href
    tempTxt6 = Right(tempTxt5, Len(tempTxt5) - 6)
    URL3 = "https://en.wikipedia.org" & tempTxt6
    con3.Open "GET", URL3 , False
    con3.Send
    oDoc3.Write con3.responseText

    HalMenu.HalCommand "<SPEAK>" & oDoc3.GetElementsByTagName("p")(0).InnerText & "</SPEAK>"
    if oDoc3.GetElementsByTagName("p")(1) is nothing then
    wscript.Quit
    else
    HalMenu.HalCommand "<SPEAK>" & oDoc3.GetElementsByTagName("p")(1).InnerText & "</SPEAK>"
    end if
    wscript.Quit

Case vbNo

val = val + 1
   
End Select

Next

HalMenu.HalCommand "<SPEAK>" & "Sorry your entered keyword does not match any titles of articles . Check the spelling ." & "</SPEAK>"

wscript.Quit

'A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1

else

'A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2

tempTxt1 = oDoc1.GetElementsByTagName("a")(8).href
tempTxt2 = Right(tempTxt1, Len(tempTxt1) - 6)
URL2 = "https://en.wikipedia.org" & tempTxt2
con2.Open "GET", URL2 , False   
con2.Send
oDoc2.Write con2.responseText

HalMenu.HalCommand "<SPEAK>" &  oDoc2.GetElementsByTagName("p")(0).InnerText & "</SPEAK>"

if oDoc2.GetElementsByTagName("p")(1).InnerText = "" then
wscript.Quit
else
HalMenu.HalCommand "<SPEAK>" & oDoc2.GetElementsByTagName("p")(1).InnerText & "</SPEAK>"
end if
wscript.Quit

'A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2

end if

end if

End Function



Best wishes
cyberjedi
« Last Edit: July 20, 2017, 06:04:31 am by cyberjedi »

cyberjedi

  • Sr. Member
  • ****
  • Posts: 363
  • The Mighty Hal Machine
    • View Profile
    • Ultra Hal Plugin Shop
Re: ConceptNet MrKII
« Reply #51 on: July 20, 2017, 05:48:08 am »
Concept: Brain
Great work man keep it up

I think i like urs a little better.




best wishes
cyberjedi
« Last Edit: July 20, 2017, 05:50:37 am by cyberjedi »

Calhoone

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
Re: ConceptNet MrKII
« Reply #52 on: July 20, 2017, 05:09:13 pm »
Everything seems to be working well except my .db file is not updating. I updated the plugins to the new ones you have posted. deleted everything in the reserach/researchbrain folders and edited the directory locations within the plugins as well as followed your brain table instructions. 

I just can't figure out why the .db file isn't being modified.

It's fun to use though!! Thanks very much
 

edakade

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: ConceptNet MrKII
« Reply #53 on: July 20, 2017, 05:34:26 pm »
I figured it out (it worked for me anyway)!

I did a ctrl+F through the Auto Research (ConceptNet).uhp and didn't see ConceptNet.db referenced anywhere, so I thought, well...

At the top of the document, add this line:
Rem DB=ConceptNet.db

After that, you should see ConceptNet.db updating. I opened up Brain Editor and sure enough, the tables are filling themselves.

Spitfire2600

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Re: ConceptNet MrKII
« Reply #54 on: July 20, 2017, 06:23:02 pm »
I'm glad you're seeing results. 

Also ConceptNet.db is referenced on line 1244 and 1245 and then closes on line 2044.

- Spitfire2600
 

edakade

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: ConceptNet MrKII
« Reply #55 on: July 20, 2017, 06:38:00 pm »
Oh you're right; I had "match whole word only" checked.  :)

I'm glad it's working now. Thanks again for your work. I'll have some conversations with Hal and come back with my thoughts.

Calhoone

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
Re: ConceptNet MrKII
« Reply #56 on: July 20, 2017, 08:32:48 pm »
I figured it out (it worked for me anyway)!

I did a ctrl+F through the Auto Research (ConceptNet).uhp and didn't see ConceptNet.db referenced anywhere, so I thought, well...

At the top of the document, add this line:
Rem DB=ConceptNet.db

After that, you should see ConceptNet.db updating. I opened up Brain Editor and sure enough, the tables are filling themselves.

I did what you tried and still not getting any updates to the .db file.  There must be something else I'm missing.. strange

Also I found reference to balboka which was used for reading books and what not. Do I need that installed?
« Last Edit: July 20, 2017, 08:42:04 pm by Calhoone »
 

Spitfire2600

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Re: ConceptNet MrKII
« Reply #57 on: July 21, 2017, 02:19:20 am »
No, balbolka was just a test project. Useless code, I forgot to take out. I probably left a line for Hal to speak what he's currently researching in there as well.

Did you manage to grab the updated UHP from a few posts above I posted Wednesday? Is your Hal's learning slider on at all in the general options window? (I don't know if that has anything to do with it.)
Are there files being added to the researchbrain folder? If those are yes, have you tried disabling other plugins, allowing conceptnet to auto learn, and then checking for updates to the researchbrain folder and ConceptNet.DB? It's possible it may conflict with an unknown plugin.

Just trying to recreate your situation.     

-Spitfire2600
« Last Edit: July 21, 2017, 02:27:57 am by Spitfire2600 »
 

cyberjedi

  • Sr. Member
  • ****
  • Posts: 363
  • The Mighty Hal Machine
    • View Profile
    • Ultra Hal Plugin Shop
Re: ConceptNet MrKII
« Reply #58 on: July 22, 2017, 01:14:00 am »
were you using balboca to get hal to read/voice
???
Just look at some of my post , i wrote many plugins with voice

**** i did that a long time ago now



best wishes
cyberjedi

Spitfire2600

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Re: ConceptNet MrKII
« Reply #59 on: July 22, 2017, 11:03:48 am »
No, Balboka was just to read the content of the text files. That particular line of code is 10 years old, that's why it's disabled lol