Skip to content

Commit

Permalink
Remove obsolete targets referencing external data
Browse files Browse the repository at this point in the history
  • Loading branch information
TomazErjavec committed Oct 11, 2023
1 parent 333165f commit 2b4d6aa
Showing 1 changed file with 23 additions and 83 deletions.
106 changes: 23 additions & 83 deletions Schema/Makefile
Original file line number Diff line number Diff line change
@@ -1,61 +1,21 @@
## We use this Makefile also for testing scripts:
META = $F/DataXI/ParlaMint-CZ/ParlaMint-CZ.xml
cl-test:
#$s -xsl:../Scripts/check-links.xsl ${META}
$s meta=${META} -xsl:../Scripts/check-links.xsl \
$F/DataXI/ParlaMint-CZ/ParlaMint-CZ_2016-04-13-ps2013-044-02-013-114.xml

F = ../../Factorized
f-test: f-test-root f-test-anaroot f-test-component f-test-anacomponent f-test-splits f-test-odd

f-test-root:
$j ParlaMint-teiCorpus.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ.xml
$j ParlaMint-teiCorpus.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ.xml
$j ParlaMint-teiCorpus.rng $F/Data/ParlaMint-BE/ParlaMint-BE.xml
$j ParlaMint-teiCorpus.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE.xml
f-test-anaroot:
$j ParlaMint-teiCorpus.ana.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ.ana.xml
$j ParlaMint-teiCorpus.ana.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ.ana.xml
$j ParlaMint-teiCorpus.ana.rng $F/Data/ParlaMint-BE/ParlaMint-BE.ana.xml
$j ParlaMint-teiCorpus.ana.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE.ana.xml
f-test-component:
$j ParlaMint-TEI.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ_2016-04-13-ps2013-044-02-013-114.xml
$j ParlaMint-TEI.rng $F/Data/ParlaMint-BE/ParlaMint-BE_2014-06-30-54-plenair-ip002x.xml
f-test-anacomponent:
$j ParlaMint-TEI.ana.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ_2016-04-13-ps2013-044-02-013-114.ana.xml
$j ParlaMint-TEI.ana.rng $F/Data/ParlaMint-BE/ParlaMint-BE_2014-06-30-54-plenair-ip002x.ana.xml
f-test-splits:
$j ParlaMint-taxonomy.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ-taxonomy-*.xml
$j ParlaMint-taxonomy.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE-taxonomy-*.xml
$j ParlaMint-listOrg.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ-listOrg.xml
$j ParlaMint-listOrg.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE-listOrg.xml
$j ParlaMint-listPerson.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ-listPerson.xml
$j ParlaMint-listPerson.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE-listPerson.xml
f-test-odd:
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ.xml
$j ../TEI/ParlaMint.odd.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-BE/ParlaMint-BE.xml
$j ../TEI/ParlaMint.odd.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ.ana.xml
$j ../TEI/ParlaMint.odd.rng $F/DataXI/ParlaMint-CZ/ParlaMint-CZ.ana.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-BE/ParlaMint-BE.ana.xml
$j ../TEI/ParlaMint.odd.rng $F/DataXI/ParlaMint-BE/ParlaMint-BE.ana.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ_2016-04-13-ps2013-044-02-013-114.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-BE/ParlaMint-BE_2014-06-30-54-plenair-ip002x.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-CZ/ParlaMint-CZ_2016-04-13-ps2013-044-02-013-114.ana.xml
$j ../TEI/ParlaMint.odd.rng $F/Data/ParlaMint-BE/ParlaMint-BE_2014-06-30-54-plenair-ip002x.ana.xml

usas-test:
${vca} ../Corpora/Master/ParlaMint-LV-en.TEI.ana/*/ParlaMint-LV-en_*.ana.xml

## We use this Makefile also for testing scripts:
list:
grep '<element name=' ParlaMint-*.rng | perl -pe 's|.+="||; s|">||' | sort | uniq

nohup:
nohup time make all > compile.log &
all: trang
xall: val trang
all: rnc
xall: val rnc

val:
../Samples/ParlaMint-*/ParlaMint-*.xml

#Authored, strangely enough, in .rng!
t = java -jar /usr/share/java/trang.jar
trang: rnc

