[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sorting Algorythms
<gids.rs@sasktel.net> wrote:
> What I would like to know is there any programs out there other than the
> usual talked about ones or one they may have created themselves?
http://www.filegate.net/pdn/pdncee/Metasim.zip
MetaSim(C) Version 1.2
(C) CopyLeft 2000 Bill Buckels 2000.
All Rights Reversed.
Metaphone Algorithm Created by Lawrence Philips.
Converted to C by Michael J. Kuhn.
Lawrence Philips' Metaphone Algorithm (used by MetaSim) is an algorithm
which returns the rough approximation of how an English word sounds.
Filter to host Metaphone Algorithm by Bill Buckels
Similarity Sort Key Creation Algorithm by Bill Buckels
Introduction
------------
MetaSim is a sort filter which attempts to group phrases of a similar nature
together. Since it is a commandline utility, MetaSim users are assumed to be
fairly "Dos Savvy", and should know about filters and redirecting to files,
and things of that nature.
Typical uses for MetaSim may include grouping of similar phrases (like
taglines) together in a "topical" way. Since MetaSim offers 4 variations for
this grouping and a configurable sort adjustment by means of an external
dictionary file, it may work better than a conventional sort if similarity
and "sound-alike" is more important than alphabetical order.
Summary
-------
Purpose:
Metaphone Filter with Similarity Sort
Input from stdin, stream, file, or command line.
Output to stdout, stream, file.
Usage(s):
metasim
metasim [infile.lst]
metasim [infile.lst] [outfile.lst]
metasim [phrase1] [phrase2] [phrase3] ...
metasim < [infile.lst]
type [infile.lst] | metasim > [outfile.lst]
Switches:
metasim -rsvd [infile.lst] ...
r - reverse equivalent comparison rather than natural.
s - sort internally and trim key from output.
v - verbose sort key rather than Metaphone key.
d - debug output (use internal sort but don't strip keys).
Note: Add the -ds switch when you want to see the RAW key that was used for
the internal sort that you have chosen. Possible combinations of switches
for this purpose are:
-ds
-drs
-drsv
-dsv
Internal Sort
-------------
The Internal Sort will handle files up to about 2900 lines. Don't sort on a
floppy since an external temporary sort file approx the same size as the
original input is created during operation.
Program Details
---------------
Description
-----------
METASIM is a Filter-program for MS-DOS to host Similarity Sort Key Creation
With or Without the Metaphone Algorithm.
A Similarity Sort Key is Created With Metaphone Switch Setting "None" (this
is the default) or *optionally* A Similarity Sort Key is Created Without
Metaphone, Switch Setting -v (Verbatim).
Also *optionally* An Unordered Similarity Sort Key Is Created Switch Setting
"None" (this is the default) or *optionally* An Ordered Similarity Sort Key
is Created for reverse equivalent for phrase comparison Switch Setting -r
(Reverse).
Also *optionally* The Sort Key Precedes The Output so an External Sort Can
Be Used... Switch Setting "None" (this is the default) or *optionally* Sorts
Short Lists (approx. 2900 entries), using an Internal Sorting Algorithm
without the need for an external sort, and without the need for external
cleanup (lchop). Switch Setting -s (Sort)
Input from stdout, stream, file, or command line, or redirect from file.
Output to stdout, stream, file, or pipe through other filters, or redirect
to file.
Based On Metaphone Algorithm Created by Lawrence Philips. Metaphone
presented in article in "Computer Language" December 1990.
Converted from Pick BASIC, as demonstrated in article, to C by Michael J.
Kuhn (Baltimore, Maryland)
Massage for Similiarity Sort added by Bill Buckels.
History
-------
Date Written July 2000
Revision 1.1 First Release
Basic Version To the Fidonet C_ECHO
- Metaphone Sort Key Only
- Reverse Equivalent Sort Key Only
- Internal Dictionary HardCoded
Revision 1.2 Second Release August 2000
Added Options
- Internal Sort or External Sort
- Reverse Equivalent or Natural Order Key
- Verbatim or Metaphone Sort
Externalized Dictionary
- Allow Synonyms
- Allow Word Removal From Sort Key
- Allow Prefixes
- Allow Suffixes
- Permits Other Languages Besides English
Written in Large Model Microsoft C Version 6.00a