- fix launch_pal dependency for PAL internal and external users
- add last facts to diagnostics
- Contributors: Luka Juricic
- api.KB: expose load() + add support for clear(keep_defaults=True) clear(keep_defaults=True) removes all statements in the knowledge base, but keep the ones coming for the 'default ontologies' loaded at startup
- Contributors: Séverin Lemaignan
- increase the queue size for /kb/add_fact and /kb/remove_fact
- Contributors: Séverin Lemaignan
- add missing knowledge_viewer script
- Contributors: Séverin Lemaignan
- add launch file to start kb_explorer
- Contributors: Séverin Lemaignan
- escape turtle/n3 reserved characters This implementation ignores terms that are quoted (ie, string literal) and does not escape the '?' and '@' as they can legitimately occur in a term/sparql statement. '' is escaped (ie, if a character was already escaped, it will be double escaped. fix escape
- [kb explorer] update classes to reflect dbpedia use in ORO
- Contributors: Séverin Lemaignan
- [doc] update doc to match simpler async ROS2 pythonic API
- fix async calls
- [doc] add mention of kb_msgs and oro
- Contributors: Luka Juricic, Séverin Lemaignan
- teaching knowledge_core about foaf, prov and dbp prefixes
- Contributors: Séverin Lemaignan
- simplify launch file by using new 'get_pal_configuration(cmdline_args)' parameter
- fix typo in config file path
- Contributors: Séverin Lemaignan
- teach knowledge core about DBPedia prefixes
- Contributors: Séverin Lemaignan
- rename diagnostics msg to match documentation (and diagnostic_aggregator) categories
- Contributors: Séverin Lemaignan
- typo in module
- Contributors: Séverin Lemaignan
- fix installation of module and configuration
- Contributors: Séverin Lemaignan
- install kb_explorer files
- [doc] various documentation improvements
- Contributors: Séverin Lemaignan
- bump version
- Contributors: Séverin Lemaignan
- correctly report topic namespace when subscribing to events
- Contributors: Séverin Lemaignan
- bump version
- [minor] doc typo
- Contributors: Séverin Lemaignan
- replace KB webgui by the explorer
- kb_explorer: add support for active_concepts
- kb_explorer: port to ROS2 using roslib It requires rosbridge_server running on the ROS2 side. You can start the rosbridge server using: ros2 launch rosbridge_server rosbridge_websocket_launch.xml
- import kb_explorer from ROS1's kb_rest
- please pep 257 linter
- [doc] mention details, about, label APIs in README
- add support for querying for concepts' labels via /kb/label Also support multiple languages
- add /kb/details to the ROS API + improve returned details Including removing 'internal' facts, BNode, providing the list of relations involving the term, etc
- add kb.on_active_concepts method to register custom callbacks when a new active concept is detected
- publish active concepts on /kb/active_concepts
- implemented ActiveConcept Any concept marked as 'rdf:type ActiveConcept' is a currently 'active' concept. The 'rdf:type ActiveConcept' is automatically removed after a period of time (currently set to 5 seconds). It can be used to eg display what concepts are currently important in the knowledge base because they have been eg recently added or refered to in a discussion
- Contributors: Séverin Lemaignan
- launch knowledge_core in the kb/ namespace ...and ensure all the topics/services are right under that namespace
- Port launchfile to py, handle the default_kb parameter Add logic to parse ontology path in the form of ontology://pkg/file, so that the ontology to be loaded can be found across packages Make the node PAPS-007 conformant, by fetching configuration files invarious ament-index'ed locations
- install PAL module + bump version
- [doc] statement lifespans are supported
- Contributors: Séverin Lemaignan
- [test] disable flaky test
- [test] please linter
- Contributors: Séverin Lemaignan
- port to ROS 2 humble
- srv files have moved to kb-msgs
- Contributors: Séverin Lemaignan
- fix events being sometimes triggered multiple times or never
- doc/line wrapping
- fix test_ros.py that was incorrect when running without a reasoner
- fix sparql() that was broken since eb0c97a1bef3e74
- reimplemented lookup(); fixes unittest While here, strenghten the literals unittest and fix some issues that arose.
- make it possible to update the lifespan of statements (either to extend or shorten it)
- workaround for rdflib 6.2.x bug See RDFLib/rdflib#2077
- automatically remove statements reaching the end of their lifespan
- do not crash when starting with --no-ros
- add metadata graph to each model + store insertion date of every stmts
- do not return blank nodes (BNodes) when querying the kb
- Contributors: Séverin Lemaignan
- bump version
- Contributors: Séverin Lemaignan
- fixed representation of string + fix logic of lookup() for RDFS.label
- fix exception when using wildcard statement retractation While here, removed from the unittest the unsupported case of multiple statements with wildcards
- Contributors: Séverin Lemaignan
- more robustely parse RDF terms
- Contributors: Séverin Lemaignan
- bump version
- Contributors: Séverin Lemaignan
- fix bug in wildcard retract when objects are literals
- Contributors: Séverin Lemaignan
- add diagnostics publishing
- Contributors: Séverin Lemaignan
- added test for wildcard retracting
- wildcard retracting allowing wildcards when retracting entries from the knowledge base. E.g., retracting 'some_subj ?p ?o' will now delete any triplet from the specified model in the knowledge base where the subject is 'some_subj'.
- Contributors: Séverin Lemaignan, lorenzoferrini
- add launch file
- Contributors: Séverin Lemaignan
- add dependency on reasonable
- update pypi doc
- Contributors: Séverin Lemaignan
- fix KB.find to properly handle ROS queries with no variable specified It now returns all present variables instead of an error
- output literal as python/JSON literal instead of XSD ones
- minor debug msg changes
- Contributors: Séverin Lemaignan
- add missing space in SPAQRL prefixes
- [api] expose 'stats' to the ROS py wrapper
- [minor] improve debug message experience
- Update README.md with example of how to use the ROS API
- increase logging level of several msgs
- fix corner case where trying to publish to unregistered evt topic
- Contributors: Séverin Lemaignan
- [api] add (back) ability to save the knowledge base
- Contributors: Séverin Lemaignan
Major changes:
- [api] pythonic API over ROS
To use:
` from knowledge_core.api import KB kb = KB() `
then:` kb += "ari rdf:type Human" kb -= "ari rdf:type Human" if "ari rdf:type Human": print("come one, ARI is not a human!") def on_robot(evt): print("new robots! %s" % evt) kb.subscribe("* rdf:type Robot", on_robot) kb += ["tiago rdf:type Robot", "ari rdf:type Robot"] `
...and more - support events via ROS service + topics One subscribe to an event via the /kb/events [Event.srv] service. The service returns an event id corresponding to a topic (eg /kb/events/evt_1234) that the client can subscribe to to be notified when the event triggers. /examples/kb_events_ros.py provides an example.
- [api] add support for the 'lookup' API
- [api] add support for the 'about' API
Other changes:
- [api] fix inconsistency in return type of 'find'
- [doc] briefly document ROS support
- set the asyncore loop timeout to 20ms for much more responsive events
- Contributors: Séverin Lemaignan
- add missing dep on message_runtime
- move ROS back to own file + add support for adding/removing facts via topics
- [api] add now an alias for update
- Contributors: Séverin Lemaignan
- remove ontologies from this repo Ontologies are stored in an independent repo (oro)
- minor maintainance (doc, copyright...)
- Contributors: Séverin Lemaignan
- add back missing files following project renaming
- Contributors: Séverin Lemaignan
- provide better feedback when running outside of ROS
- more minimalkb->KnowledgeCore
- Contributors: Séverin Lemaignan
- rename project to KnowledgeCore
- setup.py: install bin so that the project remains usable via pip
- Contributors: Séverin Lemaignan
- increase coverage of ROS Query test + only test reasoning if reasoner available
- kb.version + export whether reasoner available through ROS Manage service
- Contributors: Séverin Lemaignan
Released on 12 Apr 2022
- Add ROS support via Revise, Query, Sparql, Manage services
Released on 30 Mar 2022
- better error handling/reporting
- slightly stricter statement parsing
- updated LICENSE to 2022
- remove requirement for rdflib >= 6.0.0 (works with RDFlib 4.x.x)
Released on 30 Mar 2022
- change find() API to make it more consistent
- whatever the number of variables, always returns a list of dict with the variables as key
- the param ‘vars’ is now optional.
- if no variable is passed, search for all variables by default
- anonymous variables (starting by
__
) are now named var1, var2,… in the results
- removed unused
minimalkb/services
sub-package
Released on 29 Mar 2022
- add
kb.label
to retrieve (multi-lingual) labels associated to a term - add support for querying direct classes, instances, subclasses,
superclasses (via eg
kb.details
) - significantly simplify the event subscription mechanism. Now, you
simply pass a list of patterns with an optional
one_shot
parameter (false by default) - better API documentation
- remove
kb.check
as it was strictly equivalent tokb.exist
- fix bug where loaded ontologies would not be processed by the reasoner
- fix internal methods being mistakenly exposed in the API
- a few other minor bug fixes
Attention: minimalkb-2.0 is a major rewrite of minimalkb, and only partially backward-compatible with minimalkb-1.x.x
- complete rewrite of the core, around rdflib-6.x.x
- as a consequence, much more standard-compilant parsing of statements
- integration with
`reasonable
<https://github.com/gtfierro/reasonable>`__ for fast OWL2 RL reasoning. - a new
sparql
API method has been add, to perform raw SPARQL queries.
Porting notes from 1.x.x:
- old compatibility (
compat
) API methods have been removed - the
find
API method does not take aconstraints
parameter any more retract
has been renamed toremove
- fix a corner case where conversion of literals to Python object was actually incorrect
- literal are now converted to their respective Python type (not yet done for XSD literal like “10^^xsd:integer”)
Main changes since 1.1.2:
- create custom readme to please pypi
Main changes since 1.1.0:
- fix issue preventing the loading of external ontologies
Main changes since 1.0.0:
- fix issue with SQLite triple store where statements were uniquely identified by an unstable hash algorithm.
Main changes since 0.9:
- port to python3
- added (some) documentation
- api: load() can take option ‘models’ parameter
- provide more exhaustive API documentation with starting with –debug
- added support for OWL2 RL rules cls-thing and cls-nothing1
Main changes since 0.8.1:
- fixes + doc in the reasoning engine
- clean-up of unit-tests (cf current results below)
- a few other minor bugfixes
Unit-tests results:
testing/test.py
: 17 tests, 1 expected error (unsupported feature: multiple var in multi-pattern queries) , 0 failuretesting/test_reasoner.py
: 5 tests, 0 errors, 0 failurestesting/test_embedded.py
: 17 tests, 4 errors, 3 failures
Main changes since 0.8:
- version correctly bumped ;-)
Main changes since 0.7:
- improved a bit behaviour of memoization: ‘undecided’ reasoning results are not memoized anymore; ‘clear’ also clear memoized results
- use only the default model (previously all) when no model is specified
- ‘lookup’ request has been significantly improved, in particular by taking into account labels.
- ‘check’ has a first partial implementation (by just checking if checked statement are already asserted)
- fix a bad bug leading to models being ignored in an ‘about’ request
- fix a race with the reasoner when clearing the database
Main changes since 0.6:
- fix a serious issue with events (that were not triggered more than once)
- support the NEW_CLASS_EVENT properly
- slightly improved the reasoning capabilities: every models are now correctly classified, owl:equivalentClass and a few common owl symmetric predicates (owl:sameAs, owl:differentFrom) are handled to some extend.
Also, compatibility with the C++ liboro bindings (hence, oro-view) has been extended to events.
Main changes:
- many improvements to the way minimalKB deals with ending/closing
- support for ‘embedding’ minimalKB in a Python application (via ‘pykb.KB’ constructor option)
- support for RPC call with keyword arguments
- a couple of other bugs smashed out.
Main changes: - support for functional properties (new statements replace existing values instead of adding new facts) - fixed a bug in event id generation that broke the event system - a handful of other minor fixes
Main new features:
- fixed incorrect event dispatching when more than one client
- support statements with limited lifespan
- much extended taxonomy walking (oro-view now works with minimalKB)
Main changes:
- large rewrite of the query management (still far from complete, though).
- as a consequence, better handling of complex queries like: [?a desires ?b, ?b type Action]
- existence check can now handle any pattern
- support of OWL/RDF/turtle/n3 loading when RDFlib is available
- added basic command-line options
Main changes: - addition of a simple RDFS reasoner (supports only rdf:type and rdfs:subClassOf for now) - initial work for a RDFlib backend
First release of minimalKB
- only a simple SQLite backend
- run (but do not pass!) all ~300 Dialogs unit-tests, both with pyoro and pykb.