diff --git a/DistFiles/Language Explorer/Export Templates/Discourse/Discourse2XLingPaper.xsl b/DistFiles/Language Explorer/Export Templates/Discourse/Discourse2XLingPaper.xsl index 8b75ccee89..c6c47cb41a 100644 --- a/DistFiles/Language Explorer/Export Templates/Discourse/Discourse2XLingPaper.xsl +++ b/DistFiles/Language Explorer/Export Templates/Discourse/Discourse2XLingPaper.xsl @@ -66,7 +66,14 @@ Main template - + + + + + + + + - + + + + + + + + + << + + + >> + + + + @@ -207,7 +282,31 @@ Main template - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DistFiles/Language Explorer/Export Templates/Discourse/XLingPaper.xml b/DistFiles/Language Explorer/Export Templates/Discourse/XLingPaper.xml index ab81e829bd..2371a07388 100644 --- a/DistFiles/Language Explorer/Export Templates/Discourse/XLingPaper.xml +++ b/DistFiles/Language Explorer/Export Templates/Discourse/XLingPaper.xml @@ -1,6 +1,5 @@ -

Export the discourse chart to a basic XLingPaper document which can then be used to cut and paste into another XLingPaper document. XLingPaper is a way to write linguistic papers using XML technologies.

-

Some of us like using the freely available XMLmind XML Editor with the XLingPaper configuration files for XMLmind to do this editing. See - https://software.sil.org/xlingpaper/

+

Export the discourse chart to a basic XLingPaper document which can then be used to cut and paste into another XLingPaper document.

+

XLingPaper is a way to write linguistic papers using XML technologies. Some of us like using the freely available XMLmind XML Editor with the XLingPaper configuration files for XMLmind to do this editing. See http://software.sil.org/xlingpaper/.

