public EntityMentionsAnnotator(string name, Properties props) { // note: used in annotate.properties // if the user has supplied custom CoreAnnotations for the ner tags and entity mentions override the default keys try { if (props.Contains(name + ".nerCoreAnnotation")) { nerCoreAnnotationClass = (Type)Sharpen.Runtime.GetType(props.GetProperty(name + ".nerCoreAnnotation")); } if (props.Contains(name + ".nerNormalizedCoreAnnotation")) { nerNormalizedCoreAnnotationClass = (Type)Sharpen.Runtime.GetType(props.GetProperty(name + ".nerNormalizedCoreAnnotation")); } if (props.Contains(name + ".mentionsCoreAnnotation")) { mentionsCoreAnnotationClass = (Type)Sharpen.Runtime.GetType(props.GetProperty(name + ".mentionsCoreAnnotation")); } } catch (TypeLoadException e) { log.Error(e.Message); } chunkIdentifier = new LabeledChunkIdentifier(); doAcronyms = bool.ParseBoolean(props.GetProperty(name + ".acronyms", props.GetProperty("acronyms", "false"))); // set up language info, this is needed for handling creating pronominal mentions entityMentionsLanguage = LanguageInfo.GetLanguageFromString(props.GetProperty(name + ".language", "en")); }
public EntityMentionsAnnotator() { // Currently relies on NER annotations being okay // - Replace with calling NER classifiers and timeAnnotator directly // TODO: Provide properties // defaults chunkIdentifier = new LabeledChunkIdentifier(); doAcronyms = false; }