RDF::C...::Model(3pm)
β¨ NAME β¨
RDF::Closure::Model β it's a RDF::Trine::Model-compatible interface, bestie π (yes the original said "inferface", we're being real here, the vibe is immaculate regardless)
π¦ DESCRIPTION π¦
Okay so this module is a subclass of RDF::Trine::Model, and the whole point is that it lets you dollop some reasoning into your existing RDF::Trine code with basically zero effort. Iconic behavior, honestly. π«Ά
So like β RDF::Closure::Engine lets you infer a whole bunch of new statements from a model you already have. That's cute. But this class goes further: you can also add and remove statements from the reasoned model, and the new inferences get calculated on-the-fly. Main character energy fr fr. π
β οΈ Real talk though: removing a statement is much slower than adding one. And adding one isn't exactly what you'd call fast either. So judicious use ofbegin_bulk_opsandend_bulk_opsis recommended. Not me begging you to use bulk ops. π
And listen, bestie, there's a catch: if a lot of statements have been added and removed from a model since it was created, then it's theoretically possible for the inferred data to contain statements that are no longer entailed by the explicit data β or for the inferred data to be missing some inferences. π The math is mathing and it's not mathing. So there's a recalculate method provided which lets you re-run the inference from scratch. Slay. β¨
π Constructor π
new($input, [, engine => $engine ] [, store => $store ])β instantiates a module.$inputmay beundef, an existingRDF::Trine::Model, or anRDF::Trine::Store. And the input will not be modified β she's respectful, she doesn't touch your stuff. π$engineis the inference engine to use: a string suitable for passing toRDF::Closure::Engine->new. It defaults to'RDFS'. β$storeis anRDF::Trine::Storeto use to build the inferred model in; it defaults to a new, temporary store. πΈ
π Methods π
This package inherits from RDF::Trine::Model and provides all the methods it does. No cap. It additionally provides:
entailment_regimeβ returns a URI string identifying the type of inference in use. Giving very much "which flavor of logic are we in today" energy. π§recalculateβ drops and re-infers all inferred data. It's the factory reset of inferences, and honestly sometimes you just need that. π
π₯ SEE ALSO π₯
RDF::Closure, RDF::Closure::Engine, RDF::Trine::Model.
Take careful note of the begin_bulk_ops and end_bulk_ops methods present in RDF::Trine::Model. Judicious use of them can seriously speed up this module. This is the tip, bestie, this is the one. π«Ά
π AUTHOR π
Toby Inkster <tobyink@cpan.org>.
π COPYRIGHT π
Copyright 2011-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under any of the following licences:
- The Artistic License 1.0
http://www.perlfoundation.org/artistic_license_1_0. - The GNU General Public License Version 1
http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt, or (at your option) any later version. - The W3C Software Notice and License
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231. - The Clarified Artistic License
http://www.ncftp.com/ncftp/doc/LICENSE.txt.
π 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.
π¨ Yeah, all caps means business. No warranty, no promises, no take-backs. π
and that's the whole page, bestie π¦β¨ β this was perl v5.32.1, dated 2021-09-24, from the user-contributed Perl documentation section. Go forth and infer responsibly, periodt. ππ
π¦ where this page comes from
- debian bookworm: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms