public abstract NamedEntityManager.WordSemanticsAnalysisReport Analyze( Word word, NamedEntityManager.Context context);
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); } }
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); } }