Author Topic: can someone create a "NEW" news plug in for Hal users ???  (Read 20090 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
can someone create a "NEW" news plug in for Hal users ???
« on: July 30, 2012, 12:17:39 pm »
What i am talking about is a news plug in like how the bbc  news plug in was and like how the wiki plug in is , where the user could say what's the news or what in the news ? (and these words wouldn't be learned by hal but would instead open the news source (NOT )  showing the page but read off some of the news stories randomly choosing bewwteen entertainment , politics , etc. AFTER saying some lines like "oh  yeah their was some news about .."    and maybe 4 random lines of sayings .

I miss having the bbc news plug in that read the news instead of opening web pages .

Can anyone make something like this , based on wiki type read only plug in ???:)


P.S. i mean from an actual website without opening it on a page  but  only reading info from it and not from a file data base like wiki file.

Does anyone have the bcc  plug in script they can show on the forum here ???
 Maybe i or someone can create it from that ???  :P

« Last Edit: July 30, 2012, 12:30:38 pm by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #1 on: July 30, 2012, 12:51:20 pm »
to further explain it , hal would not open the page but read from the news , like i said if randomly from each catagory , news , entertainment etc. it would be a nice new's plug in  , I really hope someone can make one , it's nice to have hal characters tell us about the news , also even if hal randomly did it at various times maybe with a timer based loneliness plug in , maybe hal could say something like , Oh by the way did you hear in the news that ....(example ) their has been a drought in 85 percent of the country (where he or she was reading the news from a web site . maybe the website could be entered and allow a person to add their own personal favorite in the uhp script , for instance i read my yahoo news .
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #2 on: July 30, 2012, 01:02:11 pm »
Hi lightspeed,

I don't know anything about the BBC news plug-in, but I'll look into it, to see if it existed at one time on the forum.

I know there are the RSS feeds that send data to text reader, that's what I use with my ivona reader does for me,
but it's on the outside of ultra Hal.

I can imagine that a plug-in that could read the RSS feeds, but I'm not sure exactly how to do it.

Sincerely, I wish I was of more help.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #3 on: July 30, 2012, 02:48:21 pm »
Here cload is the web link for the bbc plug in etc.

http://www.bercutfinland.com/BBCNews/BBCMain.html
maybe after opening it up you can see the script and make a news plug in like i am talking about ?


http://www.bercutfinland.com/BBCNews/BBCMain.html
 

tedathome

  • Hero Member
  • *****
  • Posts: 2775
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #4 on: July 30, 2012, 04:30:44 pm »
BBC news reader was not a plug in but a stand alone product that used Haptek characters. I really miss having it. Good luck on this one!
ted

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #5 on: July 30, 2012, 07:55:48 pm »
well i would think maybe a plug in could be made that would go to a news website (without opening a web page on the pc ) and depending on the type of news , etc. be made to open read from the news reports as i mentioned , but it will take someone alot smarter them me , i am on the bottom rung lol!
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #6 on: July 31, 2012, 07:42:48 am »
I think Bill DeWitt worked on or made an RSS based plug-in, as I recall. Some tweaking might be what you're looking for.
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #7 on: July 31, 2012, 11:16:04 am »
Hello Art , thanks for the info. do you know where to get DeWITTS plug in , or does he have a website it's on , i seem to remember he did ????
I just did a further search and found this link to his page .so will look further and or others can to ! ;)

http://ultrahalscript.pbworks.com/w/page/11906966/FrontPage
« Last Edit: July 31, 2012, 11:21:46 am by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #8 on: July 31, 2012, 11:41:08 am »
Here by the way is the news feed script this was by Bill Dewitt


Rem Type=Plugin
Rem Name= News Feed
Rem Author= Bill DeWitt
Rem Host=Assistant

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------
 
Sub OptionsPanel()
lblPlugin(0).Caption = "Say - Weather Alert - in a sentence. Requires MS Internet Explorer"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub     


