Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Natural Language Sentence Production

by GrandFather (Saint)
on Sep 22, 2005 at 21:23 UTC ( [id://494306]=note: print w/replies, xml ) Need Help??


in reply to Natural Language Sentence Production

Haven't you just pretty much described the algorythm? Build tables of words for the various parts of speech, then use templates to select the table to use to select the word for each position in the sentence. If you want to get clever, allow the template to be defined recursively.

A Super Search may help. If you have absolutely no idea how to go about this, Re: Perl can do it, take 1 (sentence generation) may help.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: Natural Language Sentence Production
by japhy (Canon) on Sep 22, 2005 at 21:30 UTC
    Ah, that code is pretty much what I envisioned doing before I considered using a language parsing module. I guess I'll go that route.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://494306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-03-28 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found