Beispiel #1
0
 public Cleansing()
 {
     CommonAndstopWords = LoadStopWords(commonAndStopWordFile);
     _BagOfWords        = BagOfWords.GetBagOfWords;
     _wordsUserList     = WordsUserList.GetWordList;
     _usersWordList     = UsersWordList.GetUserList;
 }
Beispiel #2
0
 public Cleansing(string filePath)
 {
     CommonAndstopWords = LoadStopWords(filePath);
     _BagOfWords        = BagOfWords.GetBagOfWords;
     _wordsUserList     = WordsUserList.GetWordList;
     _usersWordList     = UsersWordList.GetUserList;
 }
        public Filtration()
        {
            //_AllSlidingWindowsKeywords = new List<List<List<string>>>();
            //_SlidingWindowsTimeSpan = new List<KeyValuePair<KeyValuePair<DateTime, DateTime>, List<DateTime>>>();
            //_CurrentSlidingWindowKeywords = new List<List<string>>();

            //_DataCleaning = new Cleansing();
            progress          = _Progress.GetProgress;
            _BagOfWords       = BagOfWords.GetBagOfWords;
            _DatasetStopWords = new Hashtable();
            //_CleanDataSet = new List<KeyValuePair<DateTime, List<string>>>();
        }
Beispiel #4
0
        private void AddFiltrationWord(string text)
        {
            string[]  wordsToRemove = text.Split(new char[] { ',' }, text.Length, StringSplitOptions.RemoveEmptyEntries);
            Hashtable tempStopWords = new Hashtable();

            foreach (string word in wordsToRemove)
            {
                if (!tempStopWords.ContainsKey(word))
                {
                    tempStopWords.Add(word, 1f);
                }
            }

            BagOfWords wordList = BagOfWords.GetBagOfWords;

            wordList._RemoveWords = tempStopWords;
        }