public ParserEventStream(IObjectStream<Parse> d, AbstractHeadRules rules, ParserEventTypeEnum type) : base(d, rules, type) { buildContextGenerator = new BuildContextGenerator(); attachContextGenerator = new AttachContextGenerator(Punctuation); checkContextGenerator = new CheckContextGenerator(Punctuation); }
/// <summary> /// Create an event stream based on the specified data stream of the specified type using the specified head rules. /// </summary> /// <param name="samples">A 1-parse-per-line Penn Treebank Style parse.</param> /// <param name="rules">The head rules.</param> /// <param name="eType">The type of events desired (tag, chunk, build, or check).</param> /// <param name="dictionary">A tri-gram dictionary to reduce feature generation.</param> public ParserEventStream(IObjectStream<Parse> samples, AbstractHeadRules rules, ParserEventTypeEnum eType, Dictionary.Dictionary dictionary) : base(samples, rules, eType, dictionary) { switch (eType) { case ParserEventTypeEnum.Build: bcg = new BuildContextGenerator(dictionary); break; case ParserEventTypeEnum.Check: kcg = new CheckContextGenerator(); break; } }
protected AbstractParserEventStream( IObjectStream <Parse> samples, IHeadRules headRules, ParserEventTypeEnum type, Dictionary.Dictionary dictionary) : base(samples) { Rules = headRules; Punctuation = headRules.PunctuationTags; Dictionary = dictionary; FixPossesives = false; Type = type; switch (type) { case ParserEventTypeEnum.Chunk: chunkerContextGenerator = new ChunkContextGenerator(); break; case ParserEventTypeEnum.Tag: posContextGenerator = new DefaultPOSContextGenerator(null); break; } }
/// <summary> /// Create an event stream based on the specified data stream of the specified type using the specified head rules. /// </summary> /// <param name="samples">A 1-parse-per-line Penn Treebank Style parse.</param> /// <param name="rules">The head rules.</param> /// <param name="eType">The type of events desired (tag, chunk, build, or check).</param> /// <param name="dictionary">A tri-gram dictionary to reduce feature generation.</param> public ParserEventStream(IObjectStream <Parse> samples, AbstractHeadRules rules, ParserEventTypeEnum eType, Dictionary.Dictionary dictionary) : base(samples, rules, eType, dictionary) { switch (eType) { case ParserEventTypeEnum.Build: bcg = new BuildContextGenerator(dictionary); break; case ParserEventTypeEnum.Check: kcg = new CheckContextGenerator(); break; } }
/// <summary> /// Create an event stream based on the specified data stream of the specified type using the specified head rules. /// </summary> /// <param name="samples">A 1-parse-per-line Penn Treebank Style parse.</param> /// <param name="rules">The head rules.</param> /// <param name="eType">The type of events desired (tag, chunk, build, or check).</param> public ParserEventStream(IObjectStream <Parse> samples, AbstractHeadRules rules, ParserEventTypeEnum eType) : this(samples, rules, eType, null) { }
/// <summary> /// Create an event stream based on the specified data stream of the specified type using the specified head rules. /// </summary> /// <param name="samples">A 1-parse-per-line Penn Treebank Style parse.</param> /// <param name="rules">The head rules.</param> /// <param name="eType">The type of events desired (tag, chunk, build, or check).</param> public ParserEventStream(IObjectStream<Parse> samples, AbstractHeadRules rules, ParserEventTypeEnum eType) : this(samples, rules, eType, null) {}