public void parseHtml(string file) { List <string> temp = new List <string>(); StreamReader HReader = new StreamReader(file); foreach (var parag in HReader.ReadToEnd().Split('<')) { if (parag.StartsWith("p") || parag.StartsWith("b")) { temp = Normalize.normalList(Tokenize.tokenList(parag)); foreach (var term in temp) { if (tokenizedHtml.ContainsKey(term)) { if (tokenizedHtml[term].ContainsKey(file)) { tokenizedHtml[term][file] = tokenizedHtml[term][file] + 1; } else { tokenizedHtml[term].Add(file, 1); } } else { tokenizedHtml.Add(term, new Dictionary <string, int>() { { file, 1 } }); } } } } }
public Query(string q) { tokens = Normalize.normalList(Tokenize.tokenList(q)); }