Exemplo n.º 1
0
        public string[] Partition(string input)
        {
            Regex r = new Regex("([ \\t{}():;._,\\-! \"?\n])");

            Normalize_Casing(ref input);
            input = input.ToLower();

            String[] tokens = r.Split(input);

            ArrayList filter = new ArrayList();

            for (int i = 0; i < tokens.Length; i++)
            {
                MatchCollection mc = r.Matches(tokens[i]);
                if (mc.Count <= 0 && tokens[i].Trim().Length > 0 &&
                    !StopWordsHandler.IsStopWord(tokens[i]))
                {
                    filter.Add(tokens[i]);
                }
            }

            return((string[])filter.ToArray(typeof(string)));
        }
Exemplo n.º 2
0
 public SentenceSimilarity()
 {
     StopWordsHandler stopword = new StopWordsHandler();
 }
Exemplo n.º 3
0
		public Tokeniser()
		{
            StopWordsHandler stop=new StopWordsHandler() ;
		}
		public SentenceSimilarity()
		{
			StopWordsHandler stopword=new StopWordsHandler() ;
		}
Exemplo n.º 5
0
 public Tokeniser()
 {
     StopWordsHandler stop = new StopWordsHandler();
 }