|
|
@ -82,7 +82,7 @@
|
|
|
|
var threshold = initial.threshold !== undefined ? initial.threshold : 0.5;
|
|
|
|
var threshold = initial.threshold !== undefined ? initial.threshold : 0.5;
|
|
|
|
|
|
|
|
|
|
|
|
// Split the searchVal into individual words.
|
|
|
|
// Split the searchVal into individual words.
|
|
|
|
var splitSearch = searchVal.split(/[^(a-z|A-Z|0-9)]/g);
|
|
|
|
var splitSearch = searchVal.split(/ /g);
|
|
|
|
|
|
|
|
|
|
|
|
// Array to keep scores in
|
|
|
|
// Array to keep scores in
|
|
|
|
var highestCollated = [];
|
|
|
|
var highestCollated = [];
|
|
|
@ -105,7 +105,7 @@
|
|
|
|
data[i] = data[i].toLowerCase();
|
|
|
|
data[i] = data[i].toLowerCase();
|
|
|
|
|
|
|
|
|
|
|
|
// Split the data into individual words
|
|
|
|
// Split the data into individual words
|
|
|
|
var splitData = data[i].split(/[^(a-z|A-Z|0-9)]/g);
|
|
|
|
var splitData = data[i].split(/ /g);
|
|
|
|
|
|
|
|
|
|
|
|
// Remove any empty words or spaces
|
|
|
|
// Remove any empty words or spaces
|
|
|
|
for (var y = 0; y < splitData.length; y++){
|
|
|
|
for (var y = 0; y < splitData.length; y++){
|
|
|
|