public override MorphoFeatures StrToFeatures(string spec) { MorphoFeatures feats = new MorphoFeatures(); //Usually this is the boundary symbol if (spec == null || spec.Equals(string.Empty)) { return(feats); } bool isOtherActive = IsActive(MorphoFeatureSpecification.MorphoFeatureType.Other); if (spec.StartsWith("ADV")) { feats.SetAltTag("ADV"); if (spec.Contains("int")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "advint"); } feats.SetAltTag("ADVWH"); } } else { if (spec.StartsWith("A")) { feats.SetAltTag("ADJ"); if (spec.Contains("int")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "adjint"); } feats.SetAltTag("ADJWH"); } AddPhiFeatures(feats, spec); } else { if (spec.Equals("CC") || spec.Equals("C-C")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Cc"); } feats.SetAltTag("CC"); } else { if (spec.Equals("CS") || spec.Equals("C-S")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Cs"); } feats.SetAltTag("CS"); } else { if (spec.StartsWith("CL")) { feats.SetAltTag("CL"); if (spec.Contains("suj") || spec.Equals("CL-S-3fp")) { //"CL-S-3fp" is equivalent to suj if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Sbj"); } feats.SetAltTag("CLS"); } else { if (spec.Contains("obj")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Obj"); } feats.SetAltTag("CLO"); } else { if (spec.Contains("refl")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Rfl"); } feats.SetAltTag("CLR"); } } } AddPhiFeatures(feats, spec); } else { if (spec.StartsWith("D")) { feats.SetAltTag("DET"); if (spec.Contains("int")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "dint"); } feats.SetAltTag("DETWH"); } AddPhiFeatures(feats, spec); } else { if (spec.StartsWith("N")) { feats.SetAltTag("N"); //TODO These are usually N-card...make these CD? if (spec.Contains("P")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Np"); } feats.SetAltTag("NPP"); } else { if (spec.Contains("C")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Nc"); } feats.SetAltTag("NC"); } } AddPhiFeatures(feats, spec); } else { if (spec.StartsWith("PRO")) { feats.SetAltTag("PRO"); if (spec.Contains("int")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Ni"); } feats.SetAltTag("PROWH"); } else { if (spec.Contains("rel")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Nr"); } feats.SetAltTag("PROREL"); } } AddPhiFeatures(feats, spec); } else { if (spec.StartsWith("V")) { feats.SetAltTag("V"); if (spec.Contains("Y")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Vp"); } feats.SetAltTag("VIMP"); } else { if (spec.Contains("W")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Vf"); } feats.SetAltTag("VINF"); } else { if (spec.Contains("S") || spec.Contains("T")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Vs"); } feats.SetAltTag("VS"); } else { if (spec.Contains("K")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Vp"); } feats.SetAltTag("VPP"); } else { if (spec.Contains("G")) { if (isOtherActive) { feats.AddFeature(MorphoFeatureSpecification.MorphoFeatureType.Other, "Vr"); } feats.SetAltTag("VPR"); } } } } } AddPhiFeatures(feats, spec); } else { if (spec.Equals("P") || spec.Equals("I")) { feats.SetAltTag(spec); } } } } } } } } } } // else { // log.info("Could not map spec: " + spec); // } return(feats); }