/// <summary> /// Constructor /// </summary> /// <param name="verbs">Verbs to get predicates trees for (null for all)</param> /// <param name="propBankEngine">PropBank engine to draw training predicate trees from</param> /// <param name="instanceFilter">Instance filter to apply</param> /// <param name="sections">TreeBank sections to draw instances from</param> public PropBankPredicateTreeInstanceProvider(Set <string> verbs, PropBankEngine propBankEngine, InstanceFilterDelegate instanceFilter, Set <int> sections) : base(propBankEngine, instanceFilter, sections) { Verbs = verbs; }
/// <summary> /// Constructor /// </summary> /// <param name="nouns">Nouns to get predicates trees for (null for all)</param> /// <param name="nomBankEngine">NomBank engine to draw training predicate trees from</param> /// <param name="instanceFilter">Instance filter to apply</param> /// <param name="sections">TreeBank sections to draw instances from</param> public NomBankPredicateTreeInstanceProvider(Set <string> nouns, NomBankEngine nomBankEngine, InstanceFilterDelegate instanceFilter, Set <int> sections) : base(nomBankEngine, instanceFilter, sections) { Nouns = nouns; _filteredNodes = new List <NomBankNode>(); }
/// <summary> /// Constructor /// </summary> /// <param name="labelPredicates">Whether or not to label predicates</param> /// <param name="labelSupportVerbs">Whether or not to label support verbs</param> /// <param name="autoParsedNomBankEngine">Automatically parsed version of NomBank, from which to draw parse tree structure</param> /// <param name="goldParsedNomBankEngine">Gold-parsed version of NomBank, from which to draw predicate and support verb labels. This is /// necessary because auto-parsed versions of NomBank don't include annotations for instances whose arguments cannot all be minimally /// subsumed.</param> /// <param name="instanceFilter">Instance filter to apply</param> /// <param name="sections">TreeBank sections to draw instances from (null for all sections)</param> public NomBankParseTreeInstanceProvider(bool labelPredicates, bool labelSupportVerbs, NomBankEngine autoParsedNomBankEngine, NomBankEngine goldParsedNomBankEngine, InstanceFilterDelegate instanceFilter, Set <int> sections) : base(autoParsedNomBankEngine, instanceFilter, sections) { _labelPredicates = labelPredicates; _labelSupportVerbs = labelSupportVerbs; _goldParsedNomBankEngine = goldParsedNomBankEngine; }
/// <summary> /// Constructor /// </summary> /// <param name="treeBankEngine">TreeBank engine to draw training nodes from</param> /// <param name="instanceFilter">Instance filter to apply to training instances</param> /// <param name="sections">TreeBank sections to draw instances from (null for all sections)</param> public TreeBankInstanceProvider(TreeBankEngine treeBankEngine, InstanceFilterDelegate instanceFilter, Set <int> sections) : base(instanceFilter) { _treeBankEngine = treeBankEngine; if (_treeBankEngine == null) { throw new Exception("TreeBank engine cannot be null"); } _sections = sections; if (_sections != null && _sections.Count == 0) { throw new Exception("It makes no sense to restrict TreeBank training sections to the empty set"); } }
/// <summary> /// Constructor /// </summary> /// <param name="treeBankEngine">TreeBank engine to draw parse tree nodes from</param> /// <param name="instanceFilter">Instance filter to apply to nodes</param> /// <param name="sections">Sections to draw nodes from</param> public TreeBankParseTreeInstanceProvider(TreeBankEngine treeBankEngine, InstanceFilterDelegate instanceFilter, Set <int> sections) : base(treeBankEngine, instanceFilter, sections) { }