-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (32 loc) · 1.18 KB
/
Copy pathindex.js
File metadata and controls
39 lines (32 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Enhanced Name Matcher
* A robust name matching library that combines multiple algorithms
* for optimal name matching performance
*/
// Export main classes and utilities
const EnhancedNaturalMatcher = require('./src/enhanced-natural-matcher');
const EnhancedMatcher = require('./src/enhanced-matcher');
const NameNormalizer = require('./src/name-normalizer');
module.exports = {
// Main matcher
EnhancedNaturalMatcher,
// Component matchers
EnhancedMatcher,
// Utilities
NameNormalizer,
// Convenience function for simple matching
match: function(name1, name2, options = { threshold: 0.75 }) {
const matcher = new EnhancedNaturalMatcher(options);
return matcher.getSimilarity(name1, name2);
},
// Convenience function for checking if names match
isMatch: function(name1, name2, options = { threshold: 0.75 }) {
const matcher = new EnhancedNaturalMatcher(options);
return matcher.isMatch(name1, name2);
},
// Convenience function for matching a group of names
matchGroup: function(nameGroup, options = { threshold: 0.75 }) {
const matcher = new EnhancedNaturalMatcher(options);
return matcher.matchNameGroup(nameGroup);
}
};