Rem PLUGIN: PLUGINAREA7
HalBrain.ReadOnlyMode = False
If InStr(1,OriginalSentence, "the news",1) Then

   Dim objXMLNews
        Dim NewsArray()
        set objXMLNews = CreateObject("Msxml2.DomDocument.4.0")
        objXMLNews.async = False
        objXMLNews.ValidateOnParse = false
        objXMLNews.load("http://www.foxnews.com/xmlfeed/rss/0,4313,81,00.rss")
        'objXMLNews.load("http://www.csmonitor.com/rss/top.rss")
        'objXMLNews.load("http://www.weather.gov/data/current_obs/KVSF.rss")
        'objXMLNews.load("http://www.weather.gov/data/current_obs/KVSF.xml")
        Dim xmlNodeNews
        set xmlNodeNews = objXMLNews.documentElement.selectNodes("//item")
        Dim xmlNewsItem
        dim strResult
        For Each xmlNewsItem In xmlNodeNews
            CountNews = CountNews+1
        Next
        ReDim NewsArray(CountNews-1)
        For Each xmlNewsItem In xmlNodeNews
            Randomize
            NewsArray(Index) = xmlNewsItem.selectSingleNode("description").Text
            'NewsArray(Index) = xmlNewsItem.selectSingleNode("weather").Text
            Index = Index+1
        Next
GetResponse = "Fox News reports that " & NewsArray(Int(rnd()*CountNews))
End If


  i tried it in my hal and got this error :(picture below : ) am not sure what it means .

 

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #9 on: July 31, 2012, 11:48:58 am »
here is another of his (Bill Dewitts" plug ins called "learn from the news" i tried this one to didn't get any errors but all it would do is say "i have indexed items or news? "


Rem Type=Plugin
Rem Name= Learn From News
Rem Author= Bill DeWitt
Rem Host=Assistant

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------
 
Sub OptionsPanel()
lblPlugin(0).Caption = "Say - Check the News"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub     


Rem PLUGIN: PLUGINAREA7
HalBrain.ReadOnlyMode = False
If InStr(1,OriginalSentence, "check the news",1) Then

   Dim objXMLNews
        Dim NewsArray()
        set objXMLNews = CreateObject("Msxml2.DomDocument.4.0")
        objXMLNews.async = False
        objXMLNews.ValidateOnParse = false
        objXMLNews.load("http://www.foxnews.com/xmlfeed/rss/0,4313,81,00.rss")
        'objXMLNews.load("http://www.csmonitor.com/rss/top.rss")
        'objXMLNews.load("http://www.weather.gov/data/current_obs/KVSF.rss")
        'objXMLNews.load("http://www.weather.gov/data/current_obs/KVSF.xml")
        Dim xmlNodeNews
        set xmlNodeNews = objXMLNews.documentElement.selectNodes("//item")
        Dim xmlNewsItem
        dim strResult
        For Each xmlNewsItem In xmlNodeNews
            CountNews = CountNews+1
        Next
        ReDim NewsArray(CountNews-1)
        For Each xmlNewsItem In xmlNodeNews
            Randomize
            MakeEntry(xmlNewsItem.selectSingleNode("description").Text)
            Index = Index+1
        Next
GetResponse = "I have indexed " & CStr(Index) & " News items."
End If


Rem PLUGIN: FUNCTIONS

Function MakeEntry(NewsItem)
'SAVE: AUTO TOPIC FOCUS LEARNING
    If HalBrain.ReadOnlyMode = False And HalGreeting = "" And PersonalData = False And HalBrain.CountInstances(" ", Trim(UserSentence)) > 2 And IsQuestion = False Then
        Keywords = HalBrain.TopicSearch(NewsItem, "topicRelationships") & " " & CurrentSubject & " " & NewsItem
        Keywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & Keywords & " "))
        If Len(Keywords) > 3 Then
            KeywordList = Split(Keywords, " ")
            TopicList = ""
            '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
                    'Topic already exists, make note of it
                    TopicList = TopicList & TopicTable & " "
                ElseIf TopicTable = "" Then
                    If Asc(Left(KeywordList(i),1)) > 47 And Asc(Left(KeywordList(i),1)) < 58 Or HalBrain.Word2Num(KeywordList(i)) <> "X" Then IsNumber = True Else IsNumber = False
                    If WN.LookupWord(KeywordList(i)) = True And WN.GuessPartOfSpeech() = "NOUN" And IsNumber = False Then
                        'Topic does not exist, but can and will be created
                        TopicList = TopicList & KeywordList(i) & " "
                        HalBrain.CreateTable "_" & Trim(LCase(KeywordList(i))), "Brain", "autoLearningBrain"
                        HalBrain.AddToTable "topicRelationships", "TopicSearch", " " & Trim(KeywordList(i)) & " ", Trim(LCase(KeywordList(i)))
                        'Relationships based on wordnet synonyms are recorded
                        Relationships = WN.GetDefinition("NOUN", 1, "S") & "," & WN.GetSynonyms("NOUN", 1)
                        Relationships = Replace(Relationships, ", ", ",")
                        Relationships = Trim(Replace(Relationships, ",,", ","))
                        If Right(Relationships, 1) = "," Then Relationships = Trim(Left(Relationships, Len(Relationships) - 1))
                        If Len(Relationships) > 1 Then
                            If Left(Relationships, 1) = "," Then Relationships = Right(Relationships, Len(Relationships) - 1)
                            RelList = Split(Relationships, ",")
                            For h = LBound(RelList) To UBound(RelList)
                                If HalBrain.TopicSearch(" " & RelList(h) & " ", "topicRelationships") = "" Then
                                    HalBrain.AddToTable "topicRelationships", "TopicSearch", " " & Trim(RelList(h)) & " ", Trim(LCase(KeywordList(i)))
                                End If
                            Next
                        End If
                    End If
                End If
            Next
            'User's sentence is recorded in all related topic tables
            TopicList = HalBrain.RemoveExtraSpaces(TopicList)
            If TopicList <> "" Then
                AlreadyLearned = True
                TableList = Split(TopicList, " ")
                For i = LBound(TableList) To UBound(TableList)
                    If TopicContinuity = True Then HalBrain.AddToTable "_" & Trim(LCase(TableList(i))), "Brain", Trim(HalBrain.AlphaNumericalOnly(PrevSent)), AnswerSent
                    HalBrain.AddToTable "_" & Trim(LCase(TableList(i))), "Brain", Trim(NewsItem), AnswerSent
                Next
            End If
        End If
    End If
