ABB.Swum.UnigramSwumBuilder.DefineRuleSet C# (CSharp) Метод

DefineRuleSet() защищенный Метод

Initializes the builder's rule list to a defined set of Rule objects.
protected DefineRuleSet ( ) : void
Результат void
        protected override void DefineRuleSet()
        {
            if (this.PosData == null) { throw new InvalidOperationException("PosData must not be null when calling this method."); }
            if (this.Tagger == null) { throw new InvalidOperationException("Tagger must not be null when calling this method."); }
            if (this.Splitter == null) { throw new InvalidOperationException("Splitter must not be null when calling this method."); }

            var ruleList = new List<SwumRule>();
            ruleList.Add(new FieldRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new ConstructorRule(this.PosData, this.Tagger, this.Splitter)); //must be first because rest process preamble?
            ruleList.Add(new DestructorRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new EmptyNameRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new CheckerRule(this.PosData, this.Tagger, this.Splitter)); //for now follows base verb rule
            ruleList.Add(new SpecialCaseRule(this.PosData, this.Tagger, this.Splitter)); //for now follows base verb rule
            ruleList.Add(new ReactiveRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new EventHandlerRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new NounPhraseRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new LeadingPrepositionRule(this.PosData, this.Tagger, this.Splitter));
            ruleList.Add(new NonBaseVerbRule(this.PosData, this.Tagger, this.Splitter)); //for now follows base verb rule
            ruleList.Add(new DefaultBaseVerbRule(this.PosData, this.Tagger, this.Splitter));

            this.Rules = ruleList;
        }
    }