Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: natural language sentence construction

by dimmesdale (Friar)
on Jun 17, 2001 at 20:10 UTC ( #89175=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $i (0..$#$types) {
        if ($i && $i == $#$types) {
    ...
        } elsif ($i) {
                    $sentence .= ', ';
                }
    
  2. or download this
    for(@$types) {
        if($_ eq $types->[-1]) {
            $sentence .= $matches>1 ? ' and ' : ' or '
        } else { $sentence .= ', ' }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-08-21 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls