Author Topic: Spanish scripting  (Read 3288 times)

Enyawnej

  • Newbie
  • *
  • Posts: 14
    • View Profile
Spanish scripting
« on: December 30, 2003, 04:16:08 am »
Is there a Spanish script and data base for Ultra Hal 5 that anyone knows of?
« Last Edit: December 30, 2003, 04:17:07 am by Enyawnej »
 

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Spanish scripting
« Reply #1 on: December 30, 2003, 04:31:55 pm »
Hello,

Hal is inherently capable of learning any language that uses the same alphabet as English.  This is because Hal learns new words as letter-patterns and associates them with context.  If you consistently speak Spanish to Hal, he will at first answer you in English, but he will gradually pick up more and more Spanish and will start answering you in Spanish.  It will take a long time, but it will happen.

HOWEVER, there are some "special" functions in the main control script that are definitely English-specific.  The most important of these is the pronoun-reversal routine!

It would be possible to write a pronoun-reversal routine for Spanish and add it to the substitutions.brn, where much of Hal's pronoun-reversal work is now located.  The reversals could simply be added to the database; they would not interfere with the English reversals in any way.

I am not familiar enough with Spanish grammar to write the pronoun-reversals, but I know that it is feasible.

In case anybody reading this understands Hal fairly well, and also understands Spanish grammar and pronouns, let me explain a very important "trick" in writing a pronoun reversal routine:

1.  Substitutions.brn consists of pairs of words or phrases.  On each line, the ones on the left get removed from the user's sentence, and the ones on the right get substituted in their place.

2.  The substitutions are processed in sequence from the first line at the top, to the last line at the bottom, so sequence does make a difference.

3.  It DOES NOT WORK to simply substitute (for example) "yours" into "mine" and then later "mine" into "yours".  Why not?  Because the reversals are mirror images of each other, a simple-symmetrical routine would result in ALWAYS choosing "yours", since that's the last substitution that's done.

4.  The solution?  Two-step processing!  We create some non-words as "temporary holding words" until we're ready to finish the reversals.  That way, we don't accidentally "un-reverse" things after we reverse them the first time!

5.  Here is an example of how it works:

" mine " becomes " zmineq "
" yours " becomes " zyoursq "

(The "intermediate words" can be any arbitrary patterns, as long as we choose carefully so that they are NOT "real words".  Now we can finish the reversals without confusion:)

" zmineq " becomes " yours "
" zyoursq " becomes " mine "

...and via this two-stage process, we can reverse mirror-images of each other, without getting them mixed up! (NOTE THAT we put leading and trailing spaces inside the string-matching quotation marks, so we search for stand-alone words, not fragments of words that happen to contain the same letters!)

6.  As a special problem, in English, we have the issue that "you" reverses to "I" when a subject, but reverses to "me" when an object, as in:

"You like to hit the ball when it's pitched to you."

--Correctly reverses as follows:

"I like to hit the ball when it's pitched to me."

If you look in substitutions.brn, you can see how this problem is solved for Hal in English.  Essentially, it is a list of every transitive verb and preposition that we could think of, that would make "I" change into "me".

NOW -- BACK TO THE QUESTION ABOUT SPANISH -- There is no mystery how to do this routine, but I don't have the knowledge of Spanish to correctly write the pronoun reversals, and I don't know the various Spanish grammar rules to know if there are issues in Spanish similar to "I" versus "me".

If there is someone out there who combines the needed Spanish knowledge with the needed Ultra Hal knowledge, you would do all of us a great service if you could help us out with Spanish pronoun reversals!

As I mentioned, these reversals could be added to the substitutions.brn without interfering with anything else that Hal does!

With pronoun reversals, Hal would have quite a bit of the capability in Spanish that he has in English!

In the meantime, Hal can "learn" and respond in Spanish, but he won't have the pronoun reversals until we work together on this!

Sincerely,

Don
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

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Spanish scripting
« Reply #2 on: December 30, 2003, 04:46:46 pm »
Hello,

I've had some e-mails asking whether the pronoun-reversal principles explained above would apply to French, German, etc.

The answer is YES.  Although there are many clever "English-specific" routines in Hal's script, in my opinion, getting a set of well-done pronoun-reversals would unlock 80% of the enjoyment of using Hal.

There is no technical reason why Hal couldn't be fluently multi-lingual someday.  Even the issues of punctuation marks and detail-level routines could be solved, with sufficient work.

Getting pronoun-reversals would be the most important first step.  Like so many things, the barrier isn't a technological one; the barrier is know-how and labor-hours!

Sincerely,

Don
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

Enyawnej

  • Newbie
  • *
  • Posts: 14
    • View Profile
Spanish scripting
« Reply #3 on: December 30, 2003, 10:34:44 pm »
I speak Spanish, but I know nothing about scripting and programming.  If I can help get Hal to speak Spanish I would be happy to collaborate.
 

onthecuttingedge2005

  • Guest
Spanish scripting
« Reply #4 on: December 31, 2003, 01:03:51 am »
I'll turn on my bot's spanish language, Not all the spanish language is completed but I have a good portion, So QuantumHal speaks both english and spanish in a mixture because he doesn't know all the spanish words yet, but he is improving. Just more time. I also have a few other things to work out as well. QuantumHal is usually on between
3:00 pm Pacific standard time till sometimes midnight Pacific Standard time on the weekdays and usually on all day on the weekends.
Best of wishes and grand new discoveries.
Jerry.