neo4j-labs / rdflib-neo4j

RDFLib Store backed by neo4j + n10s
Apache License 2.0
60 stars 7 forks source link

Feature request: full rdfs:label and @language support #2

Closed Tauvic closed 4 weeks ago

Tauvic commented 1 year ago

Cannot use multiple instances of rdfs:label and language is also not supported. Multiple labels just overwrite each other and the language indicator is ignored.

jbarrasa commented 1 year ago

Hi @Tauvic, thanks for taking the time to test the project. You're right, there are elements that are not yet supported like the ones you mention. The parent project (https://github.com/neo4j-labs/neosemantics) does support them all, and we'll probably follow a similar approach.

We intentionally wanted to keep this first RDFLib-based version as lightweight as possible and not over-engineer it. But I agree, these are basic requirements that will need to be addressed.

Also contributions are welcome, so feel free to submit a pull request :)

Cheers,

JB.

pmackay commented 1 year ago

Hi @jbarrasa, I'd also find support for selecting languages on import very useful, particularly for using with Aura that doesnt support neosemantics.

Can you suggest what the configuration of this might look like, if implemented?

jbarrasa commented 1 year ago

Hi @pmackay, We are busy implementing a more robust version of this library that will include that capability. To be clear, you're interested in filtering triples by language tag, right? Not persisting the language tag(s) in Neo4jAuraDB.

Assuming that is the case and until the new release is available (hopefully only a few weeks away), you can always pre-filter the input data... It's not ideal but gets the job done. Here's an example of what I mean.

The syntax for the new version will be something along these lines (don't take it as final as things may change):

config = Neo4jStoreConfig(auth_data=auth_data,
                              multival_props_names=[("sch", "author")],
                              handle_vocab_uri_strategy=HANDLE_VOCAB_URI_STRATEGY.IGNORE,
                              handle_multival_strategy=HANDLE_MULTIVAL_STRATEGY.ARRAY,
                              lang_filter=["es"])

neo4j_graph = Graph(store=Neo4jStore(config=config))
neo4j_graph.parse(...)

cheers,

JB.

alfredorubin96 commented 4 weeks ago

I'll close this issue, because rdfs is still not supported by rdflib. Feel free to reopen it if needed.