Feature Request: generate blank nodes preceded by '_:'

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature Request: generate blank nodes preceded by '_:'

houzw
In my case, I have to generate lots of blank nodes or so called unnamed resource.
In current version of owlready, these nodes are named with namespace.base_iri and __class__.name.lower() and a number (individual.py)
But in most cases (as far as I know), blank nodes are preceded by '_:', so I think it may be useful to add an argument in __init__ function of class Thing to indicate whether users want to generate blank nodes preceded by '_:' or not.
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: generate blank nodes preceded by '_:'

Jiba
Administrator
Hello,

You are right, it was not possible to create anonymous individual...

I've added anonymous individual support in the development version. You can create an anonymous individual by passing 0 (zero) as name, for example :

Thing(0)

Owlready will automatically creates a blank node for the individual, with an arbitrary number.

Best regards,
Jiba