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;
			}
		}
Example #3
0
		public override void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output)
		{
			if (m_currentAnalysisPruleTrace != null)
			{
				m_currentAnalysisPruleTrace.Add(Write("Output", output));
				m_currentAnalysisPruleTrace = null;
			}
		}
Example #4
0
		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);
			}
		}
Example #5
0
        /// <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;
                }
            }
        }
Example #6
0
		/// <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;
		}
Example #7
0
 /// <summary>
 /// Adds the phonological rule.
 /// </summary>
 /// <param name="prule">The phonological rule.</param>
 public void AddPhonologicalRule(PhonologicalRule prule)
 {
     m_prules.Add(prule);
 }
Example #8
0
 /// <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;
 }
Example #9
0
 /// <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;
 }
Example #10
0
 /// <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;
 }
Example #11
0
		public abstract void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output);
Example #12
0
		/// <summary>
		/// Adds the phonological rule.
		/// </summary>
		/// <param name="prule">The phonological rule.</param>
		public void AddPhonologicalRule(PhonologicalRule prule)
		{
			m_prules.Add(prule);
		}
Example #13
0
		public abstract void EndApplyPhonologicalRule(PhonologicalRule rule, WordSynthesis output);
Example #14
0
		public abstract void BeginApplyPhonologicalRule(PhonologicalRule rule, WordSynthesis input);
Example #15
0
		/// <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;
		}
Example #16
0
		/// <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;
		}
Example #17
0
		public abstract void BeginUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis input);