mirror of
https://github.com/tursodatabase/libsql.git
synced 2025-03-08 23:41:50 +00:00
A common complain with libSQL is how to run extensions. The main mechanism, with a .so, has a lot of issues around how those .so are distributed. The most common extensions are the ones in the sqlean package. We can improve this experience by bundling them in our sqlite build. Not all SQLean extensions are kosher: some of them, like fileio, use the vfs. Others, are deemed too complex. The extensions included here are a subset that we deem important enough, and low risk enough, to just be a part of the main bundle.
28 lines
819 B
C
28 lines
819 B
C
// Copyright (c) 2014 Ross Bayer, MIT License
|
|
// https://github.com/Rostepher/libstrcmp
|
|
|
|
#ifndef FUZZY_H
|
|
#define FUZZY_H
|
|
|
|
// distance metrics
|
|
unsigned damerau_levenshtein(const char*, const char*);
|
|
int hamming(const char*, const char*);
|
|
double jaro(const char*, const char*);
|
|
double jaro_winkler(const char*, const char*);
|
|
unsigned levenshtein(const char*, const char*);
|
|
unsigned optimal_string_alignment(const char*, const char*);
|
|
int edit_distance(const char*, const char*, int*);
|
|
|
|
// phonetics
|
|
char* caverphone(const char*);
|
|
char* soundex(const char*);
|
|
char* refined_soundex(const char*);
|
|
unsigned char* phonetic_hash(const unsigned char*, int);
|
|
|
|
// translit
|
|
unsigned char* transliterate(const unsigned char*, int);
|
|
int translen_to_charlen(const char*, int, int);
|
|
int script_code(const unsigned char*, int);
|
|
|
|
#endif
|