Exemple #1
0
        //string xmlFile removed for testing

        public string[] Parse(FileType file)//parse method called
        {
            //the file type is sent to the adapter class where parse will be called on it
            List <String> list = this.adapter.Parse(file);

            BuildingString build = new BuildingString();

            StringBuilder sb = build.BuildString(list);

            string bulk = sb.ToString();


            //XmlParser xp = new XmlParser();
            //List<String> list = xp.Parse(fileName);//pass file into xml parser
            //returns list of words between the xml nodes (raw text)

            StopwordTool sw = new StopwordTool();

            sw.Get();    //pulls the words from the database which populates the stopword dictionary

            //runs the list against the stopwords and
            //returns a string with stopwords and duplicates removed
            string words = sw.RemoveStopwords(bulk);

            string[] wordsList = words.Split(' ');//splits the words string into an array to be returned

            return(wordsList);
        }
        public void StopWords()//calling parse service
        {
            StopwordTool sw = new StopwordTool();

            sw.Get();
        }