dupa

Author Topic: Capitalizing Proper Names  (Read 3071 times)

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Capitalizing Proper Names
« on: October 25, 2003, 10:51:38 pm »
Question:

How does Ultra Hal know how to capitalize the names of people and places?  He seems to get many of them right, but he doesn't capitalize some of the names that he has learned from me.  How can I get him to capitalize the words that I want him to?

Answer:

Hal has a special database that covers this issue (and performs some other functions).  It is called the "corrections.brn" database.

The full "file path" looks something like as follows:

C:/Program Files/Zabaware/Ultra Hal Assistant/DefBrain/corrections.brn

(We use "forward slashes" here because the forum software can't display "back slashes.")

Your file path may be different, but you should be able to find it with any word processor.

Look inside the brain and you will find entries such as the following:

" canadian "," Canadian "
" chinese "," Chinese "
" china "," China "
" columbian "," Columbian "
" columbia "," Columbia "
" english "," English "
" england "," England "
" french "," French "
" france "," France "

When UltraHal has selected a response for the user, he checks this database and will substitute any perfect character-matches he finds within quotation marks on the left, with the characters within quotation marks on the right (spaces are significant).

Any pairs that you add to this database will result in items on the left being replaced with items on the right in Ultra Hal's responses.

So, this is the place to add proper names of people and places that you always want capitalized.  Suppose we had a friend named "Francis" and Hal wasn't capitalizing the name in the response.  We can just insert a line into this database as follows:

" francis "," Francis "

And Hal will always capitalize Francis' name!

BE CAREFUL about using spaces; if you leave them out, Hal will consider a match even if it's in the middle of a longer word, and might put a capital letter in the middle of a word somewhere!

For instance, if we say this:

" bob "," Bob "

...we will only capitalize the name "Bob" but if we say this:

"bob","Bob"

...it will cause Hal to make strange capitalizations such as:

The carpenter found the level using a plumbBob and a string.
The sewing machine needed a new Bobbin.

You can also use this database to make global, permanent corrections to words that you have misspelled in Hal's database.  Suppose that you had incorrectly used a double "l" in "eliminate," spelling it as "elliminate" and now Hal has picked up on it.  

You could do a global permanent fix by doing the following:

" elliminate "," eliminate "

Now, suppose that you considered the term "blockhead" to be particularly offensive, and you would always like UltraHal to substitute the word "fool" instead.  You could write this:

" blockhead "," fool "

...and Hal would never say the word "blockhead" again!

Please note that this database does NOT change the contents of any of the other databases; the substitutions occur "live" on each exchange, before the output goes to the screen and the speakers.

Hopefully this feature will be useful to you!

Sincerely,

Don
« Last Edit: October 25, 2003, 10:56:47 pm by Don Ferguson »
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274