E - the type of the elements being matched.public interface MultiMatcher<E>
Exclusviely means each element in both collections can at most be linked with one element from the other collection. Bidirectionally means the link between two elements always has two directions. If element A is linked to element B, element B is inherently linked to element A as well.
Equality and similarity are defined by Equalator and Similator functions that can be passed at
creation time. All values controlling the matching algorithm can be optionally configured in the factory class
if the default configuration is not desired. Additionally, a callback function for deciding found matches with
questionable similarity can be injected.
This is a powerful general purpose means of building associations of two sets of similar but not equal elements.
A very simple use case is the formal recognition of a changed table column structure (for which this class
was originally developed).
For example given the following two hypothetical definitions (old and new) of column names:
Old:
Similator
(see Levenshtein.substringSimilarity(java.lang.String, java.lang.String)) the algorithm produces the following associations:
firstname -1.00- Firstname
lastname -0.75- Name
age -1.00- Age
emailAddress -0.71- Email
postalAddress -0.77- Address
noteLink [new]
newColumn1 [new]
someMiscAddress -0.56- OtherAddress
X Freetext
| Modifier and Type | Interface and Description |
|---|---|
static class |
MultiMatcher.Default<E> |
double similarityThreshold()
double singletonPrecedenceThreshold()
double singletonPrecedenceBonus()
double noiseFactor()
MatchValidator<? super E> validator()
MultiMatcher<E> setSimilarityThreshold(double similarityThreshold)
MultiMatcher<E> setSingletonPrecedenceThreshold(double singletonPrecedenceThreshold)
MultiMatcher<E> setSingletonPrecedenceBonus(double singletonPrecedenceBonus)
MultiMatcher<E> setNoisefactor(double noiseFactor)
MultiMatcher<E> setSimilator(Similator<? super E> similator)
MultiMatcher<E> setEqualator(Equalator<? super E> equalator)
MultiMatcher<E> setValidator(MatchValidator<? super E> validator)
MultiMatch<E> match(XGettingCollection<? extends E> source, XGettingCollection<? extends E> target)
static double defaultSimilarityThreshold()
static double defaultSingletonPrecedenceThreshold()
static double defaultSingletonPrecedenceBonus()
static double defaultNoiseFactor()
static <E> MultiMatcher<E> New()
Copyright © 2022 MicroStream Software. All rights reserved.