Compare commits
No commits in common. "001a37b8eff5ebaf46d1ea00fd0e3e532a6ee7f1" and "db73af3bdd802be00b51b9f6c5370aa99af2a847" have entirely different histories.
001a37b8ef
...
db73af3bdd
@ -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 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) == false));
|
private string ToFilteredString(string input) => string.Join(' ', input.ToLower().Split(' ').Where(word => _filterWords.Contains(word)));
|
||||||
private SearchResult[] FilteredResults(string publicationTitle, SearchResult[] unfilteredSearchResults)
|
private SearchResult[] FilteredResults(string publicationTitle, SearchResult[] unfilteredSearchResults)
|
||||||
{
|
{
|
||||||
Dictionary<SearchResult, int> similarity = new();
|
Dictionary<SearchResult, int> similarity = new();
|
||||||
@ -81,6 +81,7 @@ public class Mangasee : MangaConnector
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<SearchResult> ret = similarity.OrderBy(s => s.Value).Take(10).Select(s => s.Key).ToList();
|
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();
|
return ret.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user