Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.5 KB

README.md

File metadata and controls

49 lines (34 loc) · 1.5 KB

existdb-strings

Utility extension module for eXist-db that provides a mix of string functions. Requires eXist-db v5.x

Build Status Codacy Badge Java 8 License

Available functions

Distance

Provides access to https://commons.apache.org/proper/commons-text/

  • cosine#2
  • hamming#2
  • levenshtein#2

Codec

Provides access to https://commons.apache.org/proper/commons-codec/

  • caverphone1#1
  • caverphone2#2
  • cologne-phonetic#1
  • metaphone#1
  • metaphone-double#1
  • nysiis#1
  • soundex#1

Examples

xquery version "3.1";

import module namespace distance = "http://exist-db.org/extensions/strings/distance" 
                at "java:org.exist.extensions.strings.DistanceModule";
                
distance:levenshtein("tik", "tak")
xquery version "3.1";

import module namespace codec = "http://exist-db.org/extensions/strings/codec" 
                at "java:org.exist.extensions.strings.CodecModule";
                
codec:metaphone("tik")