Skip to content

Commit

Permalink
Add state/@type to CHES variables and values.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomazErjavec committed Aug 22, 2023
1 parent 9bc4242 commit d81ea99
Show file tree
Hide file tree
Showing 16 changed files with 593 additions and 533 deletions.
2 changes: 2 additions & 0 deletions Schema/ParlaMint-schemaSpecs.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5826,6 +5826,8 @@
<valItem ident="encoder"/>
<valItem ident="Wikipedia"/>
<valItem ident="CHES"/>
<valItem ident="variable"/>
<valItem ident="value"/>
</valList>
</attDef>
<attDef ident="ana" mode="change" usage="opt">
Expand Down
8 changes: 7 additions & 1 deletion Schema/ParlaMint.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace xi = "http://www.w3.org/2001/XInclude"
namespace xlink = "http://www.w3.org/1999/xlink"
namespace xsl = "http://www.w3.org/1999/XSL/Transform"

# Schema generated from ODD source 2023-08-20T17:06:32Z. 2023-08-20.
# Schema generated from ODD source 2023-08-22T11:41:50Z. 2023-08-22.
# TEI Edition: Version 4.6.0a. Last updated on
# 5th January 2023, revision 9074b9038
# TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.6.0a./
Expand Down Expand Up @@ -2623,6 +2623,12 @@ tei_state =
|
##
"CHES"
|
##
"variable"
|
##
"value"
}?,
empty
}
Expand Down
6 changes: 5 additions & 1 deletion Schema/ParlaMint.odd.rng
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.tei-c.org/ns/1.0"><!--
Schema generated from ODD source 2023-08-20T17:06:28Z. 2023-08-20.
Schema generated from ODD source 2023-08-22T11:41:46Z. 2023-08-22.
TEI Edition: Version 4.6.0a. Last updated on
5th January 2023, revision 9074b9038
TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.6.0a./
Expand Down Expand Up @@ -3989,6 +3989,10 @@ On <name/>, either the @marks attribute should be used, or a paragraph of descri
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<value>CHES</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<value>variable</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<value>value</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
</choice>
</attribute>
</optional>
Expand Down
4 changes: 2 additions & 2 deletions Schema/ParlaMint.odd.sch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<title>ISO Schematron rules</title>
<!-- This file generated 2023-08-20T17:06:35Z by 'extract-isosch.xsl'. -->
<!-- This file generated 2023-08-22T11:41:53Z by 'extract-isosch.xsl'. -->
<!-- ********************* -->
<!-- namespaces, declared: -->
<!-- ********************* -->
<!-- ********************* -->
<!-- namespaces, implicit: -->
<!-- ********************* -->
<ns prefix="esp-d3e4822" uri="http://www.w3.org/2001/XInclude"/>
<ns prefix="esp-d3e4831" uri="http://www.w3.org/2001/XInclude"/>
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
</schema>
38 changes: 20 additions & 18 deletions Schema/ParlaMint.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</titleStmt>
<publicationStmt>
<publisher>CLARIN</publisher>
<date>2023-08-20</date>
<date>2023-08-22</date>
<availability status="free">
<p>This file is freely available and you are hereby authorised to copy, modify, and
redistribute it in any way without further reference or permissions.</p>
Expand All @@ -48,7 +48,7 @@
</projectDesc>
</encodingDesc>
<revisionDesc>
<change when="2023-08-20">Tomaž Erjavec: Change description of org/state.</change>
<change when="2023-08-22">Tomaž Erjavec: Change description of org/state.</change>
<change when="2023-07-17">Tomaž Erjavec: Add org/@role='federatedState'.</change>
<change when="2023-06-13">Tomaž Erjavec: Start work on section for MT.</change>
<change when="2023-04-06">Tomaž Erjavec: allow orgName in affiliation.</change>
Expand All @@ -71,7 +71,7 @@
corpora</ref></titlePart>
</docTitle>
<!--docEdition>v0.3a</docEdition-->
<docDate>2023-08-20</docDate>
<docDate>2023-08-22</docDate>
<!--byline>Tomaž Erjavec, Matyáš Kopp, Katja Meden</byline-->
</titlePage>
<p></p>
Expand Down Expand Up @@ -2037,27 +2037,29 @@
top-level <gi>state</gi> element gives the <att>type</att> of the state, i.e. <val>CHES</val> and the URL of
the CSV source for the information. Its <gi>label</gi> gives the abbreviation of the political party name in CHES,
which can, and often does, differ from its ParlaMint abbreviation.
Each subordinate <gi>state</gi> then encodes one CHES variable, which is given, via the <att>ana</att> attribute,
as the reference to the appropriate category defined in the <val>CHES</val> taxonomy. Finally, as CHES gives
the variables according to years, the third level of <gi>state</gi> gives the time periods of the variable together
with its numeric value in the <att>n</att> attribute, as illustrated in the example below:
Each subordinate <gi>state</gi> (of <att>type</att> <val>variable</val>) then encodes one CHES variable, which is
given, via the <att>ana</att> attribute, as the reference to the appropriate category defined in the <val>CHES</val>
taxonomy. Finally, as CHES gives
variables according to years, the third level of <gi>state</gi> (of <att>type</att> <val>value</val>) gives the
time periods of the variable together with its numeric value in the <att>n</att> attribute, as illustrated in the
example below:

