dev@glassfish.java.net

Re: "Did you mean" in asadmin

From: Peter Williams <Pete.Williams_at_Sun.COM>
Date: Fri, 11 Aug 2006 12:26:40 -0700

I think you are correct about the suggestions and USCD Pascal -- that's
what I seem to recall as well. Then again, Pascal is a pretty easy
language for that feature.

Java would be somewhat harder.

Turbo Pascal, aka Delphi was always been quite good at repairing
scenarios that were treated as errors by other compilers. For example,
most if not all "missing semi-colon" cases are handled as warnings (so
the user can fix the code later) rather than errors -- the compiler just
adds the semicolon and keeps going.

More on topic, I'd suggest the people who might implement this do a
google search on "fuzzy pattern matching algorithms" and see if they
find anything useful. In about 15 seconds, I found this --
http://perlmonks.org/?node_id=413697 -- not quite on target, but a step
in the right direction.

-Peter


vince kraemer wrote:

> Craig,
>
> I remember encountering a compiler that suggested corrections. I
> forget whether the suggestions were interactive or not...
>
> I am thinking that it was the UCSD P-System compiler for Pascal?
>
> Do you remember something similar?
>
>
> vbk
>
> Craig L Russell wrote:
>
>> Hi Kohsuke,
>>
>> This is a great idea, perhaps you could blog about it?
>>
>> I think it applies to lots of different cases and needs wider
>> awareness. You didn't mention what package it was in. Could it return
>> a String[ ] of possible candidates ranked by nearness to the subject
>> String? Then you could offer the user a choice, e.g.
>>
>> "Your command "foo" was not recognized. Perhaps you meant 'go-foo',
>> 'foo-bar', or 'foo-lish'?"
>>
>> Sweet.
>>
>> Craig
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>