The output of spell:suggest-detailed() includes four value attributes indicating scores for different variance tests, based (according to the docs) on the raw values of spell:double-metaphone() and spell:levenshtein-distance() as applied to two strings. For example,
<spell:suggestion original="konnstitooshion" dictionary="/test/temp-dictionary.xml" xmlns:spell="http://marklogic.com/xdmp/spell"> <spell:word distance="138" key-distance="0" word-distance="285" levenshtein-distance="6">constitution</spell:word> </spell:suggestion> @levenshtein-distance is self-explanatory. @key-distance seems to be based directly on the double metaphones (in this case, the double metaphones for "constitution" and "konnstitooshion" are the same) But @distance and @word-distance mean what, exactly? Are algorithms available that would allow calculation of these values using only spell:double-metaphone() and spell:levenshtein-distance(), without needing to use a dictionary? DS -- David Sewell, Editorial and Technical Manager ROTUNDA, The University of Virginia Press PO Box 400314, Charlottesville, VA 22904-4314 USA Email: [email protected] Tel: +1 434 924 9973 Web: http://rotunda.upress.virginia.edu/ _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