<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="exa-ches">
<state type="CHES" source="https://www.chesdata.eu/s/1999-2019_CHES_dataset_meansv3.csv">
<label>
<orgName full="abb" from="2002" to="2018">MR</orgName>
<orgName full="abb" from="2002" to="2018" xml:lang="en">MR</orgName>
</label>
<state ana="#ches-lrgen">
<state from="2002" to="2005" n="6.35"/>
<state from="2006" to="2009" n="6.67"/>
<state from="2010" to="2013" n="7.0"/>
<state from="2014" to="2018" n="7.0"/>
<state type="variable" ana="#ches-lrgen">
<state type="value" from="2002" to="2005" n="6.35"/>
<state type="value" from="2006" to="2009" n="6.67"/>
<state type="value" from="2010" to="2013" n="7.0"/>
<state type="value" from="2014" to="2018" n="7.0"/>
</state>
<state ana="#ches-lrecon">
<state from="2002" to="2005" n="7.3"/>
<state from="2006" to="2009" n="7.5"/>
<state from="2010" to="2013" n="7.62"/>
<state from="2014" to="2018" n="7.60"/>
<state type="variable" ana="#ches-lrecon">
<state type="value" from="2002" to="2005" n="7.3"/>
<state type="value" from="2006" to="2009" n="7.5"/>
<state type="value" from="2010" to="2013" n="7.62"/>
<state type="value" from="2014" to="2018" n="7.60"/>
</state>
...
</state>
Expand Down
8 changes: 7 additions & 1 deletion Schema/ParlaMint.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,14 @@ stateType.val =

