Compare commits
2 Commits
db73af3bdd
...
001a37b8ef
Author | SHA1 | Date | |
---|---|---|---|
001a37b8ef | |||
69d6884517 |
@ -62,7 +62,7 @@ public class Mangasee : MangaConnector
|
||||
}
|
||||
|
||||
private readonly string[] _filterWords = {"a", "the", "of", "as", "to", "no", "for", "on", "with", "be", "and", "in", "wa", "at", "be", "ni"};
|
||||
private string ToFilteredString(string input) => string.Join(' ', input.ToLower().Split(' ').Where(word => _filterWords.Contains(word)));
|
||||
private string ToFilteredString(string input) => string.Join(' ', input.ToLower().Split(' ').Where(word => _filterWords.Contains(word) == false));
|
||||
private SearchResult[] FilteredResults(string publicationTitle, SearchResult[] unfilteredSearchResults)
|
||||
{
|
||||
Dictionary<SearchResult, int> similarity = new();
|
||||
@ -81,7 +81,6 @@ public class Mangasee : MangaConnector
|
||||
}
|
||||
|
||||
List<SearchResult> ret = similarity.OrderBy(s => s.Value).Take(10).Select(s => s.Key).ToList();
|
||||
ret.AddRange(similarity.Where(s => s.Value < 5).Select(s => s.Key));
|
||||
return ret.ToArray();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user