diff --git a/tetras_extraction/script/src/extract_page.py b/tetras_extraction/script/src/extract_page.py index 23f85f1db03ac37d1adba2c7c4b02146b31c553f..67e2216c257ac631242eefeb5e82b11004b0eed9 100644 --- a/tetras_extraction/script/src/extract_page.py +++ b/tetras_extraction/script/src/extract_page.py @@ -334,6 +334,8 @@ class ExerciceTAT(Exercice): graph.add((NS[self.id], NS["aSegment"], segment_uri)) graph.add((segment_uri, RDF.type, NS["Segment"])) graph.add((segment_uri, NS["index"], Literal(index))) + graph.add((segment_uri, RDFS.label, Literal(rdf_name))) + if isinstance(segment, str): graph.add((segment_uri, NS["html"], Literal(segment))) else: diff --git a/tetras_extraction/script/src/transform.py b/tetras_extraction/script/src/transform.py index 460a09905e2a7b2582cea3393ea4664f1eddc497..11cc9633bdd9cdb43fcbb6f2203d1c7e403fc726 100644 --- a/tetras_extraction/script/src/transform.py +++ b/tetras_extraction/script/src/transform.py @@ -85,11 +85,11 @@ def postEditMD(str): ################################################### # First for the words supporting the comments regexANCHOR = re.compile(r"@ANCHORSTART@(.)@(.*?)@ANCHOREND") - str = regexANCHOR.sub(r"<span commentaireInfoId='\1'>\2</span>", str) + str = regexANCHOR.sub(r"<span spanId='\1'>\2</span>", str) # For the comments themselves if '@COMMENTIDSTART' in str : - str = str.replace('@COMMENTIDSTART@','<div class="commentaireInfo" id="').replace('@COMMENTIDEND','">') + '</div>' + str = str.replace('@COMMENTIDSTART@','<div class="commentaireInfo" commentaireId="').replace('@COMMENTIDEND','">') + '</div>' ################################################### diff --git a/tetras_extraction/script/templates/activite.rq b/tetras_extraction/script/templates/activite.rq index f84a9484a0a1bf5dd772ac204d5d47c54779a684..2d306b39c6402d72a83c238987ff729dfa7ea7be 100644 --- a/tetras_extraction/script/templates/activite.rq +++ b/tetras_extraction/script/templates/activite.rq @@ -17,9 +17,7 @@ template mt:activite(?act) { '<div class="commentaireInfoGroup" hidden="True">' st:nl() group { - '<div class="commentaireInfo">' st:nl() ?info_comment - '</div>' st:nl() } '</div>' st:nl()