## Data from Chapel Hill Survey.
(
## Data on political orientation.
## A CHES variable.
"CHES"
|
## A value of a CHES variable.
"variable"
|
## Data on political orientation.
"value"
|
## Data from Wikipedia.
"politicalOrientation"
Expand Down
5 changes: 5 additions & 0 deletions Schema/ParlaMint.rng
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,11 @@
<choice>
<a:documentation>Data from Chapel Hill Survey.</a:documentation>
<value>CHES</value>
<a:documentation>A CHES variable.</a:documentation>
<value>variable</value>
<a:documentation>A value of a CHES variable.</a:documentation>
<value>value</value>

<a:documentation>Data on political orientation.</a:documentation>
<value>politicalOrientation</value>
<a:documentation>Data from Wikipedia.</a:documentation>
Expand Down
2 changes: 2 additions & 0 deletions Schema/compile.log
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ java -jar /usr/share/java/trang.jar ParlaMint-listOrg.rng ParlaMint-listOrg.rnc
java -jar /usr/share/java/trang.jar ParlaMint-listPerson.rng ParlaMint-listPerson.rnc
java -jar /usr/share/java/trang.jar ParlaMint-taxonomy.rng ParlaMint-taxonomy.rnc
make[1]: Leaving directory '/home/project/corpora/Parla/ParlaMint/ParlaMint/Schema'
5.07user 0.62system 0:02.47elapsed 230%CPU (0avgtext+0avgdata 68200maxresident)k
1664inputs+832outputs (0major+71739minor)pagefaults 0swaps
12 changes: 6 additions & 6 deletions Scripts/ches-tsv2tei.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
<label>
<orgName full="abb" from="2006" to="2018" xml:lang="en">BZO</orgName>
</label>
<state ana="#ches.lrgen">
<state from="2006" to="2009" n="8.83"/>
<state from="2010" to="2013" n="8.29"/>
<state from="2014" to="2018" n="7.80"/>
<state type="variable" ana="#ches.lrgen">
<state type="value" from="2006" to="2009" n="8.83"/>
<state type="value" from="2010" to="2013" n="8.29"/>
<state type="value" from="2014" to="2018" n="7.80"/>
</state>
</state>
</org>
Expand Down Expand Up @@ -226,13 +226,13 @@
<xsl:param name="rows"/>
<xsl:variable name="country" select="$rows[1]/tei:cell[@type='country']"/>
<xsl:variable name="party" select="$rows[1]/tei:cell[@type='pm_id']"/>
<state ana="#ches.{@type}">
<state type="variable" ana="#ches.{@type}">
<xsl:variable name="values-per-year">
<xsl:for-each select="$rows">
<xsl:if test="tei:cell[@type = $type]">
<xsl:variable name="from" select="tei:cell[@type = 'year']"/>
<xsl:variable name="to" select="$ches-interval/tei:date[@from = $from]/@to"/>
<state from="{$from}" to="{$to}" n="{tei:cell[@type = $type]}"/>
<state type="value" from="{$from}" to="{$to}" n="{tei:cell[@type = $type]}"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
Expand Down
2 changes: 2 additions & 0 deletions TEI/ParlaMint-schemaSpecs.editing.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3526,6 +3526,8 @@
<valItem ident="encoder"/>
<valItem ident="Wikipedia"/>
<valItem ident="CHES"/>
<valItem ident="variable"/>
<valItem ident="value"/>
</valList>
</attDef>
<attDef ident="ana" mode="change" usage="opt">
Expand Down
2 changes: 2 additions & 0 deletions TEI/ParlaMint-schemaSpecs.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5826,6 +5826,8 @@
<valItem ident="encoder"/>
<valItem ident="Wikipedia"/>
<valItem ident="CHES"/>
<valItem ident="variable"/>
<valItem ident="value"/>
</valList>
</attDef>
<attDef ident="ana" mode="change" usage="opt">
Expand Down
8 changes: 7 additions & 1 deletion TEI/ParlaMint.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace xi = "http://www.w3.org/2001/XInclude"
namespace xlink = "http://www.w3.org/1999/xlink"
namespace xsl = "http://www.w3.org/1999/XSL/Transform"

# Schema generated from ODD source 2023-08-20T17:06:32Z. 2023-08-20.
# Schema generated from ODD source 2023-08-22T11:41:50Z. 2023-08-22.
# TEI Edition: Version 4.6.0a. Last updated on
# 5th January 2023, revision 9074b9038
# TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.6.0a./
Expand Down Expand Up @@ -2623,6 +2623,12 @@ tei_state =
|
##
"CHES"
|
##
"variable"
|
##
"value"
}?,
empty
}
Expand Down
6 changes: 5 additions & 1 deletion TEI/ParlaMint.odd.rng
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.tei-c.org/ns/1.0"><!--
Schema generated from ODD source 2023-08-20T17:06:28Z. 2023-08-20.
Schema generated from ODD source 2023-08-22T11:41:46Z. 2023-08-22.
TEI Edition: Version 4.6.0a. Last updated on
5th January 2023, revision 9074b9038
TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.6.0a./
Expand Down Expand Up @@ -3989,6 +3989,10 @@ On <name/>, either the @marks attribute should be used, or a paragraph of descri
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<value>CHES</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<value>variable</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<value>value</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
</choice>
</attribute>
</optional>
Expand Down
4 changes: 2 additions & 2 deletions TEI/ParlaMint.odd.sch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<title>ISO Schematron rules</title>
<!-- This file generated 2023-08-20T17:06:35Z by 'extract-isosch.xsl'. -->
<!-- This file generated 2023-08-22T11:41:53Z by 'extract-isosch.xsl'. -->
<!-- ********************* -->
<!-- namespaces, declared: -->
<!-- ********************* -->
<!-- ********************* -->
<!-- namespaces, implicit: -->
<!-- ********************* -->
<ns prefix="esp-d3e4822" uri="http://www.w3.org/2001/XInclude"/>
<ns prefix="esp-d3e4831" uri="http://www.w3.org/2001/XInclude"/>
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
</schema>
38 changes: 20 additions & 18 deletions TEI/ParlaMint.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</titleStmt>
<publicationStmt>
<publisher>CLARIN</publisher>
<date>2023-08-20</date>
<date>2023-08-22</date>
<availability status="free">
<p>This file is freely available and you are hereby authorised to copy, modify, and
redistribute it in any way without further reference or permissions.</p>
Expand All @@ -48,7 +48,7 @@
</projectDesc>
</encodingDesc>
<revisionDesc>
<change when="2023-08-20">Tomaž Erjavec: Change description of org/state.</change>
<change when="2023-08-22">Tomaž Erjavec: Change description of org/state.</change>
<change when="2023-07-17">Tomaž Erjavec: Add org/@role='federatedState'.</change>
<change when="2023-06-13">Tomaž Erjavec: Start work on section for MT.</change>
<change when="2023-04-06">Tomaž Erjavec: allow orgName in affiliation.</change>
Expand All @@ -71,7 +71,7 @@
corpora</ref></titlePart>
</docTitle>
<!--docEdition>v0.3a</docEdition-->
<docDate>2023-08-20</docDate>
<docDate>2023-08-22</docDate>
<!--byline>Tomaž Erjavec, Matyáš Kopp, Katja Meden</byline-->
</titlePage>
<p></p>
Expand Down Expand Up @@ -2037,27 +2037,29 @@
top-level <gi>state</gi> element gives the <att>type</att> of the state, i.e. <val>CHES</val> and the URL of
the CSV source for the information. Its <gi>label</gi> gives the abbreviation of the political party name in CHES,
which can, and often does, differ from its ParlaMint abbreviation.
Each subordinate <gi>state</gi> then encodes one CHES variable, which is given, via the <att>ana</att> attribute,
as the reference to the appropriate category defined in the <val>CHES</val> taxonomy. Finally, as CHES gives
the variables according to years, the third level of <gi>state</gi> gives the time periods of the variable together
with its numeric value in the <att>n</att> attribute, as illustrated in the example below:
Each subordinate <gi>state</gi> (of <att>type</att> <val>variable</val>) then encodes one CHES variable, which is
given, via the <att>ana</att> attribute, as the reference to the appropriate category defined in the <val>CHES</val>
taxonomy. Finally, as CHES gives
variables according to years, the third level of <gi>state</gi> (of <att>type</att> <val>value</val>) gives the
time periods of the variable together with its numeric value in the <att>n</att> attribute, as illustrated in the
example below:

<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="exa-ches">
<state type="CHES" source="https://www.chesdata.eu/s/1999-2019_CHES_dataset_meansv3.csv">
<label>
<orgName full="abb" from="2002" to="2018">MR</orgName>
<orgName full="abb" from="2002" to="2018" xml:lang="en">MR</orgName>
</label>
<state ana="#ches-lrgen">
<state from="2002" to="2005" n="6.35"/>
<state from="2006" to="2009" n="6.67"/>
<state from="2010" to="2013" n="7.0"/>
<state from="2014" to="2018" n="7.0"/>
<state type="variable" ana="#ches-lrgen">
<state type="value" from="2002" to="2005" n="6.35"/>
<state type="value" from="2006" to="2009" n="6.67"/>
<state type="value" from="2010" to="2013" n="7.0"/>
<state type="value" from="2014" to="2018" n="7.0"/>
</state>
<state ana="#ches-lrecon">
<state from="2002" to="2005" n="7.3"/>
<state from="2006" to="2009" n="7.5"/>
<state from="2010" to="2013" n="7.62"/>
<state from="2014" to="2018" n="7.60"/>
<state type="variable" ana="#ches-lrecon">
<state type="value" from="2002" to="2005" n="7.3"/>
<state type="value" from="2006" to="2009" n="7.5"/>
<state type="value" from="2010" to="2013" n="7.62"/>
<state type="value" from="2014" to="2018" n="7.60"/>
</state>
...
</state>
Expand Down
981 changes: 499 additions & 482 deletions docs/index.html

Large diffs are not rendered by default.

0 comments on commit d81ea99

Please sign in to comment.