/*  Copyright (C) 2009 Joshua Judson Rosen <rozzin@geekspace.com>.

    This program is free software: you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public License
    as published by the Free Software Foundation, either version 3
    of the License, or (at your option) any later version..

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; see the file COPYING. If not, see
    <http://www.gnu.org/licenses/> or write to:

        The Free Software Foundation, inc.
        51 Franklin Street, Fifth Floor
        Boston, MA 02110-1301
        USA
*/

#ifndef LEVENSHTEIN_LEVENSHTEIN_H
#define LEVENSHTEIN_LEVENSHTEIN_H

typedef enum
{
  LEVENSHTEIN_NON,
  LEVENSHTEIN_INS,
  LEVENSHTEIN_DEL,
  LEVENSHTEIN_SUB
}
levenshtein_op;

typedef float (levenshtein_weightfunc) (const char *s0, int len0, int pos0,
                                        const char *s1, int len1, int pos1,
                                        levenshtein_op op);


float
levenshtein (const char *s0, int len0,
             const char *s1, int len1,
             levenshtein_weightfunc *weight);

#endif
