コード例 #1
0
ファイル: NLPTools.cs プロジェクト: LowerCode/wpfDataDrive
        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));
        }
コード例 #2
0
ファイル: POSTagger.cs プロジェクト: hemtros/MinorProject
        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);
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        /// <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);
        }
コード例 #6
0
ファイル: MainForm.cs プロジェクト: dmoonfire/sharpnlp
        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);
        }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: gblosser/OpenNlp
        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);
        }