@@ -101,7 +101,7 @@ func New(Words, Results []string, Data []interface{}, Converter func(string) []b
101
101
return Suffixes
102
102
}
103
103
104
- // Adds a word to the dictionary that IS was built on.
104
+ // Insert adds a word to the dictionary that IS was built on.
105
105
// This is pretty slow, because of linear-time insertion into an array,
106
106
// so stick to New when you can
107
107
func (IS * InvertedSuffix ) Insert (Word , Result string , Data interface {}) {
@@ -201,7 +201,7 @@ func (IS *InvertedSuffix) Search(Query []byte) (int, int) {
201
201
return low , high
202
202
}
203
203
204
- // Returns the strings which contain the query, and their stored values unsorted
204
+ // Query returns the strings which contain the query, and their stored values unsorted
205
205
// Input:
206
206
// Word: The substring to search for.
207
207
// ResultsLimit: Limit the results to some number of values. Set to -1 for no limit
@@ -234,7 +234,7 @@ func (IS *InvertedSuffix) Query(Word string, ResultsLimit int) ([]string, []inte
234
234
return Results , Values
235
235
}
236
236
237
- // Returns the strings which contain the query sorted
237
+ // SortedQuery returns the strings which contain the query sorted
238
238
// The function sorter produces a value to sort by (largest first)
239
239
// Input:
240
240
// Word: The substring to search for.
@@ -308,7 +308,7 @@ func (IS *InvertedSuffix) SortedQuery(Word string, ResultsLimit int, Sorter func
308
308
return Results , Values , Scores
309
309
}
310
310
311
- // Returns the strings which contain the query
311
+ // ErrorCorrectingQuery returns the strings which contain the query
312
312
// Unsorted, I think it's partially sorted alphabetically
313
313
// Will search for all substrings defined by ErrorCorrection
314
314
// if no results are found on the initial query
@@ -363,7 +363,7 @@ func (IS *InvertedSuffix) ErrorCorrectingQuery(Word string, ResultsLimit int, Er
363
363
return Results , Values
364
364
}
365
365
366
- // Returns the strings which contain the query
366
+ // SortedErrorCorrectingQuery returns the strings which contain the query
367
367
// Sorted. The function sorter produces a value to sort by (largest first)
368
368
// Will search for all substrings defined by ErrorCorrection
369
369
// if no results are found on the initial query
0 commit comments