Exemplo n.º 1
0
 public void PN3()
 {
     ii = new InvertedIndex();
     ii.Add("what do you expect from me");
     ii.Add("what did you say");
     ii.Add("what does the fox say");
     string query = "me & say | ( expect | did ) & what";
     Assert.AreEqual(ii.Query(query), "{ 0, 1 }");
 }
Exemplo n.º 2
0
 public void PN4()
 {
     ii = new InvertedIndex();
     ii.Add("what do you expect from me");
     ii.Add("what did you say");
     ii.Add("what does the fox say");
     string query = "what & ( do | expect ) | you";
     Assert.AreEqual(ii.Query(query), "{ 0, 1 }");
 }
Exemplo n.º 3
0
 public void PN2()
 {
     ii = new InvertedIndex();
     ii.Add("what do you expect from me");
     ii.Add("what did you say");
     ii.Add("what does the fox say");
     string query = "what | fox & ( did | does )";
     Assert.AreEqual(ii.Query(query), "{ 0, 1, 2 }");
 }