Shop OBEX P1 Docs P2 Docs Learn Events
Lerner - Page 2 — Parallax Forums

Lerner

2»

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2011-06-20 14:15
    I've attached lerner006.zip below, and to the first post in this thread. This version allows for an adjective in the predicate so that more complex sentences can be handled. Lerner can now handle a sentence like "An apple is a red fruit" or "A hand has five fingers". The subject must still be a single noun, or a noun with an article.

    I improved the parsing of new words a bit so that Lerner will deduce the type of new words without asking what it is. I also added the ability to determine if a noun is singular or plural by looking for a single "s" character at the end of the word.

    I changed the "words" command to "vocab", and added an optional parameter. The table entry for a single word can be printed by typing "vocab word", such as "vocab tree" to see all the entries for "tree".

    If a word has the wrong type, it can be corrected by typing "word is a type", where "word" is the word to be corrected and type is "noun", "name", "verb" or "adjective". A "name" is a special case of a "noun", where it is not preceded by an article in a sentence.
  • SarielSariel Posts: 182
    edited 2011-06-21 04:09
    Wow.. this is impressive. I would love to tinker with this, interface it to a SpeakJet, and maybe add in some of the voice recognition work I have seen off and on. Could make for an interesting project. My son would have a blast.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-21 05:57
    Sariel wrote: »
    My son would have a blast.

    If you go this route, please share your results. Especially how you structure it as a "kid project", my kids tend to run when I talk techno.
  • Kirk FraserKirk Fraser Posts: 364
    edited 2011-06-21 07:00
    If you add a USB hard disk, you may be able to ramp up lerner's skills to compete for the yearly Loebner Prize.
    http://www.loebner.net/Prizef/loebner-prize.html

    I recall a similar learning program came with Turbo Prolog in the late 1980's. Now they're called chatbots.

    The trick needed for winning Loebner is to make it sound human which is more difficult than answering the question. Typically humans add information about the local environment which software wasn't trained on plus other nuances.
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-06-21 10:30
    At this point I'm just trying to fill the small brain (i.e. 32KB hub RAM) with as much smarts as possible. I'm currently using about 16KB for the program and 7KB for the vocabulary and sentences. As my experience with this type of thing grows the program should become smarter and grow as well. I would like to add voice output. I have looked at using Phil's voice synthesiser. I'm just not ready to spend the time to try to integrate it and tweak the output.

    In the next version, I plan on reformatting the way I save sentences so I can handle much larger expressions. I also want to expand the word searches so it looks in the predicate as well as the subject when asked about something.

    One thing I forgot to mention earlier was that I improved how Lerner handles the verbs is, are and am. Based on the subject, it now knows which form of the verb to use. I plan on implementing this for all verbs in one of the next updates.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-06-21 17:32
    Dave, these changes are significant and impressive. Lerner is fast becoming a leading program in the AI field. The Propeller community is very fortunate to have you here. As a request, please keep earlier versions from the first one to current date. These evolutionary step programs are amazing and should remain archived for various use and study.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-06-21 17:37
    I was thinking about what we could do to run Learner in multiple prop chips and how the learning could be combined or made unique. Any ideas?
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-06-22 05:13
    I haven't thought much about using multiple chips. It might be interesting to train two Lerners with different vocabularies and see what happens when they talk to each other. Eventually they should learn each others words and have the same vocabulary.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-06-22 07:20
    Dave Hein wrote: »
    I haven't thought much about using multiple chips. It might be interesting to train two Lerners with different vocabularies and see what happens when they talk to each other. Eventually they should learn each others words and have the same vocabulary.
    Good idea. I can see ten props all learning independently and then sharing what is learned with other props. Props teaching Props. So the Lerner becomes the Teecher. I think this would be a profound "first."
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-03-12 20:39
    I made a small change to Lerner to add a second serial port to ouput to a speach chip. This was requested by someone in a PM, but I couldn't figure out how to attach the file to a PM, so I am attaching them here.
  • HumanoidoHumanoido Posts: 5,770
    edited 2012-03-12 22:38
    It sounds very useful for speech output.
    Does it require a special speech chip?
    The Propeller can also do speech.
    Can you give some background on setting up the new Lerner version and using it?
    Thanks Dave, I think this is a big evolution for Learner.
  • SarielSariel Posts: 182
    edited 2012-03-13 04:16
    Hey guys!

    The combo I am using is the TTS256 to SpeakJet, and like I was telling Dave, it works pretty good, except some words are tough to understand because of the limitations of the TTS256. It is still a really good co-processor, but it needs a bit of nudging on some words.
  • SarielSariel Posts: 182
    edited 2012-03-13 05:20
    Can you give some background on setting up the new Lerner version and using it?

    From what I can see, to output to another serial port connected to the TTS256 in my case, just modify the Rx and Tx pins in lerner.main:
    speak := c.openserial(16, 16, 0, 9600, 64, 64)
    

    and according to the openserial method, the format is:
    openserial(rxpin, txpin, mode, baudrate, rxsize, txsize)
    

    The TTS256 runs at 9600 baud, so this setting is already correct. Other than that, it appears to run just like before. type into the PST, and it outputs to there as well as sending the text strings out the secondary serial port.
Sign In or Register to comment.