コード例 #1
0
ファイル: Trace.cs プロジェクト: bbriggs/FieldWorks
		/// <summary>
		/// Initializes a new instance of the <see cref="BlockingTrace"/> class.
		/// </summary>
		/// <param name="mprFeatureType">Type: required or excluded.</param>
		/// <param name="mprFeatures">The set of MPR features the form has.</param>
		/// <param name="constrainingMPRFeatures">The set of MPR features the form must have (required) or must not have (excluded).</param>
		internal PhonologicalRuleSynthesisMPRFeaturesTrace(MPRFeaturesType mprFeatureType,
			MPRFeatureSet mprFeatures, MPRFeatureSet constrainingMPRFeatures)
		{
			m_mprFeatureType = mprFeatureType;
			m_mprFeatures = mprFeatures;
			m_constrainingMPRFeatures = constrainingMPRFeatures;
		}
コード例 #2
0
		public override void PhonologicalRuleNotApplicableMPRFeatures(MPRFeaturesType type, WordSynthesis input, MPRFeatureSet mprFeatures)
		{
			if (m_currentSynthesisPruleTrace != null)
				m_currentSynthesisPruleTrace.AddChild(new PhonologicalRuleSynthesisMPRFeaturesTrace(type, input.MPRFeatures, mprFeatures));
		}
コード例 #3
0
ファイル: TraceManager.cs プロジェクト: bbriggs/FieldWorks
		public abstract void PhonologicalRuleNotApplicableMPRFeatures(MPRFeaturesType type, WordSynthesis input, MPRFeatureSet mprFeatures);
コード例 #4
0
ファイル: XmlTraceManager.cs プロジェクト: bbriggs/FieldWorks
		public override void PhonologicalRuleNotApplicableMPRFeatures(MPRFeaturesType type, WordSynthesis input, MPRFeatureSet mprFeatures)
		{
			if (m_currentSynthesisPruleTrace != null)
			{
				m_currentSynthesisPruleTrace.Add(new XElement("PhonologicalRuleSynthesisMPRFeaturesTrace", new XAttribute("type", type == MPRFeaturesType.EXCLUDED ? "excluded" : "required"),
					new XElement("PhonologicalRuleMPRFeatures", input.MPRFeatures.Select(f => Write("PhonologicalRuleMPRFeature", f))),
					new XElement("PhonologicalRuleConstrainingMPRFeatrues", mprFeatures.Select(f => Write("PhonologicalRuleMPRFeature", f)))));
			}
		}
コード例 #5
0
ファイル: XmlLoader.cs プロジェクト: sillsdev/WorldPad
		MPRFeatureSet LoadMPRFeatures(string mprFeatIdsStr)
		{
			if (string.IsNullOrEmpty(mprFeatIdsStr))
				return null;

			MPRFeatureSet result = new MPRFeatureSet();
			string[] mprFeatIds = mprFeatIdsStr.Split(' ');
			foreach (string mprFeatId in mprFeatIds)
			{
				MPRFeature mprFeat = m_curMorpher.GetMPRFeature(mprFeatId);
				if (mprFeat == null)
					throw CreateUndefinedObjectException(string.Format(HCStrings.kstidUnknownMPRFeat, mprFeatId), mprFeatId);
				result.Add(mprFeat);
			}
			return result;
		}