/** * <summary> The main method to automatically detect named entities in a sentence. The algorithm * 1. Detects PERSON(s). * 2. Detects LOCATION(s). * 3. Detects ORGANIZATION(s). * 4. Detects MONEY. * 5. Detects TIME. * For not detected words, the algorithm sets the named entity "NONE".</summary> * <param name="sentence">The sentence for which named entities checked.</param> */ public void AutoNER(AnnotatedSentence.AnnotatedSentence sentence) { AutoDetectPerson(sentence); AutoDetectLocation(sentence); AutoDetectOrganization(sentence); AutoDetectMoney(sentence); AutoDetectTime(sentence); }
/** * <summary> The method uses predicateCandidates method to predict possible predicates. For each candidate, it sets for that * word PREDICATE tag.</summary> * <param name="sentence">The sentence for which predicates will be determined automatically.</param> * <returns>If at least one word has been tagged, true; false otherwise.</returns> */ public override bool AutoPredicate(AnnotatedSentence.AnnotatedSentence sentence) { var candidateList = sentence.PredicateCandidates(_framesetList); foreach (var word in candidateList) { word.SetArgument("PREDICATE$" + word.GetSemantic()); } if (candidateList.Count > 0) { return(true); } return(false); }
/** * <summary> The method should set determine all predicates in the sentence.</summary> * <param name="sentence">The sentence for which predicates will be determined automatically.</param> */ public abstract bool AutoPredicate(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The method should detect TIME named entities. TIME corresponds to time * expressions. Example: {\bf Cuma günü} tatil yapacağım.</summary> * <param name="sentence">The sentence for which TIME named entities checked.</param> */ protected abstract void AutoDetectTime(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The method should detect ORGANIZATION named entities. ORGANIZATION corresponds to companies, * teams etc. Example: {\bf IMKB} günü 60 puan yükselerek kapattı.</summary> * <param name="sentence">The sentence for which ORGANIZATION named entities checked.</param> */ protected abstract void AutoDetectOrganization(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The method should detect MONEY named entities. MONEY corresponds to monetarial * expressions. Example: Geçen gün {\bf 3000 TL} kazandık.</summary> * <param name="sentence">The sentence for which MONEY named entities checked.</param> */ protected abstract void AutoDetectMoney(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The method should detect LOCATION named entities. LOCATION corresponds to regions, * mountains, seas. Example: Ülkemizin başkenti {\bf Ankara'dır}.</summary> * <param name="sentence">The sentence for which LOCATION named entities checked.</param> */ protected abstract void AutoDetectLocation(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The method should detect PERSON named entities. PERSON corresponds to people or * characters. Example: {\bf Atatürk} yurdu düşmanlardan kurtardı.</summary> * <param name="sentence">The sentence for which PERSON named entities checked.</param> */ protected abstract void AutoDetectPerson(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The method should set all the semantic role labels in the sentence. The method assumes that the predicates * of the sentences were determined previously.</summary> * <param name="sentence">The sentence for which semantic roles will be determined automatically.</param> */ public abstract bool AutoArgument(AnnotatedSentence.AnnotatedSentence sentence);
/** * <summary> The main method to automatically disambiguate a sentence. The algorithm * 1. Disambiguates the morphological analyses with a single analysis. * 2. Disambiguates the morphological analyses in which the possible analyses contain only one * distinct root word. * 3. Disambiguates the morphological analyses where there are multiple candidate root words and * possibly multiple candidate morphological analyses for each candidate root word.</summary> * <param name="sentence">The sentence to be disambiguated automatically.</param> */ public void AutoDisambiguate(AnnotatedSentence.AnnotatedSentence sentence) { AutoDisambiguateMultipleRootWords(sentence); }
/** * <summary> The method should disambiguate morphological analyses where there are multiple candidate root words * and possibly multiple candidate morphological analyses for each candidate root word. If it finds the correct * morphological analysis of a word(s), it should set morphological analysis and metamorpheme of that(those) word(s). * To disambiguate between the root words, one can use the root word statistics.</summary> * <param name="sentence">The sentence to be disambiguated automatically.</param> */ protected abstract void AutoDisambiguateMultipleRootWords(AnnotatedSentence.AnnotatedSentence sentence);