Skip to content

Commit 1f2bd65

Browse files
AndyBlackpapeh
andauthored
LT-21804 Move PCPATR with FLEx into the FLEx repo (#787)
* LT-21804 Disambiguate In FLEx portion Change-Id: I01a58d2badb9b4d863a91e975499aa49a7d47354 * LT-21804 LingTree tool used in PcPatrBrowser to show tree diagrams Change-Id: I1ddf2f34733cb72d23b6c705a4dfa653c6b53a12 * LT-21804 PcPatrBrowser tool used with PcPatrFLEx Change-Id: Ifbc74826caebdae3e0556e5351672f11b38612e5 * LT-21804 PrepFLExDB: add properties used by PcPatrFLEx & ToneParsFLEx Change-Id: Ice39b6d3508347f41aface7235940cbd7cdca81c * LT-21804 PcPatrFLEx add-on utility Change-Id: Id936cb91e838b813b926b5acf18095c7ae295ac7 * LT-21804 ToneParsFLEx add-on utility Change-Id: Ie276229faf998d0ab45c6d3b9f9cfdcd4131fe98 * LT-21804 'Extract ANA file' add-on utility Change-Id: Id7ea53849eab70d91e0dfa43a461c6556aa2856c * LT-21804 top-level files Change-Id: Icc7e54b7a50f5d8027c16eaf0efb38186d4965e3 * LT-21804: imperovements based on devin.ai code review Change-Id: Ib739390df9ef2edad7bdee19449f25d32ae098a5 * LT-21804: get GHA unit tests to work Change-Id: Ifd2278bef9843b4ad7e75e3b961f653a2c407402 * LT-21804: add missing code table files for TonePars Change-Id: I34e56f72f95be84433111305ed3c8286d2cabf7f * LT-21804: add missing log test files and check for new exes Change-Id: I23246e3d18c99655b12394d08ba813688adb4fe7 * LT-21804: use temp directory for FLEx data files Change-Id: I73a427e1bd8d03561e07ab60be47974b9b9c12df * LT-21804: try to get HVO to gloss and PCPatr invoker tests to pass Change-Id: I4d5030b21c0b6a03437d867f8e1e52a11397672d * LT-21804: try to get PCPatr invoker tests to pass Change-Id: If7f6204a788e5313708ab30735a6e69000080f6d * LT-21804: add some debug output to PCPatr invoker tests Change-Id: If2d4359c69cc8af634e34d638a695b93296b8ae7 * LT-21804: add some debug output to PCPatr invoker tests Change-Id: If2d4359c69cc8af634e34d638a695b93296b8ae7 * LT-21804: try using FwDirectoryFinder.ExeOrDllDirectory Change-Id: I07c284ccda09a7fbaa8e05e261910eef4f416bb3 * LT22418: Try more console debug for why fails in GH but not locally Change-Id: Ia7544eeab066ef4af776eaba893f2a30e860fa6c * LT22418: take flle not found; try using \r\n Change-Id: Ibf2f647c5306b37c77f826a47ec78e1c73065501 * LT22418: take flle not found; try removing "\r" Change-Id: Iee32b7f45f9de1ff7ee5abb0b1b98b64e8e4739e * LT22418: take flle not found; use High Process Priority Change-Id: I0532a514fa679d7ea9177d6242f65af13e4b4176 * LT22418: take flle not found; remove &#xD; in bat & tak Change-Id: I2f819ca49f308d397ee0a8fbb98321c4dab2e0b9 * LT22418: take flle not found; use 'cd /d ...' Change-Id: I7378331ac67f8fb3ff0c28bad73eb522020ea7ae * LT22418: per Hasso feedback; get PcPatrBrowser toolbar to work Change-Id: If4b0548070e4dd451b528ef7fc0952330dbc5df3 * LT-21804: Include five new addons in utility catalog Change-Id: Ic6013797fcb9a758704f4237623c2915cb662716 * LT-21804: Improve some tonepars invoker tests Change-Id: I7c8f2556b0506edf2a0a0b48c765183bf35bac9a * LT-21804: try ignoring new utility tests to avoid test failure Change-Id: I04e461f3d73cfbcf98fe924df79d41c91dd7b725 * Clean Up PCPATR (#809) * Mark ToneParsInvokerTest as DesktopRequired * Dispose TempFile in DisambiguateTests * Revert "LT-21804: try ignoring new utility tests to avoid test failure" This reverts commit 6d235fa. --------- Co-authored-by: papeh <hasso_pape@sil.org>
1 parent 7e8ffe2 commit 1f2bd65

189 files changed

Lines changed: 4856443 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ Bin/ilrepack-assemblies -whitespace
3131
*.json -whitespace
3232
*.js -whitespace
3333
Src/LexText/ParserCore/ParserCoreTests/**/*.txt -whitespace
34+
Src/Utilities/pcpatrflex/DisambiguateInFLExDB/DisambiguateInFLExDBTests/TestData/*.* -whitespace
35+
Src/Utilities/pcpatrflex/PcPatrBrowserDll/Transforms/*.* -whitespace

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ DistFiles/ReleaseData/
144144
# Exceptions
145145
!Lib/Windows/Debug
146146
!Lib/Windows/Release
147+
!Src/Utilities/pcpatrflex/DisambiguateInFLExDB/DisambiguateInFLExDBTests/TestData/*.log
147148

148149
Lib/icu*.lib
149150
DistFiles/Icu*/data

Build/PackageRestore.targets

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<DownloadsDir>$(fwrt)/Downloads</DownloadsDir>
3131
<!-- GeckofxHtmlToPdf: download from GitHub release (https://github.com/sillsdev/geckofxHtmlToPdf/releases) -->
3232
<GeckofxHtmlToPdfVersion>1.1.0</GeckofxHtmlToPdfVersion>
33+
<!-- pc-parse: download from GitHub release (https://github.com/sillsdev/CarlaLegacy/releases/) -->
34+
<PcParseVersion>pc-parse1.0.0</PcParseVersion>
3335
<!-- PackagesDir: Use local packages folder. -->
3436
<PackagesDir>$(fwrt)/packages</PackagesDir>
3537
</PropertyGroup>
@@ -273,6 +275,19 @@
273275
DownloadsDir="$(DownloadsDir)"
274276
Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/Args.dll')"
275277
/>
278+
<!-- pc-parse binaries downloaded from GitHub release. -->
279+
<DownloadFile
280+
Address="https://github.com/sillsdev/CarlaLegacy/releases/download/$(PcParseVersion)/pcpatr64.exe"
281+
LocalFilename="pcpatr64.exe"
282+
DownloadsDir="$(DownloadsDir)"
283+
Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/pcpatr64.exe')"
284+
/>
285+
<DownloadFile
286+
Address="https://github.com/sillsdev/CarlaLegacy/releases/download/$(PcParseVersion)/TonePars64.exe"
287+
LocalFilename="TonePars64.exe"
288+
DownloadsDir="$(DownloadsDir)"
289+
Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/TonePars64.exe')"
290+
/>
276291
</Target>
277292

278293
<!-- ======================================================================================== -->
@@ -475,6 +490,21 @@
475490
OverwriteReadOnlyFiles="true"
476491
Condition="Exists('$(DownloadsDir)/GeckofxHtmlToPdf.exe.config')"
477492
/>
493+
<!-- Copy pre-populated binaries from pc-parse -->
494+
<Copy
495+
SourceFiles="$(DownloadsDir)/pcpatr64.exe"
496+
DestinationFiles="$(dir-outputBase)/pcpatr64.exe"
497+
SkipUnchangedFiles="true"
498+
OverwriteReadOnlyFiles="true"
499+
Condition="Exists('$(DownloadsDir)/pcpatr64.exe')"
500+
/>
501+
<Copy
502+
SourceFiles="$(DownloadsDir)/TonePars64.exe"
503+
DestinationFiles="$(dir-outputBase)/TonePars64.exe"
504+
SkipUnchangedFiles="true"
505+
OverwriteReadOnlyFiles="true"
506+
Condition="Exists('$(DownloadsDir)/TonePars64.exe')"
507+
/>
478508
<!-- Encoding Converters Files (x64 only) -->
479509
<!-- Note: encoding-converters-core package doesn't follow standard NuGet runtime conventions
480510
(has extra EcDistFiles folder), so automatic runtime asset copying doesn't work.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
\unified \lx
2+
\ch '\u' 'U'
3+
\ch '\eType' 'T'
4+
\ch '\a' 'A'
5+
\ch '\c' 'C'
6+
\ch '\wc' 'F'
7+
\ch '\o' 'O'
8+
\ch '\lx' 'M'
9+
\ch '\mp' 'P'
10+
\ch '\mcc' 'Z'
11+
\ch '\loc' 'L'
12+
\ch '\noload' '!'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
\unified \lx
2+
\ch '\u' 'U'
3+
\ch '\eType' 'T'
4+
\ch '\a' 'A'
5+
\ch '\c' 'C'
6+
\ch '\wc' 'c'
7+
\ch '\o' 'O'
8+
\ch '\lx' 'M'
9+
\ch '\fd' 'F'
10+
\ch '\mp' 'P'
11+
\ch '\mcc' 'Z'
12+
\ch '\loc' 'L'
13+
\ch '\noload' '!'

DistFiles/Language Explorer/Configuration/UtilityCatalogInclude.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@
1515
<utility assemblyPath="LexEdDll.dll" class="SIL.FieldWorks.XWorks.LexEd.GoldEticGuidFixer"/>
1616
<utility assemblyPath="LexEdDll.dll" class="SIL.FieldWorks.XWorks.LexEd.SortReversalSubEntries"/>
1717
<utility assemblyPath="LexEdDll.dll" class="SIL.FieldWorks.XWorks.LexEd.CircularRefBreaker"/>
18+
<utility assemblyPath="AllomorphGenerator.dll" class="SIL.AllomorphGenerator.FLExUtility"/>
19+
<utility assemblyPath="VariantGenerator.dll" class="SIL.VariantGenerator.FLExUtility"/>
20+
<utility assemblyPath="ExtractAnaFilesFromTextsDll.dll" class="SIL.PcPatrFLEx.FLExUtilityExtract"/>
21+
<utility assemblyPath="ToneParsFLExDll.dll" class="SIL.ToneParsFLEx.FLExUtility"/>
22+
<utility assemblyPath="PcPatrFLExDll.dll" class="SIL.PcPatrFLEx.FLExUtility"/>
1823
</utilityCatalog>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<html>
3+
<head>
4+
<title>Initial Feature Structure info</title>
5+
</head>
6+
<body>
7+
<p>When you click on a node in the tree shown in the panel to the left, any feature structure associated with that node will show up here. (Note: if you do not have PC-PATR include feature structures in the output, then no features will ever show here.)</p>
8+
</body>
9+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<html>
3+
<head>
4+
<title>Initial Interlinear info</title>
5+
</head>
6+
<body>
7+
<p>When you open a file, the interlinear of the current sentence will show here.</p>
8+
</body>
9+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<html>
3+
<head>
4+
<title>No Interlinear info</title>
5+
</head>
6+
<body>
7+
<p>Not able to display the interlinear for this sentence.</p>
8+
</body>
9+
</html>
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3+
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
4+
<!--
5+
================================================================
6+
Test unification via XSLT
7+
Input: Pairs of tests to apply
8+
Output: should be identical to input
9+
================================================================
10+
Revision History is at the end of this file.
11+
12+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13+
Preamble
14+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
15+
-->
16+
<xsl:param name="sGlossFont">Times New Roman</xsl:param>
17+
<xsl:param name="sGlossFontSize">12</xsl:param>
18+
<xsl:param name="sGlossFontColor">Green</xsl:param>
19+
<xsl:param name="sLexFont">Courier New</xsl:param>
20+
<xsl:param name="sLexFontSize">11</xsl:param>
21+
<xsl:param name="sLexFontColor">Blue</xsl:param>
22+
<xsl:param name="sNTFont">Times New Roman</xsl:param>
23+
<xsl:param name="sNTFontSize">14</xsl:param>
24+
<xsl:param name="sNTFontColor">Black</xsl:param>
25+
<!--
26+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27+
Main template
28+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
29+
-->
30+
<xsl:template match="/">
31+
<LingTree>
32+
<Parameters>
33+
<Layout>
34+
<VerticalGap>300</VerticalGap>
35+
<HorizontalGap>300</HorizontalGap>
36+
<InitialXCoord>100</InitialXCoord>
37+
<InitialYCoord>300</InitialYCoord>
38+
<HorizontalOffset>5529</HorizontalOffset>
39+
<LexGlossGapAdjustment>10</LexGlossGapAdjustment>
40+
<ShowFlatView>false</ShowFlatView>
41+
</Layout>
42+
<Fonts>
43+
<Gloss>
44+
<GlossFontFace>
45+
<xsl:value-of select="$sGlossFont"/>
46+
</GlossFontFace>
47+
<GlossFontSize>
48+
<xsl:value-of select="$sGlossFontSize"/>
49+
</GlossFontSize>
50+
<GlossFontStyle>Regular</GlossFontStyle>
51+
<GlossColorArgb>-16744447</GlossColorArgb>
52+
<GlossColorName>
53+
<xsl:value-of select="$sGlossFontColor"/>
54+
</GlossColorName>
55+
</Gloss>
56+
<Lex>
57+
<LexFontFace>
58+
<xsl:value-of select="$sLexFont"/>
59+
</LexFontFace>
60+
<LexFontSize>
61+
<xsl:value-of select="$sLexFontSize"/>
62+
</LexFontSize>
63+
<LexFontStyle>Regular</LexFontStyle>
64+
<LexColorArgb>-16776961</LexColorArgb>
65+
<LexColorName>
66+
<xsl:value-of select="$sLexFontColor"/>
67+
</LexColorName>
68+
</Lex>
69+
<NT>
70+
<NTFontFace>
71+
<xsl:value-of select="$sNTFont"/>
72+
</NTFontFace>
73+
<NTFontSize>
74+
<xsl:value-of select="$sNTFontSize"/>
75+
</NTFontSize>
76+
<NTFontStyle>Regular</NTFontStyle>
77+
<NTColorArgb>-16777216</NTColorArgb>
78+
<NTColorName>
79+
<xsl:value-of select="$sNTFontColor"/>
80+
</NTColorName>
81+
</NT>
82+
<Lines>
83+
<LineWidth>15</LineWidth>
84+
<LinesColorArgb>-16777216</LinesColorArgb>
85+
<LinesColorName>Black</LinesColorName>
86+
</Lines>
87+
<Background>
88+
<BackgroundColorArgb>-1</BackgroundColorArgb>
89+
<BackgroundColorName>White</BackgroundColorName>
90+
</Background>
91+
</Fonts>
92+
</Parameters>
93+
<TreeDescription>
94+
<xsl:apply-templates/>
95+
</TreeDescription>
96+
</LingTree>
97+
</xsl:template>
98+
<!--
99+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
100+
Node
101+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
102+
-->
103+
<xsl:template match="Node">
104+
<node type="nonterminal">
105+
<xsl:attribute name="id">
106+
<xsl:value-of select="@id"/>
107+
</xsl:attribute>
108+
<label>
109+
<xsl:value-of select="@cat"/>
110+
<xsl:if test="@all='true'">+</xsl:if>
111+
<xsl:if test="@fail='true'">-</xsl:if>
112+
</label>
113+
<xsl:apply-templates/>
114+
</node>
115+
</xsl:template>
116+
<!--
117+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
118+
Leaf
119+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
120+
-->
121+
<xsl:template match="Leaf">
122+
<node type="nonterminal">
123+
<xsl:attribute name="id">
124+
<xsl:value-of select="@id"/>
125+
</xsl:attribute>
126+
<label>
127+
<xsl:value-of select="@cat"/>
128+
</label>
129+
<node type="lex">
130+
<xsl:attribute name="id">
131+
<xsl:value-of select="@id"/>lex</xsl:attribute>
132+
<label>
133+
<xsl:choose>
134+
<xsl:when test="Fs/F[@name='decomposition']/Str">
135+
<xsl:value-of select="Fs/F[@name='decomposition']/Str"/>
136+
</xsl:when>
137+
<xsl:otherwise>
138+
<xsl:value-of select="Str"/>
139+
</xsl:otherwise>
140+
</xsl:choose>
141+
</label>
142+
<node type="gloss">
143+
<xsl:attribute name="id">
144+
<xsl:value-of select="@id"/>gloss</xsl:attribute>
145+
<label>
146+
<xsl:choose>
147+
<xsl:when test="Fs/F[@name='gloss']/Str">
148+
<xsl:value-of select="Fs/F[@name='gloss']/Str"/>
149+
</xsl:when>
150+
<xsl:otherwise>
151+
<xsl:value-of select="@gloss"/>
152+
</xsl:otherwise>
153+
</xsl:choose>
154+
</label>
155+
</node>
156+
</node>
157+
</node>
158+
</xsl:template>
159+
<!--
160+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
161+
Elements to ignore
162+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
163+
-->
164+
<xsl:template match="Fs | F | Str | Lexfs"/>
165+
</xsl:stylesheet>
166+
<!--
167+
================================================================
168+
Revision History
169+
- - - - - - - - - - - - - - - - - - -
170+
15-Nov-2005 Andy Black Increase InitialYCoord value so the Parse x of y does not conflict with tree
171+
21-Sep-2005 Andy Black Add plus sign to nodes with @all='true'
172+
08-Dec-2004 Andy Black Began working on Initial Draft
173+
================================================================
174+
-->

0 commit comments

Comments
 (0)