The mk-string-metrics Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The mk-string-metrics Reference Manual

This is the mk-string-metrics Reference Manual, version 0.1.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 05:40:20 2022 GMT+0.

Table of Contents


1 Introduction

mk-string-metrics

License MIT Build Status Quicklisp

This library implements efficient algorithms that calculate various string metrics in Common Lisp:

Installation

Copy files of this library in any place where ASDF can find them. Then you can use it in system definitions and ASDF will take care of the rest.

Via Quicklisp (recommended):

(ql:quickload "mk-string-metrics")

Documentation

damerau-levenshtein x y

Calculate Damerau-Levenshtein distance between two given strings x and y.


hamming x y

Calculate Hamming distance between two given strings x and y, they have to be of the same length.


jaccard x y

Calculate Jaccard similarity coefficient for two strings x and y. Returned value is in range from 0 (no similarity) to 1 (exact match).


jaro x y

Calculate Jaro distance between two strings x and y. Returned value is in range from 0 (no similarity) to 1 (exact match).


jaro-winkler x y

Calculate Jaro-Winkler distance between two strings x and y. Returned value is in range from 0 (no similarity) to 1 (exact match).


levenshtein x y

Calculate Levenshtein distance between two given strings x and y.


norm-damerau-levenshtein x y

Return normalized Damerau-Levenshtein distance between x and y. Result is a real number from 0 to 1, where 0 signifies no similarity between the strings, while 1 means exact match.


norm-levenshtein x y

Return normalized Levenshtein distance between x and y. Result is a real number from 0 to 1, where 0 signifies no similarity between the strings, while 1 means exact match.


overlap x y

This function calculates overlap coefficient between two given strings x and y. Returned value is in range from 0 (no similarity) to 1 (exact match).

License

Copyright © 2014–2018 Mark Karpov

Distributed under MIT Licens


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 mk-string-metrics

efficient implementations of various string metric algorithms

Author

Mark Karpov

License

MIT

Version

0.1.2

Source

mk-string-metrics.asd.

Child Component

mk-string-metrics.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


3.1.1 mk-string-metrics/mk-string-metrics.asd

Source

mk-string-metrics.asd.

Parent Component

mk-string-metrics (system).

ASDF Systems

mk-string-metrics.


3.1.2 mk-string-metrics/mk-string-metrics.lisp

Source

mk-string-metrics.asd.

Parent Component

mk-string-metrics (system).

Packages

mk-string-metrics.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 mk-string-metrics

Source

mk-string-metrics.lisp.

Nickname

mksm

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: damerau-levenshtein (x y)

Calculate Damerau-Levenshtein distance between two given strings X and Y.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: hamming (x y)

Calculate Hamming distance between two given strings X and Y, they have to be of the same length.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: jaccard (x y)

Calculate Jaccard similarity coefficient for two strings X and
Y. Returned value is in range from 0 (no similarity) to 1 (exact match).

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: jaro (x y)

Calculate Jaro distance between two strings X and Y. Returned value is in range from 0 (no similarity) to 1 (exact match).

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: jaro-winkler (x y)

Calculate Jaro-Winkler distance between two strings X and Y. Returned value is in range from 0 (no similarity) to 1 (exact match).

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: levenshtein (x y)

Calculate Levenshtein distance between two given strings X and Y.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: norm-damerau-levenshtein (x y)

Return normalized Damerau-Levenshtein distance between X and Y. Result is a real number from 0 to 1, where 0 signifies no similarity between the strings, while 1 means exact match.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: norm-levenshtein (x y)

Return normalized Levenshtein distance between X and Y. Result is a real number from 0 to 1, where 0 signifies no similarity between the strings, while 1 means exact match.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: overlap (x y)

This function calculates overlap coefficient between two given strings X and Y. Returned value is in range from 0 (no similarity) to 1 (exact match).

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Ordinary functions

Function: fast-find (char str str-len &optional start)

Check if CHAR is in STR. This function is supposed to be inlined.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: intersection-length (x y)

Returns length of intersection of two strings X and Y. This function is supposed to be inlined.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: prefix-length (x y)

Calculate length of common prefix for strings X and Y.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: string-to-set (str)

Convert string STR into a set. This function is supposed to be inlined.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.

Function: union-length (x y)

Returns length of union of two strings X and Y. This function is supposed to be inlined.

Package

mk-string-metrics.

Source

mk-string-metrics.lisp.


5.2.2 Types

Type: array-index (&optional length)
Package

mk-string-metrics.

Source

mk-string-metrics.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   D   F   H   I   J   L   N   O   P   S   U  
Index Entry  Section

D
damerau-levenshtein: Public ordinary functions

F
fast-find: Private ordinary functions
Function, damerau-levenshtein: Public ordinary functions
Function, fast-find: Private ordinary functions
Function, hamming: Public ordinary functions
Function, intersection-length: Private ordinary functions
Function, jaccard: Public ordinary functions
Function, jaro: Public ordinary functions
Function, jaro-winkler: Public ordinary functions
Function, levenshtein: Public ordinary functions
Function, norm-damerau-levenshtein: Public ordinary functions
Function, norm-levenshtein: Public ordinary functions
Function, overlap: Public ordinary functions
Function, prefix-length: Private ordinary functions
Function, string-to-set: Private ordinary functions
Function, union-length: Private ordinary functions

H
hamming: Public ordinary functions

I
intersection-length: Private ordinary functions

J
jaccard: Public ordinary functions
jaro: Public ordinary functions
jaro-winkler: Public ordinary functions

L
levenshtein: Public ordinary functions

N
norm-damerau-levenshtein: Public ordinary functions
norm-levenshtein: Public ordinary functions

O
overlap: Public ordinary functions

P
prefix-length: Private ordinary functions

S
string-to-set: Private ordinary functions

U
union-length: Private ordinary functions

Jump to:   D   F   H   I   J   L   N   O   P   S   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables