# Algorithm And Test References

## American Soundex

- U.S. National Archives, “The Soundex Indexing System”: https://www.archives.gov/research/census/soundex.html
- Apache Commons Codec `Soundex`: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/language/Soundex.java
- Apache Commons Codec tests: https://github.com/apache/commons-codec/blob/master/src/test/java/org/apache/commons/codec/language/SoundexTest.java

This package uses the US English mapping and treats `H` and `W` as ignored letters that do not separate equal adjacent codes. Vowels and `Y` are non-encoded separators.

## Refined Soundex

- Apache Commons Codec `RefinedSoundex`: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java
- Apache Commons Codec tests: https://github.com/apache/commons-codec/blob/master/src/test/java/org/apache/commons/codec/language/RefinedSoundexTest.java

The mapping and selected compatibility vectors follow the documented Apache Commons Codec behavior.

## NYSIIS

- Apache Commons Codec `Nysiis` and its rule description: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/language/Nysiis.java
- Apache Commons Codec tests: https://github.com/apache/commons-codec/blob/master/src/test/java/org/apache/commons/codec/language/NysiisTest.java
- NYSIIS overview: https://en.wikipedia.org/wiki/New_York_State_Identification_and_Intelligence_System

This package implements the untruncated form represented by Apache Commons Codec's non-strict mode. It does not expose the six-character strict variant.

## Original Metaphone

- Lawrence Philips, "Hanging on the Metaphone", *Computer Language*, December 1990.
- Apache Commons Codec `Metaphone`: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/language/Metaphone.java
- Apache Commons Codec tests: https://github.com/apache/commons-codec/blob/master/src/test/java/org/apache/commons/codec/language/MetaphoneTest.java

This package implements the documented original Metaphone rule families with an untruncated output. Compatibility vectors are selected from the published description and Apache Commons Codec tests, while the MoonBit control flow is an original implementation.

## Double Metaphone

- Lawrence Philips, "The Double Metaphone Search Algorithm", *C/C++ Users Journal*, June 2000: https://drdobbs.com/the-double-metaphone-search-algorithm/184401251
- Apache Commons Codec `DoubleMetaphone`: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
- Apache Commons Codec tests: https://github.com/apache/commons-codec/blob/master/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java

The MoonBit implementation uses the standard four-character key limit and returns both primary and distinct alternate keys. Rule behavior and selected vectors were checked against the published algorithm and Apache-2.0-licensed Commons Codec tests; the state representation and MoonBit control flow were written for this project.

## Caverphone 1.0 and 2.0

- University of Otago, Caverphone project page and specifications: https://caversham.otago.ac.nz/files/working/ctp150804.pdf
- Apache Commons Codec `Caverphone1` and `Caverphone2`: https://github.com/apache/commons-codec/tree/master/src/main/java/org/apache/commons/codec/language

Caverphone 1.0 produces six-character keys and Caverphone 2.0 produces ten-character keys. Both implementations apply the documented rewrites in order using project-local literal and run-replacement helpers rather than a regular-expression dependency. Version-specific vectors prevent accidental aliasing of the two algorithms.

## Match Rating Approach

- Western Airlines, Match Rating Approach description summarized by the U.S. National Archives: https://www.archives.gov/research/census/soundex.html
- Apache Commons Codec `MatchRatingApproachEncoder`: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
- Apache Commons Codec tests: https://github.com/apache/commons-codec/blob/master/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java

The package exposes both codex generation and the complete deterministic comparison procedure: length-difference rejection, documented minimum-rating bands, and left-to-right plus right-to-left elimination. Selected behavior was checked against the Apache-2.0 reference and independently expressed in MoonBit.

## Reuse And Attribution

Apache Commons Codec is licensed under Apache License 2.0. This repository does not copy its Java implementation. Selected expected input/output pairs were adapted as compatibility tests, and their source and license are recorded here and in `NOTICE`.

## String Similarity And Grouping

- Vladimir Levenshtein, "Binary codes capable of correcting deletions, insertions, and reversals", 1966.
- Matthew A. Jaro, "Advances in record-linkage methodology as applied to matching the 1985 census of Tampa, Florida", 1989.
- William E. Winkler, "String Comparator Metrics and Enhanced Decision Rules in the Fellegi-Sunter Model of Record Linkage", 1990.
- Lee R. Dice, "Measures of the Amount of Ecologic Association Between Species", 1945.
- Robert E. Tarjan, "Efficiency of a Good But Not Linear Set Union Algorithm", 1975.

The similarity and union-find implementations are project-local MoonBit code based on the published definitions. The named Conservative, Balanced, and Recall configurations are deterministic defaults chosen for demonstration and configuration reuse; no benchmark-derived accuracy claim is made.