diff --git a/DistFiles/Language Explorer/Export Templates/Interlinear/xml2XLingPapAllCommon.xsl b/DistFiles/Language Explorer/Export Templates/Interlinear/xml2XLingPapAllCommon.xsl index e78fb2256d..6a0b611955 100644 --- a/DistFiles/Language Explorer/Export Templates/Interlinear/xml2XLingPapAllCommon.xsl +++ b/DistFiles/Language Explorer/Export Templates/Interlinear/xml2XLingPapAllCommon.xsl @@ -233,17 +233,14 @@ --> - - - - - - - - - + + + + + + + + diff --git a/Src/LexText/Interlinear/ChooseAnalysisHandler.cs b/Src/LexText/Interlinear/ChooseAnalysisHandler.cs index bdb5f82c6f..c83feb2268 100644 --- a/Src/LexText/Interlinear/ChooseAnalysisHandler.cs +++ b/Src/LexText/Interlinear/ChooseAnalysisHandler.cs @@ -296,7 +296,7 @@ public void SetupCombo() } } - // Add option to clear the analysis altogeter. + // Add option to clear the analysis altogether. AddItem(wordform, MakeSimpleString(ITextStrings.ksNewAnalysis), false, WfiWordformTags.kClassId); // Add option to reset to the default AddItem(null, MakeSimpleString(ITextStrings.ksUseDefaultAnalysis), false); @@ -374,7 +374,6 @@ internal static ITsString MakeAnalysisStringRep(IWfiAnalysis wa, LcmCache fdoCac ITsTextProps formTextProperties = FormTextProperties(fdoCache, fUseStyleSheet, wsVern); ITsTextProps glossTextProperties = GlossTextProperties(fdoCache, true, fUseStyleSheet); ITsStrBldr tsb = TsStringUtils.MakeStrBldr(); - ISilDataAccess sda = fdoCache.MainCacheAccessor; int cmorph = wa.MorphBundlesOS.Count; if (cmorph == 0) return TsStringUtils.MakeString(ITextStrings.ksNoMorphemes, fdoCache.DefaultUserWs); @@ -436,7 +435,12 @@ internal static ITsString MakeAnalysisStringRep(IWfiAnalysis wa, LcmCache fdoCac if (sense != null) { ITsString tssGloss = sense.Gloss.get_String(fdoCache.DefaultAnalWs); - tsb.Replace(ichMinSense, ichMinSense, tssGloss.Text, glossTextProperties); + var inflType = mb.InflTypeRA; + var glossAccessor = sense.Gloss; + var wsAnalysis = fdoCache.ServiceLocator.WritingSystemManager.Get(fdoCache.DefaultAnalWs); + var tssSense = MorphServices.MakeGlossOptionWithInflVariantTypes(inflType, glossAccessor, wsAnalysis); + var displayText = tssSense?.Text ?? tssGloss.Text; + tsb.Replace(ichMinSense, ichMinSense, displayText, glossTextProperties); } else tsb.Replace(ichMinSense, ichMinSense, ksMissingString, glossTextProperties); @@ -569,6 +573,7 @@ public void Activate(Rect loc) combo.Location = new System.Drawing.Point(loc.left, loc.top); // 21 is the default height of a combo, the smallest reasonable size. combo.Size = new System.Drawing.Size(Math.Max(loc.right - loc.left + 30, 200), Math.Max( loc.bottom - loc.top, 50)); + if (!m_owner.Controls.Contains(combo)) m_owner.Controls.Add(combo); } diff --git a/Src/LexText/ParserCore/HCLoader.cs b/Src/LexText/ParserCore/HCLoader.cs index 25242c9ee3..2ccbcde8fe 100644 --- a/Src/LexText/ParserCore/HCLoader.cs +++ b/Src/LexText/ParserCore/HCLoader.cs @@ -1159,7 +1159,8 @@ private AffixProcessAllomorph LoadAffixProcessAllomorph(IMoAffixProcess allo) IPhCode code = termUnit.CodesOS[0]; string strRep = termUnit.ClassID == PhBdryMarkerTags.kClassId ? code.Representation.BestVernacularAlternative.Text : code.Representation.VernacularDefaultWritingSystem.Text; - strRep = strRep.Trim(); + if (strRep != null) + strRep = strRep.Trim(); if (string.IsNullOrEmpty(strRep)) throw new InvalidAffixProcessException(allo, false); sb.Append(strRep); @@ -2344,7 +2345,7 @@ private void LoadCharacterDefinitionTable(IPhPhonemeSet phonemeSet) } } - m_null = m_table.AddBoundary(new[] {"^0", "*0", "&0", "Ø", "∅"}); + m_null = m_table.AddBoundary(new[] {"^0", "*0", "&0", "∅"}); m_table.AddBoundary("."); m_morphBdry = m_table["+"]; diff --git a/Src/LexText/ParserCore/HCParser.cs b/Src/LexText/ParserCore/HCParser.cs index ad025e9bdc..a1f08afd7f 100644 --- a/Src/LexText/ParserCore/HCParser.cs +++ b/Src/LexText/ParserCore/HCParser.cs @@ -235,6 +235,33 @@ public void WriteDataIssues(XElement elem) writer.WriteEndElement(); } } + foreach (IPhPhoneme phone in m_cache.LangProject.PhonologicalDataOA.PhonemeSetsOS[0].PhonemesOC) + { + foreach (IPhCode code in phone.CodesOS) + { + if (code != null && code.Representation != null) + { + var grapheme = code.Representation.BestVernacularAlternative.Text; + // Check for empty graphemes/codes whcih can cause a crash; see https://jira.sil.org/browse/LT-21589 + if (String.IsNullOrEmpty(grapheme) || grapheme == "***") + { + writer.WriteStartElement("EmptyGrapheme"); + writer.WriteElementString("Phoneme", phone.Name.BestVernacularAnalysisAlternative.Text); + writer.WriteEndElement(); + } + else + // Check for '[' and ']' which can cause a mysterious message in Try a Word + if (grapheme.Contains("[") || grapheme.Contains("]")) + { + writer.WriteStartElement("NoBracketsAsGraphemes"); + writer.WriteElementString("Grapheme", grapheme); + writer.WriteElementString("Phoneme", phone.Name.BestVernacularAnalysisAlternative.Text); + writer.WriteElementString("Bracket", grapheme); + writer.WriteEndElement(); + } + } + } + } writer.WriteEndElement(); } } diff --git a/Src/LexText/ParserCore/ParserCoreTests/HCLoaderTests.cs b/Src/LexText/ParserCore/ParserCoreTests/HCLoaderTests.cs index 8376b88fd3..43e0770597 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/HCLoaderTests.cs +++ b/Src/LexText/ParserCore/ParserCoreTests/HCLoaderTests.cs @@ -25,8 +25,8 @@ namespace SIL.FieldWorks.WordWorks.Parser [TestFixture] public class HCLoaderTests : MemoryOnlyBackendProviderRestoredForEachTestTestBase { - private const string PrefixNull = "([StrRep:{\"&0\", \"*0\", \"^0\", \"∅\", \"Ø\"}, Type:boundary][StrRep:\"+\", Type:boundary])*"; - private const string SuffixNull = "([StrRep:\"+\", Type:boundary][StrRep:{\"&0\", \"*0\", \"^0\", \"∅\", \"Ø\"}, Type:boundary])*"; + private const string PrefixNull = "([StrRep:{\"&0\", \"*0\", \"^0\", \"∅\"}, Type:boundary][StrRep:\"+\", Type:boundary])*"; + private const string SuffixNull = "([StrRep:\"+\", Type:boundary][StrRep:{\"&0\", \"*0\", \"^0\", \"∅\"}, Type:boundary])*"; private const string AnyPlus = PrefixNull + "ANY+" + SuffixNull; private const string AnyStar = PrefixNull + "ANY*" + SuffixNull; private const string VowelFS = "[cons:-, Type:segment, voc:+]"; diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/AffixAlloFeatsAdCtl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/AffixAlloFeatsAdCtl.txt index 07c4bb155c..90b88fb9f5 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/AffixAlloFeatsAdCtl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/AffixAlloFeatsAdCtl.txt @@ -24,6 +24,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -37,6 +38,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/CliticAdCtl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/CliticAdCtl.txt index 4bf607418e..0e14d3ee57 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/CliticAdCtl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/CliticAdCtl.txt @@ -47,6 +47,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -60,6 +61,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/IrregularlyInflectedFormsAdCtl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/IrregularlyInflectedFormsAdCtl.txt index 53b0973893..ccf7b9bcbe 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/IrregularlyInflectedFormsAdCtl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/IrregularlyInflectedFormsAdCtl.txt @@ -24,6 +24,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -37,6 +38,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/LatinAdCtl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/LatinAdCtl.txt index 6942ad32b1..26f10061cd 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/LatinAdCtl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/LatinAdCtl.txt @@ -24,6 +24,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -37,6 +38,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/Orizabaadctl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/Orizabaadctl.txt index ab7ae6dbec..18b54b1799 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/Orizabaadctl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/Orizabaadctl.txt @@ -55,6 +55,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -68,6 +69,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/QuechuaMYLadctl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/QuechuaMYLadctl.txt index 14682ecb8b..bb75571cc1 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/QuechuaMYLadctl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/QuechuaMYLadctl.txt @@ -81,6 +81,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -94,6 +95,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemName3adctl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemName3adctl.txt index 29d0037f18..870c86cd60 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemName3adctl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemName3adctl.txt @@ -28,6 +28,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -41,6 +42,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemNameTestAdCtl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemNameTestAdCtl.txt index 6ff09a5af0..b503c7d38d 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemNameTestAdCtl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/StemNameTestAdCtl.txt @@ -48,6 +48,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -61,6 +62,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/TestAdCtl.txt b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/TestAdCtl.txt index 7f71128e2c..50815e4e2c 100644 --- a/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/TestAdCtl.txt +++ b/Src/LexText/ParserCore/ParserCoreTests/M3ToXAmpleTransformerTestsDataFiles/TestAdCtl.txt @@ -51,6 +51,7 @@ ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -64,6 +65,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/M3FXTRequiredOptionalPrefixSlots.xml b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/M3FXTRequiredOptionalPrefixSlots.xml new file mode 100644 index 0000000000..52837a4492 --- /dev/null +++ b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/M3FXTRequiredOptionalPrefixSlots.xml @@ -0,0 +1,1074 @@ + + + + Adverb + An adverb, narrowly defined, is a part of speech whose members modify verbs for such categories as time, manner, place, or direction. An adverb, broadly defined, is a part of speech whose members modify any constituent class of words other than nouns, such as verbs, adjectives, adverbs, phrases, clauses, or sentences. Under this definition, the possible type of modification depends on the class of the constituent being modified. + adv + 0 + + + + + + + + + Noun + A noun is a broad classification of parts of speech which include substantives and nominals. + n + 5 + + + + + + + + + Pro-form + A pro-form is a part of speech whose members usually substitute for other constituents, including phrases, clauses, or sentences, and whose meaning is recoverable from the linguistic or extralinguistic context. + pro-form + 0 + + + + + + + + + + Pronoun + A pronoun is a pro-form which functions like a noun and substitutes for a noun or noun phrase. + pro + 0 + + + + + + + + + Verb + A verb is a part of speech whose members typically signal events and actions; constitute, singly or in a phrase, a minimal predicate in a clause; govern the number and types of other constituents which may occur in the clause; and, in inflectional languages, may be inflected for tense, aspect, voice, modality, or agreement with other constituents in person, number, or grammatical gender. + v + 8 + + + PERSNUMABS + *** + + SP2 + SP2 + + + + PFV + *** + + SP1 + SP1 + + + + CAUS + *** + + PP1 + PP1 + + + + PERSNUMERG + *** + + PP2 + PP2 + + + + + + verb + *** + + + + + + + + + + + + + + + + + Consonants + Consonants + C + + + + + + + + + + + + + + + + + + + + + Vowels + Vowels + V + + + + + + + + + + + Main phoneme set + Main phoneme set + + + a + low central unrounded vowel + + + a + + + + + + + b + voiced bilabial stop + + + b + + + + + + + d + voiced alveolar stop + + + d + + + + + + + e + mid front unrounded vowel + + + e + + + + + + + f + voiceless labiodental fricative + + + f + + + + + + + g + voiced velar stop + + + g + + + + + + + i + high front unrounded vowel + + + i + + + + + + + j + palatal approximant + + + j + + + + + + + k + voiceless velar stop + + + k + + + + + + + l + alveolar lateral + + + l + + + + + + + m + bilabial nasal + + + m + + + + + + + n + alveolar nasal + + + n + + + + + + + o + mid back rounded vowel + + + o + + + + + + + p + voiceless bilabial stop + + + p + + + + + + + r + alveolar flap + + + r + + + + + + + s + voiceless alveolar fricative + + + s + + + + + + + t + voiceless alveolar stop + + + t + + + + + + + u + high back rounded vowel + + + u + + + + + + + v + voiced labiodental fricative + + + v + + + + + + + w + labiovelar approximant + + + w + + + + + + + x + voiceless velar fricative + + + x + + + + + + + z + voiced alveolar fricative + + + z + + + + + + + ŋ + velar nasal + + + ŋ + + + + + + + + + + + + + + + + + + + # + + + # + + + + + + + + + + + + + + + + + + + + 5 + 1 + 5 + 0 + 1 + 10 + + + + + + + + + discontiguous phrase + dis phr + A discontiguous phrase has discontiguous constituents which (a) are separated from each other by one or more intervening constituents, and (b) are considered either (i) syntactically contiguous and unitary, or (ii) realizing the same, single meaning. An example is French ne...pas. + 0 + + + infixing interfix + ifxnfx + An infixing interfix is an infix that can occur between two roots or stems. + 0 + + + suffixing interfix + sfxnfx + A suffixing interfix is a suffix that can occur between two roots or stems. + 0 + + + particle + part + A particle is a word that does not belong to one of the main classes of words, is invariable in form, and typically has grammatical or pragmatic meaning. + 0 + + + phrase + phr + A phrase is a syntactic structure that consists of more than one word but lacks the subject-predicate organization of a clause. + 0 + + + prefixing interfix + pfxnfx + A prefixing interfix is a prefix that can occur between two roots or stems. + 0 + + + clitic + clit + A clitic is a morpheme that has syntactic characteristics of a word, but shows evidence of being phonologically bound to another word. Orthographically, it stands alone. + 0 + + + infix + ifx + An infix is an affix that is inserted within a root or stem. + 0 + + + prefix + pfx + A prefix is an affix that is joined before a root or stem. + 2 + + + simulfix + smfx + A simulfix is a change or replacement of vowels or consonants (usually vowels) which changes the meaning of a word. (Note: the parser does not currently handle simulfixes.) + 0 + + + suffix + sfx + A suffix is an affix that is attached to the end of a root or stem. + 4 + + + suprafix + spfx + A suprafix is a kind of affix in which a suprasegmental is superimposed on one or more syllables of the root or stem, signalling a particular morphosyntactic operation. (Note: the parser does not currently handle suprafixes.) + 0 + + + circumfix + cfx + A circumfix is an affix made up of two separate parts which surround and attach to a root or stem. + 0 + + + enclitic + enclit + An enclitic is a clitic that is phonologically joined at the end of a preceding word to form a single unit. Orthographically, it may attach to the preceding word. + 0 + + + proclitic + proclit + A proclitic is a clitic that precedes the word to which it is phonologically joined. Orthographically, it may attach to the following word. + 0 + + + bound root + bd root + A bound root is a root which cannot occur as a separate word apart from any other morpheme. + 0 + + + root + ubd root + A root is the portion of a word that (i) is common to a set of derived or inflected forms, if any, when all affixes are removed, (ii) is not further analyzable into meaningful elements, being morphologically simple, and, (iii) carries the principal portion of meaning of the words in which it functions. + 0 + + + bound stem + bd stem + A bound stem is a stem which cannot occur as a separate word apart from any other morpheme. + 0 + + + stem + ubd stem + "A stem is the root or roots of a word, together with any derivational affixes, to which inflectional affixes are added." (LinguaLinks Library). A stem "may consist solely of a single root morpheme (i.e. a 'simple' stem as in man), or of two root morphemes (e.g. a 'compound' stem, as in blackbird), or of a root morpheme plus a derivational affix (i.e. a 'complex' stem, as in manly, unmanly, manliness). All have in common the notion that it is to the stem that inflectional affixes are attached." (Crystal, 1997:362) + 21 + + + + + Irregularly Inflected Form + irreg. infl. + An Irregularly Inflected Form is an inflected form of the lexeme that is different from what you would expect from the normal rules of the grammar. + *** + .irr.infl + + + + Past + pst. + The past tense form of a verb that does not take the regular inflectional affix for past tense. + *** + .pst + + + + Plural + pl. + The plural form of a noun that does not take the regular inflectional affix for plural. + *** + .pl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LOC + *** + + + CONT + *** + + + mosquito + *** + + + possible + *** + + + all + *** + + + axe + *** + + + already + *** + + + 1PL.EX.ABS + *** + + + CAUS + *** + + + 1SG.ABS + *** + + + sleep + *** + + + child + *** + + + FUT + *** + + + go + *** + + + accompany + *** + + + down + *** + + + cause.to.know + *** + + + 2PL.ABS + *** + + + 2SG.ERG + *** + + + leave + *** + + + fall + *** + + + PFV + *** + + + servant + *** + + + buy.for + *** + + + ground + *** + + + now + *** + + + bite + *** + + + + +
manaho
+
+ +
uhase
+
+ +
di
+
+ +
malaraka
+
+ +
painsangni
+
+ +
naung
+
+ +
sabua
+
+ +
angkanna
+
+ +
menge
+
+ +
haling
+
+ +
mao
+
+ +
ana
+
+ +
dinoa
+
+ +
ngallingk
+
+ +
keki
+
+ +
kampihsi
+
+ +
leba
+
+ +
posolam
+
+ +
hahe
+
+ +
la
+
+ +
tampo
+
+ +
ang
+ +
+ +
koa
+ +
+ +
a
+ +
+ +
mi
+ +
+ +
po
+ +
+ +
u
+ +
+
+
+ + + + + + + + +
diff --git a/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/RequiredOptionalPrefixSlotsWordGrammarDebugger.xsl b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/RequiredOptionalPrefixSlotsWordGrammarDebugger.xsl new file mode 100644 index 0000000000..80b991dca4 --- /dev/null +++ b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/RequiredOptionalPrefixSlotsWordGrammarDebugger.xsl @@ -0,0 +1,2334 @@ + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A root can only be a "Partial" when its category is unknown, but the category here is ' + + '. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A stem requires an overt category, but this root has an unmarked category. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + In attaching an unclassified circumfix: + + + + + + + category + + + + unclassified + + + + + category + + + + stem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + In attaching an unclassified + : + + + + + + category + + + + unclassified + + + + + category + + + + stem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Try to build a Word analysis node on a + + + Partial + + + Full + + + analysis node. + + + + + + + + + + + + + + + The category ' + + ' requires inflection, but there was no inflection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only proclitics can be before a Word analysis node. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only enclitics can be after a Word analysis node. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + In attaching a + + : The category ( + + ) of the word is incompatible with any of the categories that the proclitic " + + " must attach to ( + + + + , + + + ). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + suffix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + Attaching the derivational + + ( + + ) + + + + derivational + + ( + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + In attaching a derivational + : + + + + + + + from category + + + + derivational + + + + + category + + + + stem + + + + + + + + + + from inflection class + + + + derivational + + + + + inflection class + + + + stem + + + + + + + + + + environment category + + + + derivational + + + + + category + + + + stem + + + + + + + + + + + + from exception feature + + + + + derivational + + + exception features + + + stem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + circumfix + + + + + + + + + + + + + + + + + + + + + + prefix + + + + + + + + + + + + + x + + + + + + + + + + + + + + + + + + + + + + + The + + ( + + ) of the + + " + + " is incompatible with the + + + ( + + ) + + of the + + . + + + + + + + + + + + + + + + + The + + + ( + + ) + + of the + + is incompatible with the + + ( + + ) of the + + : + + + + + + + + + + + + + + + + + suffix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + Tried to make the stem be uninflected, but the stem has been inflected via a template that requires more derivation. Therefore, a derivational affix or a compound rule must apply first. + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + - + + + + + + + + + 5816 + + + + + + + + + category + + v + + inflectional template + + verb + + category + + + + stem + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' + + + + + + + + + The inflectional template named 'verb' for category 'Verb' + + + inflectional prefix ( + + ) + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' + + + + + + + + + The inflectional template named 'verb' for category 'Verb' + + + inflectional suffix ( + + ) + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' + + + + + + + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because the stem was built by a template that requires more derivation and there was no intervening derivation or compounding. + + + Partial inflectional template has already been inflected. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + 5816 + + + v + + + - + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because the stem was built by a template that requires more derivation and there was no intervening derivation or compounding. + + + Partial inflectional template has already been inflected. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because in the optional prefix slot 'CAUS', the inflection class of the stem () does not match any of the inflection classes of the inflectional affix (). The inflection class of this affix is: es of this affix are: , . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because in the required prefix slot 'PERSNUMERG', the inflection class of the stem () does not match any of the inflection classes of the inflectional affix (). The inflection class of this affix is: es of this affix are: , . + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because the required prefix slot 'PERSNUMERG' was not found. + + + + + + + + + + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because in the optional suffix slot 'PFV', the inflection class of the stem () does not match any of the inflection classes of the inflectional affix (). The inflection class of this affix is: es of this affix are: , . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The inflectional template named 'verb' for category 'Verb' failed because in the optional suffix slot 'PERSNUMABS', the inflection class of the stem () does not match any of the inflection classes of the inflectional affix (). The inflection class of this affix is: es of this affix are: , . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [ + + +   + + + : + + + + + + + + + + + + + + ] + + + (none) + + + + + + + + + + + + + + + + + + + + + + + + + from exception feature + + + + + inflectional + + + exception features + + + stem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Y + + + + + + + + The + + affix allomorph ' + + ' is conditioned to only occur when the + + it attaches to has certain features, but the + + does not have them. The required features the affix must be inflected for are: + + + + + + . The inflected features for this + + are: + + + + + + . + + + + + + While the + + affix allomorph ' + + ' is not conditioned to occur when the + + it attaches to has certain features, there are other allomorphs in the entry that are so conditioned. Thus, the + + must not be inflected for certain features, but it is. The features the affix must not be inflected for are: + + + + + + and also + + + . The inflected features for this + + are: + + + + + + . + + + + + + + + + + + + + + + + + + inflectional prefix ( + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + inflectional suffix ( + + ) + + + + + + + + + + + + + + + + + + + + + + + + + Y + + + + + N + + + + + + PriorityUnionOf( + + + UnificationOf( + + + + + + + Empty + + and + + + + + Empty + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + N + + + + + + + + + + + + + + + + + + + + + + + + + + + + failed because at least one inflection feature of the is incompatible with the inflection features of the . The incompatibility is for feature . This feature for the has a value of but the corresponding feature for the has a value of . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Y + + + N + + + + + + + + + + + + + + + + + + + + + + + + + + + + Y + + + + N + + + + + + N + + + + + + + + + + N + + + Y + + + + + + \ No newline at end of file diff --git a/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/manahomiaStep00.xml b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/manahomiaStep00.xml new file mode 100644 index 0000000000..f4d8260242 --- /dev/null +++ b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/manahomiaStep00.xml @@ -0,0 +1,61 @@ + + +
manahomia
+ + + + RootPOS5816 + manaho (fall): manaho + manaho + fall + manaho + + + + + + -mi (PFV): -mi + -mi + PFV + -mi + + + + + -a (1SG.ABS): -a + -a + 1SG.ABS + -a + + + + + + A root can only be a "Partial" when its category is unknown, but the category here is 'v'. + + RootPOS5816 + manaho (fall): manaho + manaho + fall + manaho + + + + + + -mi (PFV): -mi + -mi + PFV + -mi + + + + + -a (1SG.ABS): -a + -a + 1SG.ABS + -a + + + +
\ No newline at end of file diff --git a/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/manahomiaStep01.xml b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/manahomiaStep01.xml new file mode 100644 index 0000000000..f96163ed4b --- /dev/null +++ b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingInputsAndResults/manahomiaStep01.xml @@ -0,0 +1,65 @@ + + +
manahomia
+ + + + + RootPOS5816 + manaho (fall): manaho + manaho + fall + manaho + + + + + + + -mi (PFV): -mi + -mi + PFV + -mi + + + + + -a (1SG.ABS): -a + -a + 1SG.ABS + -a + + + + + + The inflectional template named 'verb' for category 'Verb' failed because the required prefix slot 'PERSNUMERG' was not found. + + + RootPOS5816 + manaho (fall): manaho + manaho + fall + manaho + + + + + + -mi (PFV): -mi + -mi + PFV + -mi + + + + + -a (1SG.ABS): -a + -a + 1SG.ABS + -a + + + + +
\ No newline at end of file diff --git a/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingTests.cs b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingTests.cs index cefefc665e..2d8b0a568f 100644 --- a/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingTests.cs +++ b/Src/LexText/ParserUI/ParserUITests/WordGrammarDebuggingTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2017 SIL International +// Copyright (c) 2003-2024 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -34,6 +34,7 @@ public class WordGrammarDebuggingTests private XslCompiledTransform m_resultTransformAffixAlloFeats; private XslCompiledTransform m_UnificationViaXsltTransform; private XslCompiledTransform m_SameSlotTwiceTransform; + private XslCompiledTransform m_RequiredOptionalPrefixSlotsTransform; /// /// Location of test files @@ -48,6 +49,8 @@ public class WordGrammarDebuggingTests /// protected string m_sResultTransformAffixAlloFeats; /// + protected string m_sRequiredOptionalPrefixSlotsTransform; + /// protected string m_sM3FXTDump; /// protected string m_sM3FXTDumpNoCompoundRules; @@ -97,6 +100,9 @@ public void FixtureSetup() SetUpResultTransform(m_sResultTransformStemNames, out m_resultTransformStemNames); CreateResultTransform("M3FXTDumpAffixAlloFeats.xml", out m_sResultTransformAffixAlloFeats); SetUpResultTransform(m_sResultTransformAffixAlloFeats, out m_resultTransformAffixAlloFeats); + SetUpRequiredOptionalPrefixSlotsTransform(); + CreateResultTransform("M3FXTRequiredOptionalPrefixSlots.xml", out m_sRequiredOptionalPrefixSlotsTransform); + SetUpResultTransform(m_sRequiredOptionalPrefixSlotsTransform, out m_RequiredOptionalPrefixSlotsTransform); } /// ------------------------------------------------------------------------------------ @@ -119,12 +125,14 @@ public void FixtureTeardown() File.Delete(Path.Combine(m_sTempPath, "UnifyTwoFeatureStructures.xsl")); if (File.Exists(Path.Combine(m_sTempPath, "TestUnificationViaXSLT-Linux.xsl"))) File.Delete(Path.Combine(m_sTempPath, "TestUnificationViaXSLT-Linux.xsl")); + if (File.Exists(m_sRequiredOptionalPrefixSlotsTransform)) + File.Delete(m_sRequiredOptionalPrefixSlotsTransform); } #region Helper methods for setup /// ------------------------------------------------------------------------------------ /// - /// Sets the up result transform. + /// Sets up the result transform. /// /// ------------------------------------------------------------------------------------ private void SetUpResultTransform(string sResultTransform, out XslCompiledTransform resultTransform) @@ -135,7 +143,7 @@ private void SetUpResultTransform(string sResultTransform, out XslCompiledTransf /// ------------------------------------------------------------------------------------ /// - /// Sets the up unification via XSLT transform. + /// Sets up the unification via XSLT transform. /// /// ------------------------------------------------------------------------------------ private void SetUpUnificationViaXsltTransform() @@ -148,7 +156,7 @@ private void SetUpUnificationViaXsltTransform() /// ------------------------------------------------------------------------------------ /// - /// Sets the up unification via XSLT transform. + /// Sets up the same slot twice XSLT transform. /// /// ------------------------------------------------------------------------------------ private void SetUpSameSlotTwiceTransform() @@ -159,6 +167,19 @@ private void SetUpSameSlotTwiceTransform() m_SameSlotTwiceTransform.Load(sSameSlotTwiceTransform); } + /// ------------------------------------------------------------------------------------ + /// + /// Sets up the Required Optional Prefix Slots XSLT transform. + /// + /// ------------------------------------------------------------------------------------ + private void SetUpRequiredOptionalPrefixSlotsTransform() + { + string sRequiredOptionalPrefixSlotsTransform = Path.Combine(m_sTestPath, + @"RequiredOptionalPrefixSlotsWordGrammarDebugger.xsl"); + m_RequiredOptionalPrefixSlotsTransform = new XslCompiledTransform(m_fDebug); + m_RequiredOptionalPrefixSlotsTransform.Load(sRequiredOptionalPrefixSlotsTransform); + } + /// ------------------------------------------------------------------------------------ /// /// Creates a result transform. @@ -239,7 +260,6 @@ private void CheckXmlEquals(string sExpectedResultFile, string sActualResultFile sb.AppendLine(sExpectedResultFile); sb.Append("Actual file was "); sb.AppendLine(sActualResultFile); - XElement xeActual = XElement.Parse(sActual, LoadOptions.None); XElement xeExpected = XElement.Parse(sExpected, LoadOptions.None); bool ok = XmlHelper.EqualXml(xeExpected, xeActual, sb); @@ -284,6 +304,9 @@ public void StemEqualsRoot() ApplyTransform("niyaloximuraStep01.xml", "niyaloximuraStep02.xml"); // Inflectional templates ApplyTransform("biliStep00BadInflection.xml", "biliStep01BadInflection.xml"); + // required prefix slot, optional prefix slot, stem, optional suffix slots + // but no prefix is in the form + ApplyTransform("manahomiaStep00.xml", "manahomiaStep01.xml", m_RequiredOptionalPrefixSlotsTransform); } /// ------------------------------------------------------------------------------------ diff --git a/Src/LexText/ParserUI/TryAWordDlg.cs b/Src/LexText/ParserUI/TryAWordDlg.cs index 38e976a3ee..f158059a0c 100644 --- a/Src/LexText/ParserUI/TryAWordDlg.cs +++ b/Src/LexText/ParserUI/TryAWordDlg.cs @@ -410,6 +410,8 @@ private void m_tryItButton_Click(object sender, EventArgs e) // Display a "processing" message (and include info on how to improve the results) var uri = new Uri(Path.Combine(TransformPath, "WhileTracing.htm")); m_htmlControl.URL = uri.AbsoluteUri; + sWord = new System.Xml.Linq.XText(sWord).ToString(); // LT-10373 XML special characters cause a crash; change it so HTML/XML works + sWord = sWord.Replace("\"", """); // LT-10373 same for double quote sWord = sWord.Replace(' ', '.'); // LT-7334 to allow for phrases; do this at the last minute m_parserListener.Connection.TryAWordDialogIsRunning = true; // make sure this is set properly m_tryAWordResult = m_parserListener.Connection.BeginTryAWord(sWord, DoTrace, selectedTraceMorphs); diff --git a/Src/Transforms/Application/FxtM3ParserToXAmpleADCtl.xsl b/Src/Transforms/Application/FxtM3ParserToXAmpleADCtl.xsl index 35e89340c9..7bba09a8ac 100644 --- a/Src/Transforms/Application/FxtM3ParserToXAmpleADCtl.xsl +++ b/Src/Transforms/Application/FxtM3ParserToXAmpleADCtl.xsl @@ -397,6 +397,7 @@ User tests ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -1) AND (left orderclass = 0)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) @@ -410,6 +411,7 @@ OR ((left orderclass = -1) AND (current orderclass ~= -32000)) | allow derivatio ( (left orderclassmin < current orderclassmin) AND (left orderclassmax < current orderclassmax) ) OR (current orderclass = 0) + OR (left orderclass = 0) OR ((current orderclass = -1) AND (left orderclass = -1)) OR ((current orderclass = -32000) AND (left orderclass = -32000)) OR ((current orderclassmin = -31999) AND (current orderclassmax = -1)) diff --git a/Src/Transforms/Application/FxtM3ParserToXAmpleWordGrammarDebuggingXSLT.xsl b/Src/Transforms/Application/FxtM3ParserToXAmpleWordGrammarDebuggingXSLT.xsl index 54edda57a2..15fb6afa53 100644 --- a/Src/Transforms/Application/FxtM3ParserToXAmpleWordGrammarDebuggingXSLT.xsl +++ b/Src/Transforms/Application/FxtM3ParserToXAmpleWordGrammarDebuggingXSLT.xsl @@ -3415,7 +3415,6 @@ CreateInflectionalTemplateSlotTemplate Optional slot does not match: try next slot (if any) with this morph - @@ -3425,7 +3424,6 @@ CreateInflectionalTemplateSlotTemplate - diff --git a/Src/Transforms/Presentation/FormatCommon.xsl b/Src/Transforms/Presentation/FormatCommon.xsl index c0a32f8376..4e9a52c3da 100644 --- a/Src/Transforms/Presentation/FormatCommon.xsl +++ b/Src/Transforms/Presentation/FormatCommon.xsl @@ -156,69 +156,124 @@ + + + + + -
-

+

+

+ The following data issue + + + s were + + + was + + + found that may affect how the parser works. When the Hermit Crab parser uses a natural class during its synthesis process, the natural class will use the phonological features which are the intersection of the features of all the phonemes in the class while trying to see if a segment matches the natural class. The implied phonological features are shown for each class below and mean that it will match any of the predicted phonemes shown. (If the implied features field is blank, then it will match *all* phonemes.) For each of the natural classes shown below, the set of predicted phonemes is not the same as the set of actual phonemes. You will need to rework your phonological feature system and the assignment of these features to phonemes to make it be correct. +

+ + + + + + + + +
+ + + + + + + +
+ +
+ [ + + ] +
+
+ + + + + + + + + + + + + +
Implied Features + +
Predicted Phonemes + +
Actual Phonemes + +
+
+ +
+ +
+ + + + + + +
+
The following data issue - + s were was - found that may affect how the parser works. When the Hermit Crab parser uses a natural class during its synthesis process, the natural class will use the phonological features which are the intersection of the features of all the phonemes in the class while trying to see if a segment matches the natural class. The implied phonological features are shown for each class below and mean that it will match any of the predicted phonemes shown. (If the implied features field is blank, then it will match *all* phonemes.) For each of the natural classes shown below, the set of predicted phonemes is not the same as the set of actual phonemes. You will need to rework your phonological feature system and the assignment of these features to phonemes to make it be correct. -

- - - - - - - - -
- - - - - - - -
- -
- [ - - ] -
-
- - - - - - - - - - - - - -
Implied Features - -
Predicted Phonemes - -
Actual Phonemes - -
-
- + found that may affect how the parser works. Empty graphemes can make the Hermit Crab parser not respond correctly. + +
+ The phoneme + + has an empty grapheme. Please delete it or fill it out. +
+
+
+ + + +
+
+ The following data issue + + + s were + + + was + + + found that may affect how the parser works. Using left or right square brackets as graphemes can make the Hermit Crab parser not respond correctly. + +
+ The phoneme + + has a bracket ( + + ) as a grapheme. Please delete it.
-