dracor-org / fredracor

French Drama Corpus
5 stars 1 forks source link

Add classCode elements for matching genre information #1

Closed cmil closed 3 years ago

cmil commented 3 years ago

The transformation at https://github.com/dracor-org/fredracor/blob/55e2b63b9f68d8f3107b72dd3f0649c04b8b42a8/transform.xq#L777-L782 should add appropriate classCode elements where genre information found in the originals matches the recognised text classes defined in dracor-org/dracor-api#122.

See also original discussion in https://github.com/dracor-org/dracor-api/issues/120.

The codes with matching genre attributions (incomplete suggestions) would be:

I would also suggest to add a scheme attribute to the keywords element and omit the term/@type in order to make clear where this classification comes from and avoid confusing it with the keywords we recently added to GerDraCor and RusDraCor.

The textClass markup could then look like this:

<textClass>
  <keywords scheme="http://theatre-classique.fr">
    <term>Tragédie</term>
    <term>vers</term>
  </keywords>
  <classCode scheme="http://www.wikidata.org/entity/">Q80930</classCode>
</textClass>

or for a libretto (e.g. moliere-bourgeoisgentilhomme.xml)

<textClass>
  <keywords scheme="http://theatre-classique.fr">
    <term>Comédie-ballet</term>
    <term>mixte</term>
  </keywords>
  <classCode scheme="http://www.wikidata.org/entity/">Q131084</classCode>
  <classCode scheme="http://www.wikidata.org/entity/">Q40831</classCode>
</textClass>