[Gllug] Perl, the dogs nadgers?

Nix nix at esperi.demon.co.uk
Sun Jul 15 23:20:33 UTC 2001


On Sun, 15 Jul 2001, David Freeman gibbered:
>  --- Nix <nix at esperi.demon.co.uk> wrote: > On Sun, 15 Jul 2001, David
> Freeman yowled:
>> >  --- Dean S Wilson <dean.wilson3 at virgin.net> wrote:
>> > ----- Original Message -----
>> >> PS Just to avoid the whole English as a coding language stuff:
>> >> Time flies like a arrow.
>> >> Fruit flies like a banana.
>> 
>> Yes, that's called `ambiguity'. English is full of it, and there's
>> nothing at all stopping programming languages from using it too.
> 
> I think not, I think the ' comes in here some where, but I never paid
> attanetion in english so I can't say where.

No, neither of them need it (although the first needs `an', not
`a'). The parse trees are:

  S
  |
  |----|
  |    |----|
  |    |    |---|
  |    |    |   |---|
Time flies like an arrow

  S
  |
  |----------|
  |---|      |---|
  |   |      |   |---|
Fruit flies like a banana

(apologies for really crappy ASCII art; I've taken considerable
liberties with the standard representation as used in the natural
language parsing field to allow for the restrictions of ASCII, but I
don't think I've been very successful. I was going to label the
syntactic constituents until I realized that it meant completely
redrawing the bloody trees...)

Note the different location of `flies' in the tree, in particular. In
the first sentence, it's a noun; in the second, a verb. No apostrophes
are necessary.

>> (In general, they don't, because parsers that can handle
>> context-sensitive grammars are a total nightmare to write. I've
>> written
>> one that does part of the job for the specific case of a very limited
>> subset of English, and it was horrible to do.)
> 
> very true, hence speach recognition for control being crap.

No, the problem there is that phoneme recognition and assembly into
words is horribly hard. You can't even tell what separates words without
massive amounts of training, and many languages fuse different phonemes
into one, and which is fused is different for different
languages... it's a total bastard. The only way we know of to get it all
done right involves a bunch of massive neural networks, trimmed in their
first year of life to be correct for *one* type of language. (This is of
course part of the human brain, and we can't make the appropriate
networks in any other way yet, nor do we know quite what bits of the
brain are relevant ;) )

>> > Time is an object which has the property of fly which is being
>> > inherited from the object arrow so they both operate in a similiar
>> > manner.
>> 
>> Really? So `time' isa arrow?
> 
> no, it merely gets the proerty flies from arrow, where arrow gets it is
> irrelivent.

Please restate your sentence, then. *What* `is being inherited from the
object arrow'?

I think that any attempt to rephrase English grammar in terms of objects
is fundamentally misguided; it's hard enough to represent it as a parse
tree, because not even that is expressive enough. English sentence
constituents aren't objects exchanging messages, Smalltalk's engaging
metaphors notwithstanding :)

>                                                      Flies, which I
> think is an adjective, but my knowledge of english is crap so may be
> wrong.

Yep, one is a verb (`to fly') and the other a plural noun (`a fly').

>        Like I say above I think that the sentences are syntatically
> wrong and need a '.

I'd be interested to see where you think it should go; I'm trying to
work out what's happening to the apostrophe these days. (Certainly its
four centuries in the limelight, indicating possession and contraction,
are gone, killed by the humble pronoun; but what is it turning into? A
general indicator of plurality?

Of course, this question cannot be answered without the ability to
foretell the future. This is what makes speculating on it such fun...)

>> If you're saying that the property is inherited, then you're saying
>> that
>> all things that fly are arrows. Er, no.
> 
> No, I am saying that the property flies is common to both arrow and
> time. I am not saying they are the same. Perhaps the term inherits is
> wrong but you get the idea

Ah, right. The `inherits' made me think you were treating this as an OO
thing. If not, then I've totally misinterpreted what you're talking
about.

Is what you're trying to say `it is possible to say that both time and
arrows fly'? If so, yes. The point of those sentences is, as Dean
implied, to illustrate ambiguity; both sentences are ambiguous in and of
themselves, because you can arrange for each to be parsed in the way
that is normal for the other one:

`Time flies like an arrow' can be parsed in the same way as the
conventional parsing of `fruit flies like a banana' by transforming
`time flies' into a noun, implying that the `time fly' (presumably an
insect with a really short lifespan) liked bananas.

`Fruit flies like a banana' can be parsed in the same way as the
conventional parsing of `time flies like an arrow' by transforming
`flies' into a verb, whereupon the sentence becomes a commentary on the
aerodynamic properties of fruit.

> Again this shows a down side of english.

Yep; ambiguity leads to error.

[Marching band starts playing `We should all write our programs in Z and
 B'. The army of the Sanity Commission proceeds to annihilate the band.]

-- 
`I'm not sure whether libtool is an existence proof that you _can_
 write a shell script that handles its arguments correctly, or a
 demonstration that you may try but you are doomed to failure.'
                                                       -- Zack Weinberg


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list