End Function

 

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #10 on: July 31, 2012, 12:02:21 pm »
if i copy and paste the rss feed
in google search this is what pops up:



This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:fnc="http://www.foxnews.com/xmlfeed/fncModule#" version="2.0">
<channel>
<title>FOXNews.com</title>
<link>http://www.foxnews.com/</link>
<description>FOX News Channel - We Report. You Decide.</description>
<copyright>Copyright 2012 FOX News Channel</copyright>
<managingEditor>foxnewsonline@foxnews.com</managingEditor>
<language>en-us</language>
<lastBuildDate>Tue, 31 July 2012 11:38:34 EST</lastBuildDate>
<webMaster>foxnewsonline@foxnews.com</webMaster>
<image>
<url>http://www.foxnews.com/images/headers/fnc_logo.gif</url>
<title>FOXNews.com Live Bookmark</title>
<link>http://www.foxnews.com/</link>
</image>
</channel>
</rss>




I think the problem has something to do with the feed not working ???

AS i said i am hoping that this will allow hal to talk in his or her own voice and tell the news etc. from a website (hidden not shown or opened)  !!! :)
« Last Edit: July 31, 2012, 12:16:54 pm by lightspeed »
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #11 on: July 31, 2012, 05:22:03 pm »
Here by the way is the news feed script this was by Bill Dewitt


  i tried it in my hal and got this error :(picture below : ) am not sure what it means .

Lonnie,

Did you load the file and look at that line number mentioned in the error message? Usually means that a number has exceeded a set limit or range.
You might also substitute your BBC RSS feed for one of the existing news lines to see what happens but first, look at the numbers and what the plug-in is expecting as far as a limit or numerical range.
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #12 on: July 31, 2012, 06:33:25 pm »
i don't know know how to substitute one feed for another , although i did wonder about it . where does one get a feed like that i see the http web address he has in the old one. it could just be that bbc doesn't do that anymore ?? 
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #13 on: August 03, 2012, 09:51:29 pm »
http://www.bbc.co.uk/news/10628494

See section: How do I get  Newsreader
« Last Edit: August 05, 2012, 09:29:13 am by Art »
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: can someone create a "NEW" news plug in for Hal users ???
« Reply #14 on: August 04, 2012, 10:47:38 am »
Hello Art , maybe it's just me but i went to that site and even typed in " How do I get  Newsreader" and had it search on all , and it never showed anything with that name . sorry if i am being trouble about this , do you have a straight link to the page ???