Author Topic: New Script: Brit to US and spelling correction.  (Read 4309 times)

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
New Script: Brit to US and spelling correction.
« on: November 11, 2003, 02:39:22 pm »
I let a British friend of mine talk to Hal for a while via keyboard. I realized quickly that Brit's (God bless them all) don't spell some words like Americans. Hal's responses, especially deductive reasoning responses, weren't as good as I hoped. So I set out to write some new script for preprocessing the user's input to convert British words to American. While I was at it I noticed some American words have multiple spellings and some words are frequently misspelled, (i.e., mispelled).

My new script corrects many of the above issues by converting Brit to US and standardizing the spelling of several American words. The script should correct about 80% of the most common word problems. Adding this script to the hal5.uhp file won't make Hal a genius, but it will give him an edge on improved responses. If this script is working you won't notice anything new, but some poor responses will be avoided.

Just download the files below and cut and paste the script between the "PROCESS: CONTROL TOPICFOCUS" and "PROCESS: PRESERVE ORIGINAL SENTENCE" functions near the top of the hal5.uhp file. Copy the new file, Xstandardizespelling.brn, to the DefBrain directory. Remember to always back up your original files before adding new script.

'==========================================
This script excerpt might give you idea of what words it corrects.
'
'The Xstandardizespelling.brn file format is:
' "WORD_TO_DETECT","WORD_TO_DETECT,REPLACEMENT_WORD"
'
'Examples:
' " AGEING"," AGEING, AGING"
' "AEROPLANE","AEROPLANE,AIRPLANE"
' "ALUMINIUM","ALUMINIUM,ALUMINUM"
' " AXE "," AXE , AX "
' "CATALOGUE","CATALOGUE,CATALOG"
' " CENTRE"," CENTRE, CENTER"
' "CIGARET ","CIGARET ,CIGARETTE "
' "CIGARETS ","CIGARETS ,CIGARETTES "
' " DISC "," DISC , DISK "
' " DISCS "," DISCS , DISKS "
'==========================================

Have fun and report back with comments; good or bad.

= vonsmith =


These files haven't changed since the original posting and are still the latest as of 11/17/03...

Download Attachment: Standardize_Word_Spellings_11-11-03b.txt
4.78 KB

Download Attachment: Xstandardizespelling.brn
5.22 KB
« Last Edit: November 17, 2003, 10:49:09 am by vonsmith »