logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

RDF::Closure::Model - RDF::Trine::Model-compatible inferface

Author

       Toby Inkster <tobyink@cpan.org>.

Description

       This module provides a subclass of RDF::Trine::Model allowing you to dollop some reasoning into existing
       RDF::Trine code very easily. While RDF::Closure::Engine allows you to infer lots of new statements from
       an existing model, this class also allows you to add and remove statements from the reasoned model with
       new inferences calculated on-the-fly.

       Removing a statement is much slower than adding one, though adding a statement isn't what you'd call
       fast. Juditious use of "begin_bulk_ops" and "end_bulk_ops" is recomnmended.

       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 which are no longer entailed by the
       explicit data, or for the inferred data to be missing some inferences. A "recalculate" method is provided
       which allows you to re-run the inference from scratch.

   Constructor
       •   "new($input, [, engine => $engine ] [, store => $store ])"

           Instantiates  a  module.  $input may be undef, an existing RDF::Trine::Model or an RDF::Trine::Store.
           The input will not be modified.

           $engine is the inference engine to use; a string suitable for passing to "RDF::Closure::Engine->new";
           defaults to 'RDFS'.

           $store is an RDF::Trine::Store to use to build the inferred model in; defaults to  a  new,  temporary
           store.

   Methods
       This  package  inherits  from  RDF::Trine::Model  and  provides  all the methods it does. It additionally
       provides:

       •   "entailment_regime"

           Returns a URI string identifying the type of inference in use.

       •   "recalculate"

           Drops and re-infers all inferred data.

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.

perl v5.32.1                                       2021-09-24                           RDF::Closure::Model(3pm)

Name

       RDF::Closure::Model - RDF::Trine::Model-compatible inferface

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.

       <http://www.perlrdf.org/>.

See Also