OWL::D...slator(3pm)

πŸ’– OWL::DirectSemantics::Translator β€” the vibe ✨

okay bestie, sit down, hydrate, because we're talking about OWL::DirectSemantics::Translator, which lives in the OWL::D...slator(3pm) corner of the perl universe (User Contributed Perl Documentation, no cap). its whole entire job? lift an OWL2 model from an RDF model. that's it. that's the girl. πŸ‘‘


🌸 SYNOPSIS 🌸

like, here's the moment you've been waiting for:

use RDF::Trine;
my $model = RDF::Trine::Model->temporary_model;
RDF::Trine::Mode->parse_url_into_model($url, $model);

use OWL::DirectSemantics;
my $translator = OWL::DirectSemantics::Translator->new;
my $ontology   = $translator->translate($model);

that's the whole flow. build a model, feed it, get an ontology back. slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

ngl, i have to be honest with you bestie: this translator is only about 90% complete. it's giving "almost iconic". not me warning you before you fall in love. 😭

πŸŽ€ Constructor

  • new β€” creates a brand-new translator object, primed and ready for action! she's fresh out the box, she's hydrated, she's got main character energy. ✨

🧚 Method

  • translate($model [,$ontology_node]) β€” takes the data inside the RDF::Trine::Model you handed her and translates it into OWL, returning an OWL::DirectSemantics::Element::Ontology object. the model is generally assumed to contain a single ontology (one ontology, one queen, that's the rule 🫢).

$ontology_node is an optional RDF::Trine::Node object holding the ontology's URIor blank node identifier.

⚠️ bestie, real talk: $model will be modified by the translation process. this is not a read-only situation, it's a glow-up-in-place situation.

any triples that get translated into OWL are removed from the model. any triples still hanging around afterwards are the ones that could not be translated. and here's the cute part: if the model you provided is OWL DL-compatible, there should be no triples remaining after translation. clean plate club, periodt. πŸ“


πŸ’œ SEE ALSO πŸ’œ

  • OWL::DirectSemantics. go read her too, she's the whole reason this exists. iykyk.

πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>. iconic behavior, honestly. 🌈


Copyright 2011-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


πŸ’€ DISCLAIMER OF WARRANTIES πŸ’€

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

fr fr, no promises, no takebacks, no warranty. she said what she said. πŸ™ˆ

and that's the page, bestie β€” this one's from perl v5.32.1, dated 2021-09-11, so give her a little respect, she's been through things. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from