public void PhonologicalRuleNotUnapplied(IPhonologicalRule rule, int subruleIndex, Word input) { ((XElement)input.CurrentTrace).Add(new XElement("PhonologicalRuleAnalysisTrace", CreateHCRuleElement("PhonologicalRule", rule), CreateWordElement("Input", input, true), CreateWordElement("Output", input, true))); }
public void PhonologicalRuleNotUnapplied(IPhonologicalRule rule, int subruleIndex, Word input) { ((XElement) input.CurrentTrace).Add(new XElement("PhonologicalRuleAnalysisTrace", CreateHCRuleElement("PhonologicalRule", rule), CreateWordElement("Input", input, true), CreateWordElement("Output", input, true))); }
public void PhonologicalRuleApplied(IPhonologicalRule rule, int subruleIndex, Word input, Word output) { ((XElement)output.CurrentTrace).Add(new XElement("PhonologicalRuleSynthesisTrace", CreateHCRuleElement("PhonologicalRule", rule), CreateWordElement("Input", input, false), CreateWordElement("Output", output, false))); }
public void PhonologicalRuleNotApplied(IPhonologicalRule rule, int subruleIndex, Word input, FailureReason reason, object failureObj) { var pruleTrace = new XElement("PhonologicalRuleSynthesisTrace", CreateHCRuleElement("PhonologicalRule", rule), CreateWordElement("Input", input, false), CreateWordElement("Output", input, false)); var rewriteRule = rule as RewriteRule; if (rewriteRule != null) { RewriteSubrule sr = rewriteRule.Subrules[subruleIndex]; switch (reason) { case FailureReason.RequiredSyntacticFeatureStruct: pruleTrace.Add(new XElement("FailureReason", new XAttribute("type", "category"), new XElement("Category", input.SyntacticFeatureStruct.PartsOfSpeech().FirstOrDefault()), new XElement("RequiredCategories", sr.RequiredSyntacticFeatureStruct.PartsOfSpeech() .Select(pos => new XElement("Category", pos))))); break; case FailureReason.RequiredMprFeatures: pruleTrace.Add(CreateMprFeaturesFailureElement(true, (MprFeatureGroup)failureObj, sr.RequiredMprFeatures, input)); break; case FailureReason.ExcludedMprFeatures: pruleTrace.Add(CreateMprFeaturesFailureElement(false, (MprFeatureGroup)failureObj, sr.ExcludedMprFeatures, input)); break; } } ((XElement)input.CurrentTrace).Add(pruleTrace); }
public void PhonologicalRuleNotUnapplied(IPhonologicalRule rule, int subruleIndex, Word input) { ((Trace)input.CurrentTrace).Children.Add(new Trace(TraceType.PhonologicalRuleAnalysis, rule) { SubruleIndex = subruleIndex, Input = input.DeepClone() }); }
public void PhonologicalRuleNotApplied(IPhonologicalRule rule, int subruleIndex, Word input, FailureReason reason, object failureObj) { ((Trace)input.CurrentTrace).Children.Add(new Trace(TraceType.PhonologicalRuleSynthesis, rule) { SubruleIndex = subruleIndex, Input = input.DeepClone(), FailureReason = reason }); }
public void PhonologicalRuleApplied(IPhonologicalRule rule, int subruleIndex, Word input, Word output) { ((Trace)output.CurrentTrace).Children.Add(new Trace(TraceType.PhonologicalRuleSynthesis, rule) { SubruleIndex = subruleIndex, Input = input, Output = output.DeepClone() }); }
public void PhonologicalRuleNotApplied(IPhonologicalRule rule, int subruleIndex, Word input, FailureReason reason, object failureObj) { var pruleTrace = new XElement("PhonologicalRuleSynthesisTrace", CreateHCRuleElement("PhonologicalRule", rule), CreateWordElement("Input", input, false), CreateWordElement("Output", input, false)); var rewriteRule = rule as RewriteRule; if (rewriteRule != null) { RewriteSubrule sr = rewriteRule.Subrules[subruleIndex]; switch (reason) { case FailureReason.RequiredSyntacticFeatureStruct: pruleTrace.Add(new XElement("FailureReason", new XAttribute("type", "category"), new XElement("Category", (FeatureSymbol) input.SyntacticFeatureStruct.GetValue<SymbolicFeatureValue>("pos")), new XElement("RequiredCategories", sr.RequiredSyntacticFeatureStruct.GetValue<SymbolicFeatureValue>("pos") .Values.Select(pos => new XElement("Category", pos))))); break; case FailureReason.RequiredMprFeatures: pruleTrace.Add(CreateMprFeaturesFailureElement(true, (MprFeatureGroup) failureObj, sr.RequiredMprFeatures, input)); break; case FailureReason.ExcludedMprFeatures: pruleTrace.Add(CreateMprFeaturesFailureElement(false, (MprFeatureGroup) failureObj, sr.ExcludedMprFeatures, input)); break; } } ((XElement) input.CurrentTrace).Add(pruleTrace); }
public void PhonologicalRuleApplied(IPhonologicalRule rule, int subruleIndex, Word input, Word output) { ((XElement) output.CurrentTrace).Add(new XElement("PhonologicalRuleSynthesisTrace", CreateHCRuleElement("PhonologicalRule", rule), CreateWordElement("Input", input, false), CreateWordElement("Output", output, false))); }
public void PhonologicalRuleUnapplied(IPhonologicalRule rule, int subruleIndex, Word input, Word output) { ((Trace) output.CurrentTrace).Children.Add(new Trace(TraceType.PhonologicalRuleAnalysis, rule) {SubruleIndex = subruleIndex, Input = input, Output = output.DeepClone()}); }
public void PhonologicalRuleNotApplied(IPhonologicalRule rule, int subruleIndex, Word input, FailureReason reason, object failureObj) { ((Trace) input.CurrentTrace).Children.Add(new Trace(TraceType.PhonologicalRuleSynthesis, rule) {SubruleIndex = subruleIndex, Input = input.DeepClone(), FailureReason = reason}); }