\  *******************************************************************
\  *                                                                 *
\  *  Neil Bawd  2000-07-21                                          *
\  *                                                                 *
\  *******************************************************************

\  Very rough spelling metric.

\   *  0 if the strings are identical.
\   *  1 if two characters are transposed.
\   *  2 if one character different, added, or deleted.
\   *  3 otherwise.

include lib/spelldis.4th

s" HELLO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" EHLLO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr 
s" HLELO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr 
s" HELOL" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" JELLO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr 
s" HALLO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HEELO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HELPO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HELLS" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HELPS" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" ELLO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HLLO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HELO" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
s" HELL" 2dup TYPE SPACE  S" HELLO"  2dup TYPE SPACE  Spell-Distance . cr
