From: Sean Russell Date: 2001-05-20T00:26:37+09:00 Subject: [ruby-talk:15398] Re: UnMac On Sat, May 19, 2001 at 11:06:39PM +0900, Mike wrote: > > What I would like to do is to build a natural language interface. > [...] > Do you know Esperanto? I think it would be a nice interface language > between computers and humans. I don't know it well, I only read a few > documents about it. But its syntax seems very easy to interpret > (no exception, simple rules, simple grammar...), and can be used as a > > natural speaking language. Human *and* computer friendly. I've been thinking about this for a long while now. In fact, I have a rudimentary Esperanto parser, written in Ruby. It parses Esperanto into word structures. There is an interface that runs the resulting tree through a basic pseudo-english translator. You get something like this: ### Saluton! Mia nomo estas Sxan, kaj mi estas usonano. ( accusative salute noun ) ( I adj ) ( name noun ) ( is presVerb ) ( sxan ) , ( and ) ( I ) ( is presVerb ) ( US person noun ) Notice that the English translation is pretty minimal; I didn't write this as a translator, but rather as a tool to break a paragraph into the parts of speach. Therefore, you can see the parts of speech in the output. If someone wanted to write a translator, they'd have to build a dictionary that deconstructs English words into their component parts of speech: root part of speech word I adj my is present verb am Even this wouldn't work perfectly, because English is one of the most irrregular languages. There are some areas where the parser needs to be improved; for one thing, some compound words are ambiguous if you parse the word left-to-right, which is what EOParser does; it needs to process suffixes before it processes the rest of the word. This illustrates the difference between how humans think and how computers think. The human brain doesn't seem to have much trouble grabbing the whole word and figuring out suffixes, prefixes, and roots all at the same time. Anyway, it works well in most cases, considering that it is a 398 line program, written when I had a week of Ruby under my belt. (not including dictionary). My next step is to write a basic neural-net backend, so that the program can actually *do* something with the information. Then I'd like to tack on an IRC interface, and plug the thing into the #esperanto channel, and let it learn. By the way, you are right on about the ease of Esperanto. I learned it well enough to hold simple conversations in the #esperanto channel, and it took me about a week. It would also make a great voice recognition language, since everything is (supposed to be) pronounced exactly as it is spelled. The EO Parser isn't really ready for distribution, but since you've brought it up, I'll make it available at: http://www.germane-software.com/~ser/Software/EOParser.zip Let me know if anyone is interested in pursuing this with me. If you'd like to learn more about Esperanto, please contact me. There is usually quite a bit of traffic in the #esperanto chat rooms (try dal.net, undernet.org, or irc.net -- they're all linked together with via a robot), and there are more links to Esperanto information pages and pages in Esperanto than you'd care me to list here. --- SER