#Convert to RelaxNG compact syntax
rnc:
$t ParlaMint-TEI.rng ParlaMint-TEI.rnc
$t ParlaMint-TEI.ana.rng ParlaMint-TEI.ana.rnc
Expand All @@ -66,7 +26,7 @@ rnc:
$t ParlaMint-taxonomy.rng ParlaMint-taxonomy.rnc

#Doesn't work, cf. https://github.com/clarin-eric/ParlaMint/issues/74
xsd:
xxx-xsd:
$t ParlaMint-TEI.rng ParlaMint-TEI.xsd
$t ParlaMint-TEI.ana.rng ParlaMint-TEI.ana.xsd
$t ParlaMint-teiCorpus.rng ParlaMint-teiCorpus.xsd
Expand All @@ -75,39 +35,19 @@ xsd:
$t ParlaMint-listPerson.rng ParlaMint-listPerson.xsd
$t ParlaMint-taxonomy.rng ParlaMint-taxonomy.xsd

#DATADIR = ../Data
# For testing v3 corpora
DATADIR = ../../ParlaMint-data/Data
ALL = ${DATADIR}/ParlaMint-*/ParlaMint-*.xml
#ALL = ${DATADIR}/ParlaMint-AT/ParlaMint-AT_1996-01-15-020-XX-NRSITZ-00001.ana.xml
ANA = '.ana'
TAX = 'taxonomy'
LST = 'list'
val:
-ls ${ALL} | grep -v ${ANA} | grep -v ${TAX} | grep -v ${LST} | grep -v '_' | xargs ${pc}
-ls ${ALL} | grep -v ${ANA} | grep -v ${TAX} | grep -v ${LST} | grep -v '_' | xargs ${vrt}
-ls ${ALL} | grep -v ${ANA} | grep -v ${TAX} | grep -v ${LST} | grep '_' | xargs ${vct}
-ls ${ALL} | grep ${ANA} | grep -v ${TAX} | grep -v ${LST} | grep -v '_' | xargs ${pc}
-ls ${ALL} | grep ${ANA} | grep -v ${TAX} | grep -v ${LST} | grep -v '_' | xargs ${vra}
-ls ${ALL} | grep ${ANA} | grep -v ${TAX} | grep -v ${LST} | grep '_' | xargs ${vca}
-ls ${DATADIR}/ParlaMint-*/ParlaMint-*listOrg.xml | xargs ${vlo}
-ls ${DATADIR}/ParlaMint-*/ParlaMint-*listPerson.xml | xargs ${vlp}
-ls ${DATADIR}/ParlaMint-*/ParlaMint-*taxonomy*.xml | xargs ${vta}

#Useful XML validations
pc = -I % $s -xi -xsl:../Scripts/copy.xsl % | $j parla-clarin.rng
vrt = $j ParlaMint-teiCorpus.rng # Corpus root / text
vct = $j ParlaMint-TEI.rng # Corpus component / text
vra = $j ParlaMint-teiCorpus.ana.rng # Corpus root / analysed
vca = $j ParlaMint-TEI.ana.rng # Corpus component / analysed
vlo = $j ParlaMint-listOrg.rng # Corpus organisation list
vlp = $j ParlaMint-listPerson.rng # Corpus person list
vta = $j ParlaMint-taxonomy.rng # Corpus taxonomy

vrt = $j ParlaMint-teiCorpus.rng # Corpus TEI root (text)
vct = $j ParlaMint-TEI.rng # Corpus TEI component (text)
vra = $j ParlaMint-teiCorpus.ana.rng # Corpus TEI.ana root (ling. analysed)
vca = $j ParlaMint-TEI.ana.rng # Corpus TEI component (analysed)
vlo = $j ParlaMint-listOrg.rng # Corpus TEI organisation list
vlp = $j ParlaMint-listPerson.rng # Corpus TEI person list
vta = $j ParlaMint-taxonomy.rng # Corpus TEI taxonomy

#Prerequisites, change as needed
s = java -jar /usr/share/java/saxon.jar
j = java -jar /usr/share/java/jing.jar
t = java -jar /usr/share/java/trang.jar
P = parallel --citation --gnu --halt 2

#Count things like org/@role
what = grep ' corresp=' | grep corresp
what:
cat ${ALL} | ${what}

0 comments on commit 2b4d6aa

Please sign in to comment.