public static string FindNames(string sentence) { if (mNameFinder == null) { mNameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(mModelPath + "namefind\\"); } string[] models = new string[] { "person" }; return(mNameFinder.GetNames(models, sentence)); }
public static string FindNames(string sentence) { if (mNameFinder == null) { mNameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(mModelPath + "namefind\\"); } string[] models = new string[] { "date", "location", "money", "organization", "percentage", "person", "time" }; return mNameFinder.GetNames(models, sentence); }
private string FindNames(string sentence) { if (mNameFinder == null) { mNameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(mModelPath + "namefind\\"); } string[] models = new string[] { "date", "location", "money", "organization", "percentage", "person", "time" }; return(mNameFinder.GetNames(models, sentence)); }
private string FindNames(OpenNLP.Tools.Parser.Parse sentenceParse) { if (_nameFinder == null) { _nameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(_modelPath + "namefind\\"); } var models = new[] { "date", "location", "money", "organization", "percentage", "person", "time" }; return(_nameFinder.GetNames(models, sentenceParse)); }
/// <summary> /// Initializes a new instance of the SharpNLPTagger class with its behavior specified by the provided TaggerMode value. /// </summary> /// <param name="taggingMode">Specifies the mode under which the tagger will operate.</param> public SharpNLPTagger(TaggerMode taggingMode) { string resourcesDirectory; TaggingMode = taggingMode; if (Settings != null) { resourcesDirectory = Settings["ResourcesDirectory"]; mModelPath = resourcesDirectory + Settings["MaximumEntropyModelDirectory"]; mNameFinderPath = resourcesDirectory + Settings["WordnetSearchDirectory"]; } else { resourcesDirectory = ConfigurationManager.AppSettings["ResourcesDirectory"]; mModelPath = resourcesDirectory + ConfigurationManager.AppSettings["MaximumEntropyModelDirectory"]; mNameFinderPath = resourcesDirectory + ConfigurationManager.AppSettings["WordnetSearchDirectory"]; } mNameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(mNameFinderPath); }
private string FindNames(OpenNLP.Tools.Parser.Parse sentenceParse) { if (mNameFinder == null) { mNameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(mModelPath); } string[] models = new string[] { "date", "location", "money", /*"organization",*/ "percentage", "person", "time" }; return mNameFinder.GetNames(models, sentenceParse); }
private string FindNames(OpenNLP.Tools.Parser.Parse sentenceParse) { if (_nameFinder == null) { _nameFinder = new OpenNLP.Tools.NameFind.EnglishNameFinder(_modelPath + "namefind\\"); } var models = new[] { "date", "location", "money", "organization", "percentage", "person", "time" }; return _nameFinder.GetNames(models, sentenceParse); }