diff options
Diffstat (limited to 'readme.md')
-rwxr-xr-x | readme.md | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -244,11 +244,11 @@ SoundexAlgorithm.compute("lukasiewicz") // l222 --- ## Decorating -It is possible to decorate algorithms and metrics with additional functionality, this is provided by rich wrapping via implicits. Decorations include: +It is possible to decorate algorithms and metrics with additional functionality, this is provided by rich wrapping via implicits. Decorations include (you can mix and match): * __withTransform:__ Transform arguments prior to computation/comparison. A handful of pre-built transforms are located in the [transform module](https://github.com/rockymadden/stringmetric/blob/master/core/src/main/scala/com/rockymadden/stringmetric/Transform.scala). -* __withMemoization:__ Queued. +* __[withMemoization](https://en.wikipedia.org/wiki/Memoization):__ All computations/comparisons are cached. Any further calls made with identical arguments will be looked up, rather than computed/compared. --- @@ -260,6 +260,13 @@ MetaphoneMetric.compare("abc123", "abc456") --- +Memoized: +```scala +(MetaphoneAlgorithm withMemoization).compute("abc123") +``` + +--- + Single filter, so that we only examine alphabetical characters: ```scala (MetaphoneAlgorithm withTransform StringTransform.filterAlpha).compute("abc123") |