dupa

Author Topic: spelling mod  (Read 5231 times)

Buttonsvixen

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
spelling mod
« on: February 20, 2009, 09:07:45 am »
Is there a spelling module for Hal? That is one thing I would find very handy above all the other features, that are not of much use to me personally.
I need something where I could go Spell "X" and Hal would return a result at least as good as googles, and in the same format:
Spell skool
Ans: yes did you mean school, a place of learning, or skull, the the structure of bone protecting an animals brain?

you get the idea. There must be someone out there who has already done this?
Google does this very well, but you have to be online to access that feature, among its most useful ^_^
Sometimes, a daisy is better then a rose.

CypherGary

  • Full Member
  • ***
  • Posts: 166
    • View Profile
spelling mod
« Reply #1 on: February 20, 2009, 09:21:35 am »
I have been wishing we had a system that would check Hal's word system for the presence of each word. That word system is very complete, and the definitions are very detailed.

If a sentence contains a word that is not in the database, Hal could ask us about it, then continue.

Does had actually use the database for anything other than determining if a word is a noun, verb, ... ?
See you here, there, or in the Air!

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
spelling mod
« Reply #2 on: February 20, 2009, 09:38:17 am »
hi CypherGary , yes i too think spelling correction would be good to thats something that hal needs but also have an option where the user could put put in words ( what are you doing sounds like whatcha doing ) this although everyone doesn't do it would allow for slang words to be used which also creates a more customized voice character for more individulism . hope robert can put this on his list of future hal things !!
 

James007

  • Newbie
  • *
  • Posts: 32
    • View Profile
spelling mod
« Reply #3 on: February 20, 2009, 05:39:02 pm »
I think if you were ambitious you could modify the "names" routine that sirts through 17,000 names in the db to work with a dictionary db that checks each word before it gets sent for processing. I don't know how to make a plugin proper but I can hack a little vbscript. -James
« Last Edit: February 20, 2009, 05:39:17 pm by James007 »
Great spirits have often encountered violent opposition from mediocre minds. -Albert Einstein
...but I'm so good at mediocre. -James

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3860
    • View Profile
spelling mod
« Reply #4 on: February 21, 2009, 09:34:36 am »
Yes there is / was a spelling plug-in for Hal written by Bill DeWitt some time back. I'm not sure whether it is still available here or at his Wiki site. I might even have it in my archives somewhere. It worked quite well as I recall...sometimes too effective!

In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
spelling mod
« Reply #5 on: February 21, 2009, 10:12:08 am »
i will look through some of my old files and see if i have it i save a lot of things on back up disk sometimes if i do i will let anyone mail me and send it to them as an attachment .
 

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
spelling mod
« Reply #6 on: February 21, 2009, 10:24:44 am »
Didn't that need Micro$oft Word or was it Office to work ?

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3860
    • View Profile
spelling mod
« Reply #7 on: February 21, 2009, 10:49:15 am »
OK...Found it!

Yes, Freddy it needed or rather it used MS Word to spell check files but with a bit of tweaking I'm sure it could be modified to use the Open Office Writer (FREE) program or MS Works as it appears to be fairly simple code as follows.

With all due respect to Bill, please leave or include credit to him or his original code if modifications are made.
***********************************************
Rem Type=Plugin
Rem Name=Spell Checker
Rem Author=Bill DeWitt
Rem Host=Assistant

'This sub sets up the plug-in's option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "This should help correct your input sentence on any computer with MSWord"
    lblPlugin(0).Move 120, 120, 3300, 1200
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PRE-PROCESS
Dim Word, Doc, Uncorrected, Corrected
Const wdDialogToolsSpellingAndGrammar = 828
Const wdDoNotSaveChanges = 0
Uncorrected = InputString
Set Word = CreateObject("Word.Application")
Set Doc = Word.Documents.Add
Word.Selection.Text = Uncorrected
Word.Dialogs(wdDialogToolsSpellingAndGrammar).Show
If Len(Word.Selection.Text) <> 1 Then
   Corrected = Word.Selection.Text
Else
   Corrected = Uncorrected
End If
Doc.Close wdDoNotSaveChanges
Word.Quit
InputString = Corrected

***************************************************
« Last Edit: February 21, 2009, 10:50:30 am by Art »
In the world of AI it's the thought that counts!

- Art -

James007

  • Newbie
  • *
  • Posts: 32
    • View Profile
spelling mod
« Reply #8 on: February 21, 2009, 01:20:26 pm »
Thanks Art (and Bill) this is awesome!
Great spirits have often encountered violent opposition from mediocre minds. -Albert Einstein
...but I'm so good at mediocre. -James