Пример #1
0
 public abstract NamedEntityManager.WordSemanticsAnalysisReport Analyze(
     Word word, NamedEntityManager.Context context);
Пример #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);
     }
 }
Пример #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);
            }
        }