Random Sentence Generator

This is a discussion on Random Sentence Generator within the General AI Programming forums, part of the Cprogramming.com and AIHorizon.com's Artificial Intelligence Boards category; Hey guys! I am currently working on a random sentence generator that has possible applications for AI. I am trying ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Location
    Knoxville, Tennessee, United States
    Posts
    20

    Random Sentence Generator

    Hey guys! I am currently working on a random sentence generator that has possible applications for AI. I am trying to take a more natural approach to sentence generation than what we have seen in the past. I am storing vectors of nouns, verbs, articles, adjs, advs, and prephrases, and randomly selecting a word from each bank and piecing the parts together in a sentence using series of if statements to ensure that each sentence seems natural when it is outputted. I don't know if anyone here has experience with this type of programming, and if they would like to share their experiences with me.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    What you are looking for is called a "language model". If you choose which word to output with probability proportional to its frequency, this would be a simple "unigram model". If you output the next word with a conditional probability given the previous word this would be called a "bigram model". This can be naturally extended to "n-gram models".

    You can quite easily learn these models over samples of text.

    Language model - Wikipedia, the free encyclopedia

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seeding a Random Number Generator
    By girly_engineer in forum C++ Programming
    Replies: 6
    Last Post: 07-19-2010, 07:40 AM
  2. Random Poem Generator
    By ineedmunchies in forum C++ Programming
    Replies: 29
    Last Post: 03-26-2010, 09:31 AM
  3. NAQ: Everything you never wanted to know about CPP
    By evildave in forum C Programming
    Replies: 21
    Last Post: 12-12-2005, 09:56 AM
  4. random sentence generator
    By jsbeckton in forum C Programming
    Replies: 19
    Last Post: 10-14-2005, 04:23 PM
  5. Testing Random Number Generator
    By Roaring_Tiger in forum C Programming
    Replies: 7
    Last Post: 08-12-2005, 12:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21