예제 #1
0
		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);
			}
		}
예제 #2
0
		public override void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output)
		{
			if (m_currentAnalysisPruleTrace != null)
			{
				m_currentAnalysisPruleTrace.Output = output.Clone();
				m_currentAnalysisPruleTrace = null;
			}
		}
예제 #3
0
		public override void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output)
		{
			if (m_currentAnalysisPruleTrace != null)
			{
				m_currentAnalysisPruleTrace.Add(Write("Output", output));
				m_currentAnalysisPruleTrace = null;
			}
		}
예제 #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);
			}
		}
예제 #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;
                }
            }
        }
예제 #6
0
파일: Trace.cs 프로젝트: bbriggs/FieldWorks
		/// <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;
		}
예제 #7
0
 /// <summary>
 /// Adds the phonological rule.
 /// </summary>
 /// <param name="prule">The phonological rule.</param>
 public void AddPhonologicalRule(PhonologicalRule prule)
 {
     m_prules.Add(prule);
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #11
0
		public abstract void EndUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis output);
예제 #12
0
		/// <summary>
		/// Adds the phonological rule.
		/// </summary>
		/// <param name="prule">The phonological rule.</param>
		public void AddPhonologicalRule(PhonologicalRule prule)
		{
			m_prules.Add(prule);
		}
예제 #13
0
		public abstract void EndApplyPhonologicalRule(PhonologicalRule rule, WordSynthesis output);
예제 #14
0
		public abstract void BeginApplyPhonologicalRule(PhonologicalRule rule, WordSynthesis input);
예제 #15
0
파일: Trace.cs 프로젝트: bbriggs/FieldWorks
		/// <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;
		}
예제 #16
0
파일: Trace.cs 프로젝트: bbriggs/FieldWorks
		/// <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;
		}
예제 #17
0
		public abstract void BeginUnapplyPhonologicalRule(PhonologicalRule rule, WordAnalysis input);