tapology now uses hamming distance to get approximately correct link

This commit is contained in:
2024-07-03 15:28:13 -05:00
parent ad7b487954
commit 02f27034d5
7 changed files with 87 additions and 23 deletions
+13 -5
View File
@@ -10,11 +10,19 @@ var search_result []byte
func testTapologyGetter(t *testing.T) {
get_tapology_for := tapology_getter()
print_json(get_tapology_for("Dustin Poirier"))
print_json(get_tapology_for("Jon Jones"))
print_json(get_tapology_for("Conor Mcgregor"))
names := []string{
"Dustin Poirier",
"Jon Jones",
"Conor Mcgregor",
"Justin Gaethje",
"Benoit Saint Denis",
}
for _, name := range names {
print_json(get_tapology_for(name))
}
}
func TestTapologyParseFragment(t *testing.T) {
print_json(parse_tapology_results(search_result))
func TestParseTapologyResults(t *testing.T) {
print_json(parse_tapology_results("Jon Jones", search_result))
}