public abstract NamedEntityManager.WordSemanticsAnalysisReport Analyze(
     Word word, NamedEntityManager.Context context);
Example #2
0
 public override NamedEntityManager.WordSemanticsAnalysisReport Analyze(Word word, NamedEntityManager.Context context)
 {
     if (word.Value == "Corse")
     {
         return(new NamedEntityManager.WordSemanticsAnalysisReport {
             Semantics = new NamedEntitySemantics()
             {
                 NamedEntityType = this,
                 Words = new[] { word },
             }
         });
     }
     else
     {
         return(null);
     }
 }
Example #3
0
        public override NamedEntityManager.WordSemanticsAnalysisReport Analyze(Word word, NamedEntityManager.Context context)
        {
            var words = new[] { word, context.GetNextWord() };

            if (words.All(myWord => myWord != null && this.IsUpper(myWord)))
            {
                return(new NamedEntityManager.WordSemanticsAnalysisReport {
                    Semantics = new NamedEntitySemantics {
                        NamedEntityType = this,
                        Words = words,
                    },
                    LeftWords = 0,
                    RightWords = 1,
                });
            }
            else
            {
                return(null);
            }
        }