//public static Dictionary<string, Dictionary<string, TermOfQuery>> Quries; //public static Dictionary<string, double> QuriesScores; /// <summary> /// a single qurey builder /// </summary> /// <param name="path"></param> public Searcher(string pathPosting) { path = pathPosting; stemmer = new Stemmer(); //QuriesScores = new Dictionary<string, double>(); Quries = new HashSet <Query>(); BuildPaths(); }
public StandardTextProcessor(StemmerInterface stemmer) { this.stemmer = stemmer; // splitMarks = new char[] {'.', ',', ';', ':', '?', ' '}; splitMarks = new char[] {' '}; junkMarks = new string[] {"\"", "/", "\\", "'", "(", ")", "`", "-", "_", "|", "©", "[", "]", "<", ">", ".", ",", ";", ":", "?", "+", "·" }; stopWords = new string[] {"and", "a", "on", "of", "with", "in", "the", "etc"}; }
/// <summary> /// create a new object of readfile /// </summary> /// <param name="path">the path to the corpus</param> /// <param name="pathPosting">the path to the posting</param> /// <param name="stemming">tell if use stem</param> public ReadFile(string path, string pathPosting, bool stemming) { countDocM = new Mutex(); timesOfN = new Dictionary <string, Dictionary <string, int> >(); top5 = new Dictionary <string, string[]>(); // start parameters this.path = path; this.pathPosting = pathPosting; numOfDocs = 0; totalNumOfWords = 0; Parse.isStem = stemming; Indexer.pathPosting = pathPosting; Indexer.isStem = stemming; ReadFile.stemmer = new Stemmer(); // start data bases languageList = new List <string>(); indexer = new Indexer(); // call to create functions createStopWordsDic(); getFilesPaths(); startQueues(); createParse(); }