Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 752763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:49:09+00:00 2026-05-14T14:49:09+00:00

I am looking for a library or set of libraries that will help me

  • 0

I am looking for a library or set of libraries that will help me write a forgiving command interpreter.

A forgiving command interpreter would be a command interpreter which can deal with simple and even not so simple spelling and word order mistakes in the input.

My goal is to have an interpreter which would take the input (a command) from a user and then:

  1. execute the command, if it is correct.

  2. apply corrections to the command,
    until a correct command is generated
    and then present that command to the
    user to confirm whether it is ‘what
    the user meant’.

For example:

The GlassFish Server has a command-line administrative interface, named asadmin. It allows users to script interaction with the server and work with it interactively.

An asadmin command has a fairly rigid structure:

asadmin <asadmin options> <subcommand> <subcommand-options> <operand>

The asadmin command currently attempts to help users that misspell a command, like this:

vkraemer$ ../../GlassFish3.0.1.b12/glassfish/bin/asadmin creat-domain --user foobar --portbase 2600 fubar
Deprecated syntax, instead use:
asadmin --user foobar creat-domain [options] ...
Remote server does not listen for requests on [localhost:4848].
Is the server up?
Unable to get remote commands. 
Closest matching local command(s): 
    create-domain
Command creat-domain failed.

This is a pretty good catch. It is not as smart when it comes to misspelled options.

I would like to remove almost all the constraints on the input, to allow users to make multiple mistakes in a command, but still get to the point where they have a chance to execute a command.

Consider this example HCI:

vkraemer$ ../../GlassFish3.0.1.b12/glassfish/bin/asadmin create-domain foobar
Enter admin user name [Enter to accept default "admin" / no password]> 
Domain foobar already exists in /Users/vkraemer/GlassFish3.0.1.b12/glassfish/domains. Use a different domain name or the --domaindir option.
CLI130 Could not create domain, foobar
Command create-domain failed.
VBKMacBookPro:web-main vkraemer$ ../../GlassFish3.0.1.b12/glassfish/bin/asadmin create-domain foobar --domaindi /tmp/test
Enter admin user name [Enter to accept default "admin" / no password]> 
Command create-domain only accepts one operand
Usage: asadmin [asadmin-utility-options] create-domain
    [--adminport <adminport(default:4848)>]
    [--instanceport <instanceport(default:8080)>] [--portbase <portbase>]
    [--profile <profile>] [--template <template>] [--domaindir <domaindir>]
    [--savemasterpassword[=<savemasterpassword(default:false)>]]
    [--domainproperties <domainproperties>]
    [--keytooloptions <keytooloptions>]
    [--savelogin[=<savelogin(default:false)>]]
    [--checkports[=<checkports(default:true)>]]
    [--nopassword[=<nopassword(default:false)>]]
    [-?|--help[=<help(default:false)>]] domain_name
Command create-domain failed.

It would be nice to be able to allow the second command to complete successfully, even though the option –domaindir is spelled incorrectly and is in the ‘wrong place’ in the command.

For example the output of the second create-domain command might be

VBKMacBookPro:web-main vkraemer$ ../../GlassFish3.0.1.b12/glassfish/bin/asadmin create-domain foobar --domaindi /tmp/test
Enter admin user name [Enter to accept default "admin" / no password]> 
Did you mean "create-domain --domaindir /tmp/test foobar"? (yes)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:49:10+00:00Added an answer on May 14, 2026 at 2:49 pm

    Have a look at Peter Norvig’s How to Write a Spelling Corrector. His algorithm should help you catch simple typos.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a library that will allow me to look up the
I'm looking for a jquery/simple javascript (not some other library) solution that set an
I am looking for a library that would create a settings panel with configurable
I am looking for a library that can run on Java ME (Foundation Profile
I'm looking for javascript libraries that draw graphs using the Raphael library. Until now
I am looking for a library that can accept a chunk of audio data
I'm looking for a library that has functionality similar to Perl's WWW::Mechanize , but
I am looking for a C++ library set to develop my own C++ daemon
I'm looking for a library to find the integral of a given set of
What libraries do exist that implement strict data structures? Specifically, I am looking for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.