image provider

Filename Spell Corrector


Disclaimer

This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.

Please do not email me about this project without reading the disclaimer above.

The Problem

I type hundreds of filenames and URLs (Uniform Resource Locators) each day, often correctly. If I get the name off by so much as a letter, the computer pretends it does not know what I am talking about. Common situations include:

Your Mission

Your job is to write a program that inserts itself any place the user types a filename and corrects it automatically. Further, it should be able to look for filenames in documents and bulk correct them using the same rules. If that proves too difficult, write an amanuensis that allows you to type in filenames. It validates and corrects them and then you paste them into whatever application wants the name. It can then do things like keep a stack of recent filnames and directories you can access with a click. Or you could feed it a file list to feed one at a time into some application.

Google has started doing something like this for URLs. If you mistype a domain or select one no longer functioning, it suggests a replacement. BrokenLinks detects URLs that are misspelled or no longer function. However, it is not clever enough to automatically insert replacements, except for redirects.

Implementation

To get decent response, you need a database of all directories and filenames in the system other than the purely hierarchical tree the OS (Operating System) maintains. This means monitoring the creation of new files and (perhaps lazily) detecting the deletion of others. You might tap into some database already doing this to implement a LOCATE command. Perhaps the JPSoft or Ubuntu LOCATE command database would give you access.

Part of the job would be to lobby OS makers to provide a simple, foolproof API (Application Programming Interface) to hook your code into. This would spawn a whole new genre of utilities.

Getting Fancy

You could type complex wildcards, both posititive and negative, including lists of directories and files and then pick from the files listed. You could define virtual directories that contained trees or combinations of other directrories, with an implied file filter. Eventually, this could evolve to something like DOS (Disk Operating System) Magellan that gave you searching by contents and instant file viewing of the first part of the file.

Explorer

This page is posted
on the web at:

http://mindprod.com/project/filespell.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\project\filespell.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.145.156.250]
You are visitor number