public override void BeginUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis input) { if (IsAnalysisTracingEnabled(rule.ID)) { m_currentAnalysisPruleTrace = new PhonologicalRuleAnalysisTrace(rule, input.Clone()); ((Trace) input.CurrentTraceObject).AddChild(m_currentAnalysisPruleTrace); } }
public override void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output) { if (m_currentAnalysisPruleTrace != null) { m_currentAnalysisPruleTrace.Output = output.Clone(); m_currentAnalysisPruleTrace = null; } }
public override void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output) { if (m_currentAnalysisPruleTrace != null) { m_currentAnalysisPruleTrace.Add(Write("Output", output)); m_currentAnalysisPruleTrace = null; } }
public override void BeginUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis input) { if (IsAnalysisTracingEnabled(rule.ID)) { m_currentAnalysisPruleTrace = new XElement("PhonologicalRuleAnalysisTrace", Write("PhonologicalRule", rule)); if (WriteInputs) m_currentAnalysisPruleTrace.Add(Write("Input", input)); ((XElement) input.CurrentTraceObject).Add(m_currentAnalysisPruleTrace); } }
/// <summary> /// Turns tracing of a rule on or off. /// </summary> /// <param name="id">The rule ID.</param> /// <param name="traceAnalysis"><c>true</c> if tracing during analysis is on, <c>false</c> /// if tracing during analysis is off.</param> /// <param name="traceSynthesis"><c>true</c> if tracing during synthesis is on, <c>false</c> /// if tracing during synthesis is off.</param> public void SetTraceRule(string id, bool traceAnalysis, bool traceSynthesis) { PhonologicalRule prule = GetPhonologicalRule(id); if (prule != null) { prule.TraceAnalysis = traceAnalysis; prule.TraceSynthesis = traceSynthesis; } else { MorphologicalRule mrule = GetMorphologicalRule(id); if (mrule != null) { mrule.TraceAnalysis = traceAnalysis; mrule.TraceSynthesis = traceSynthesis; } } }
/// <summary> /// Initializes a new instance of the <see cref="PhonologicalRuleTrace"/> class. /// </summary> /// <param name="rule">The rule.</param> internal PhonologicalRuleTrace(PhonologicalRule rule) { m_rule = rule; }
/// <summary> /// Adds the phonological rule. /// </summary> /// <param name="prule">The phonological rule.</param> public void AddPhonologicalRule(PhonologicalRule prule) { m_prules.Add(prule); }
/// <summary> /// Initializes a new instance of the <see cref="PhonologicalRuleSynthesisTrace"/> class. /// </summary> /// <param name="rule">The rule.</param> /// <param name="input">The input.</param> internal PhonologicalRuleSynthesisTrace(PhonologicalRule rule, WordSynthesis input) : base(rule) { m_input = input; }
/// <summary> /// Initializes a new instance of the <see cref="PhonologicalRuleAnalysisTrace"/> class. /// </summary> /// <param name="rule">The rule.</param> /// <param name="input">The input.</param> internal PhonologicalRuleAnalysisTrace(PhonologicalRule rule, WordAnalysis input) : base(rule) { m_input = input; }
public abstract void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output);
public abstract void EndApplyPhonologicalRule(PhonologicalRule rule, WordSynthesis output);
public abstract void BeginApplyPhonologicalRule(PhonologicalRule rule, WordSynthesis input);
public abstract void BeginUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis input);