Exemple #1
0
        private string[] TokenizeSentence(string sentence)
        {
            if (_tokenizer == null)
            {
                //_tokenizer = new OpenNLP.Tools.Tokenize.EnglishMaximumEntropyTokenizer(_modelPath + "EnglishTok.nbin");
                _tokenizer = new EnglishRuleBasedTokenizer();
            }

            return(_tokenizer.Tokenize(sentence));
        }
Exemple #2
0
		private string[] TokenizeSentence(string sentence)
		{
			if (_tokenizer == null)
			{
				//_tokenizer = new OpenNLP.Tools.Tokenize.EnglishMaximumEntropyTokenizer(_modelPath + "EnglishTok.nbin");
				_tokenizer = new EnglishRuleBasedTokenizer();
			}

			return _tokenizer.Tokenize(sentence);
		}