Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate labels for the IRIs of classes and properties extracted from the source #462

Closed
sgoetz-brox opened this issue Feb 19, 2024 · 2 comments
Labels
Feature New feature or request
Milestone

Comments

@sgoetz-brox
Copy link

Examples from https://sparql-anything.readthedocs.io/en/stable/formats/Word_Processing_Document/

docs.table-headers=false:

  rdf:_7    [ rdf:_1  [ rdf:_1  "A" ;
                        rdf:_2  "B" ;
                        rdf:_3  "C"
                      ] ;
              rdf:_2  [ rdf:_1  "A1" ;
                        rdf:_2  "B1" ;
                        rdf:_3  "C1"
                      ] ;
              rdf:_3  [ rdf:_1  "A2" ;
                        rdf:_2  "B2" ;
                        rdf:_3  "C2"
                      ]
            ]

docs.table-headers=true:

  rdf:_7    [ rdf:_1  [ xyz:A   "A1" ;
                        xyz:B   "B1" ;
                        xyz:C   "C1"
                      ] ;
              rdf:_2  [ xyz:A   "A2" ;
                        xyz:B   "B2" ;
                        xyz:C   "C2"
                      ]
            ]

When set to true, the generated RDF doesn’t contain "A", "B", and "C" as literals anymore.

I think it would be useful if something like this would be generated:

xyz:A rdfs:label "A" .
xyz:B rdfs:label "B" .
xyz:C rdfs:label "C" .

(Of course one could convert the IRI to a string and extract the label from it, but this becomes ugly if percent-encoding is involved.)

Is this maybe possible already? If not, would this be something that could be added to SPARQL Anything, or would this be in conflict with its design goals?

@luigi-asprino
Copy link
Member

Hi,

this is something that applies to every format (the label can be generated once an xyz predicate is created).
An idea could be adding a new general option (e.g. generate-predicate-labels)

@luigi-asprino luigi-asprino changed the title rdfs:label for IRIs generated by docs.table-headers Generate labels for the IRIs of classes and properties extracted from the source Aug 6, 2024
@luigi-asprino luigi-asprino added the Feature New feature or request label Aug 6, 2024
@luigi-asprino luigi-asprino added this to the v1.0.0 milestone Aug 6, 2024
@luigi-asprino
Copy link
Member

439b7fc introduces this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants