// Copyright 2013, University of Freiburg, // Chair of Algorithms and Data Structures. // Author: Björn Buchhold . // For all test, include the following words in your index. // If you want to make use of the listed 3-Grams, use the same Ids: // ID: 0, "Football", 3-Grams: $$f $fo foo oot otb tba bal all // ID: 1, "foobar", 3-Grams: $$f $fo foo oob oba bar // ID: 2, "Footsal", 3-Grams: $$f $fo foo oot ots tsa sal // ID: 3, "Foot Barca", 3-Grams: $$f $fo foo oot ot_ t_b _ba bar arc rca // Expected 3-Gram Index (with no particular order, do not check for this, // this list is only for you so you can write good tests for the other methods. // [$$f: 0 1 2 3 ] [$fo: 0 1 2 3 ] [foo: 0 1 2 3 ] [oot: 0 2 3 ] // [otb: 0 ] [tba: 0 ] [bal: 0 ] [all: 0 ] [oob: 1 ] // [oba: 1 ] [bar: 1 3 ] [ots: 2 ] [tsa: 2 ] [sal: 2 ] [ot_: 3 ] // [t_b: 3 ] [_ba: 3 ] [arc: 3 ] [rca: 3 ] // // Do the following checks when testing buildQgramIndex: // Size of 3Gram index: 19, // Size of list for $fo: 4, // Size of list oot: 3, // Size of list t_b: 1. // Size 4-Gram Index: 20 // Size of 1-Gram Index: 10 // When tesing compute union, you can take the union of the lists for foo and bar. // Result size: 4 // ID/Count pairs: (0, 1), (1, 2), (2, 1), (3, 2) // Test find matches with several queries. // One example: "fool" with delta=1 and k=5, expected top hit should // be the word you gave the highest score