/// <exception cref="System.TypeLoadException"/> /// <exception cref="System.IO.IOException"/> public DocumentMaker(Properties props, Dictionaries dictionaries) { this.props = props; this.dict = dictionaries; reader = GetDocumentReader(props); headFinder = CorefProperties.GetHeadFinder(props); md = CorefProperties.UseGoldMentions(props) ? new RuleBasedCorefMentionFinder(headFinder, props) : null; }
public CorefMentionAnnotator(Properties props) { try { corefProperties = props; //System.out.println("corefProperties: "+corefProperties); dictionaries = new Dictionaries(props); //System.out.println("got dictionaries"); headFinder = CorefProperties.GetHeadFinder(props); //System.out.println("got head finder"); md = GetMentionFinder(props, headFinder); log.Info("Using mention detector type: " + mdName); Sharpen.Collections.AddAll(mentionAnnotatorRequirements, Arrays.AsList(typeof(CoreAnnotations.TokensAnnotation), typeof(CoreAnnotations.SentencesAnnotation), typeof(CoreAnnotations.PartOfSpeechAnnotation), typeof(CoreAnnotations.NamedEntityTagAnnotation ), typeof(CoreAnnotations.EntityTypeAnnotation), typeof(CoreAnnotations.IndexAnnotation), typeof(CoreAnnotations.TextAnnotation), typeof(CoreAnnotations.ValueAnnotation), typeof(SemanticGraphCoreAnnotations.BasicDependenciesAnnotation), typeof( SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation))); } catch (Exception e) { log.Info("Error with building coref mention annotator!"); log.Info(e); } }