diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 76bdcb93..d919365f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,4 +21,4 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/docs/source/releases/release-notes.rst b/docs/source/releases/release-notes.rst index 47830c55..48309a58 100644 --- a/docs/source/releases/release-notes.rst +++ b/docs/source/releases/release-notes.rst @@ -2,71 +2,18 @@ Release Notes ============= -This release adds new features and enhancements to Nexus Forge as well as bug fixes. - -New Features -============ - -Resolving ---------- - -* Added ontology resource resolving based on skos:prefLabel and skos:altLabel in addition to label and skos:notation. `#245 `__ (|Binder_Resolving| to try it) - -Modeling --------- - -* Add support for validation against a schema. `#217 `__ (|Binder_Modeling| to try it) - -.. code-block:: python - - from kgforge.core import KnowledgeGraphForge - # see https://github.com/BlueBrain/nexus-forge/blob/master/examples/notebooks/use-cases/prod-forge-nexus.yml for a full forge config example. - forge = KnowledgeGraphForge(configuration="./config.yml", **kwargs) - person = Resource(type="Person", name="Jane Doe") - # By default the schema associated with the resource type is picked for validation. A different type can be set using the type_ argument. - forge.validate(person, type_="Agent") +This release introduces new enhancements to Nexus Forge. Enhancements ============ -Querying --------- - -|Binder_Querying| to try the querying enhancements. - -* Added support for searching using filters (except when Paths syntax is used) from _store_metadata properties (i.e _createdAt, _updatedAt,...) `#224 `__ `#240 `__ (issue `#209 `__) -* Added support for searching using datetime filters which can be specify as string suffixed with `^^xsd:dateTime` `#224 `__ - -.. code-block:: python +Storing +------- - from kgforge.core import KnowledgeGraphForge - # see https://github.com/BlueBrain/nexus-forge/blob/master/examples/notebooks/use-cases/prod-forge-nexus.yml for a full forge config example. - forge = KnowledgeGraphForge(configuration="./config.yml", **kwargs) - filters = { - "type": "Dataset", - "_createdAt":'"2022-04-12T21:29:14.410Z"^^xsd:dateTime' - } - forge.search(filters) +|Binder_Storing| to try the enhancements. - -* Added support for disabling SPARQL rewriting when a correct SPARQL is provided `#224 `__ (issue `#218 `__) -* Inline query limit/offset arguments are now superseded by limit/offset provided as argument for `forge.search()` `#224 `__ (issue `#189 `__) -* Added support for `IN` SPARQL clause when rewriting SPARQL queries in `forge.search()` `#240 `__ (issue `#242 `__) -* Using filters as argument when calling `forge.search(*filters, **params)` now raises an exception `#240 `__ -* When using BlueBrainNexusStore, `forge.retrieve()` and `forge.search()` now get the `original registered JSON payload `__ to avoid any JSON transformation `#232 `__ -* `forge.search()` returns resources at the exact revision they are stored in the configured searchendpoint and no longer at the latest revision. As a consequence search results are no longer `_sychronized` `#232 `__ -* `_last_action` property is now added to resources obtained from `forge.retrieve()` `#232 `__ -* Added the property distribution.atLocation.store.type and distribution.atLocation.store.type._rev to BlueBrainNexusStore file metadata mapping file `#232 `__ -* When using BlueBrainNexusStore, it is possible to set (in the forge config file) GET params when calling `forge.retrieve() `#232 `__ - -Converting ----------- - -|Binder_JSON-LD-IO| to try the JSON-LD enhancements. - -* `forge.as_jsonld(r, form="expanded")` now outputs expanded JSON-LD with @value added for literals. `#244 `__ -* `forge.as_jsonld(r, form="compacted")` keeps unchanged JSON null values and arrays. The param `array_as_set` is no longer needed and is thus removed along with the `na` argument `#244 `__ +* Synchronize nested resources of a given resources when calling `forge.register(resource)` `#269 `__ (issue `#211 `__) Resolving @@ -74,32 +21,31 @@ Resolving |Binder_Resolving| to try the resolving enhancements. -* Added `searchendpoints` config in the `forge config Resolvers section `__ `#226 `__ +* Added ResolvingStrategy.EXACT_CASEINSENSITIVE_MATCH as a new case-insensitive exact match resolving strategy `#275 `__ `#277 `__ -Bug Fixes -========= -* Added an identifier and the forge model configured JSON-LD context to resources obtained from an ElasticSearch query `#238 `__ (issue `#230 `__) (|Binder_Querying| to try it) -* Fixed failing SPARQL query rewriting when a used JSON-LD context term does not have `@id` `#231 `__ +Formatting +---------- + +|Binder_Formatting| to try the enhancements. + +* Added a new identifier formatter for BBP Nexus Store deployment `#278 `__ + Changelog ========= -`Full changelog `__ +`Full changelog `__ .. |Binder_Resolving| image:: https://mybinder.org/badge_logo.svg :alt: Binder_Querying - :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.7.1?filepath=examples%2Fnotebooks%2Fgetting-started%2F09%20-%20Resolving.ipynb - -.. |Binder_Modeling| image:: https://mybinder.org/badge_logo.svg - :alt: Binder_Modeling - :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.7.1?filepath=examples%2Fnotebooks%2Fgetting-started%2F09%20-%20Modeling.ipynb + :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.8.0?filepath=examples%2Fnotebooks%2Fgetting-started%2F09%20-%20Resolving.ipynb -.. |Binder_JSON-LD-IO| image:: https://mybinder.org/badge_logo.svg - :alt: Binder_JSON-LD-IO - :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.7.1?filepath=examples%2Fnotebooks%2Fgetting-started%2F13%20-%20JSON-LD%20IO.ipynb +.. |Binder_Storing| image:: https://mybinder.org/badge_logo.svg + :alt: Binder_Storing + :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.8.0?filepath=examples%2Fnotebooks%2Fgetting-started%2F03%20-%20Storing.ipynb -.. |Binder_Querying| image:: https://mybinder.org/badge_logo.svg - :alt: Binder_Querying - :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.7.1?filepath=examples%2Fnotebooks%2Fgetting-started%2F04%20-%20Querying.ipynb +.. |Binder_Formatting| image:: https://mybinder.org/badge_logo.svg + :alt: Binder_Formatting + :target: https://mybinder.org/v2/gh/BlueBrain/nexus-forge/v0.8.0?filepath=examples%2Fnotebooks%2Fgetting-started%2F08%20-%20Formatting.ipynb diff --git a/examples/notebooks/getting-started/09 - Resolving-test.ipynb b/examples/notebooks/getting-started/09 - Resolving-test.ipynb deleted file mode 100644 index 86d32fef..00000000 --- a/examples/notebooks/getting-started/09 - Resolving-test.ipynb +++ /dev/null @@ -1,1396 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "ExecuteTime": { - "end_time": "2019-09-23T18:50:19.036357Z", - "start_time": "2019-09-23T18:50:19.031896Z" - } - }, - "source": [ - "# Resolving\n", - "\n", - "[Resolvers](https://nexus-forge.readthedocs.io/en/latest/interaction.html#resolving) are helpers to find commonly used resources that one may want to link resources to. Resolvers are configured in the `Resolvers` section of the configuration file. " - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "ExecuteTime": { - "end_time": "2019-09-23T18:50:20.068658Z", - "start_time": "2019-09-23T18:50:19.054054Z" - } - }, - "outputs": [], - "source": [ - "from kgforge.core import KnowledgeGraphForge" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "token=\"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI5T0R3Z1JSTFVsTTJHbFphVDZjVklnenJsb0lzUWJmbTBDck1icXNjNHQ4In0.eyJleHAiOjE2MTcyMzI1MDIsImlhdCI6MTYxNzIwNTA1NywiYXV0aF90aW1lIjoxNjE3MjAzNzAyLCJqdGkiOiJjNTU2ZmM4OS1lMWE0LTRmYWQtYjUzYS1lMzFlZmE1OWVhYzEiLCJpc3MiOiJodHRwczovL2JicGF1dGguZXBmbC5jaC9hdXRoL3JlYWxtcy9CQlAiLCJzdWIiOiJmOjBmZGFkZWY3LWIyYjktNDkyYi1hZjQ2LWM2NTQ5MmQ0NTljMjpzeSIsInR5cCI6IkJlYXJlciIsImF6cCI6Im5leHVzLXdlYiIsIm5vbmNlIjoiYTczZWZlZTRkYmQyNDk4NTlkMzgxMjEyYzhmODQyM2YiLCJzZXNzaW9uX3N0YXRlIjoiMjE2N2Y2YzAtYTBlNy00NWFjLTg2MTgtMjk0NTk4MGQ1YWIzIiwiYWNyIjoiMCIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwczovL2Rldi5uZXh1cy5vY3AuYmJwLmVwZmwuY2giLCJodHRwczovL2JicC5lcGZsLmNoIiwiaHR0cDovL2Rldi5uZXh1cy5vY3AuYmJwLmVwZmwuY2giLCJodHRwczovL3N0YWdpbmcubmV4dXMub2NwLmJicC5lcGZsLmNoIiwiaHR0cHM6Ly9iYnAtbmV4dXMuZXBmbC5jaCIsImh0dHBzOi8vYmJwdGVhbS5lcGZsLmNoIiwiaHR0cDovL3N0YWdpbmcubmV4dXMub2NwLmJicC5lcGZsLmNoIl0sInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZ3JvdXBzIGVtYWlsIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsIm5hbWUiOiJNb2hhbWV0aCBGcmFuw6dvaXMgU3kiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzeSIsImdpdmVuX25hbWUiOiJNb2hhbWV0aCBGcmFuw6dvaXMiLCJmYW1pbHlfbmFtZSI6IlN5IiwiZW1haWwiOiJtb2hhbWV0aC5zeUBlcGZsLmNoIn0.E8HLmA9pCcNY0A-6HVbK-IAeyBA1ZAicZcSgW8JBhmZj2vyuz03MHTTenePqfXEXP2iQos67ssXZA2sAyfpCDrokt9amtkmrn10hRgetX4q-5-VTZfBhyW7XE2WjHsPjh-c9FiPbpP1HwwjnWQTsnaDeXOQPmUJ6K7FfbOYdqcRAXBP4gPyuqTzdPMRhZIPb-e45Yr7sLYa2Fh5Npq2_ILEspPUP1JFPrvecVMri-8fa8eu3vd4LYR4CRnjAZd50IgIhBDAjP80V5siV8kJrGMoY0b4J5KHXhVhovgZjwHPVdishXuQVAyyhqCQAFACB_WzL6mSp2LXkGW91H0A88A\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "A configuration file is needed in order to create a KnowledgeGraphForge session. A configuration can be generated using the notebook [00-Initialization.ipynb](00%20-%20Initialization.ipynb)." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fcontexts%2Fresource.json/source\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/neurosciencegraph/datamodels/_/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fcontexts%2Fresource.json/source\n", - "200\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fbbp.neuroshapes.org\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/neurosciencegraph/datamodels/_/https%3A%2F%2Fbbp.neuroshapes.org\n", - "200\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fneuroshapes.org\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/neurosciencegraph/datamodels/_/https%3A%2F%2Fneuroshapes.org\n", - "200\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fcontexts%2Fresource.json/source\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/neurosciencegraph/datamodels/_/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fcontexts%2Fresource.json/source\n", - "200\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fcontexts%2Fresource.json/source\n", - "https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/bbp/agents/_/https%3A%2F%2Fbluebrain.github.io%2Fnexus%2Fcontexts%2Fresource.json/source\n", - "200\n" - ] - } - ], - "source": [ - "forge = KnowledgeGraphForge(\"/Users/mfsy/dev/apps/forked/nexus-forge/examples/configurations/prod-forge-nexus-entity-resolver.yml\",\n", - " token=token,\n", - " bucket=\"dke/myverycoolproj\", \n", - " endpoint=\"https://staging.nexus.ocp.bbp.epfl.ch/v1\",\n", - " debug=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'0.5.3.dev4+g33bc591.d20210331'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from kgforge.version import __version__\n", - "__version__" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Imports" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "from kgforge.core.commons.strategies import ResolvingStrategy" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Discover scopes, resolvers and targets\n", - "\n", - "With the `forge.resolvers()` method, the user can inspect the available scopes, resolvers, and targets.\n", - "A scope is linked to a data source (directory, store, or URL). Each scope will have at least one resolver, which is an implementation of the Forge Resolver. A resolver can have multiple targets, and it will delimitate the resolution within the resolver's scope." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Available scopes:\n", - " - agent :\n", - " - resolver: AgentResolver\n", - " - targets: agents\n", - " - entity :\n", - " - resolver: EntityLinkerElasticSearch\n", - " - targets: terms\n", - " - ontology :\n", - " - resolver: OntologyResolver\n", - " - targets: terms\n" - ] - } - ], - "source": [ - "forge.resolvers()" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[('somato', [{'id': 'http://api.brain-map.org/api/v2/data/Structure/1006', 'type': 'Class', 'label': 'Primary somatosensory area, trunk, layer 1', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-tr1', 'prefLabel': 'Primary somatosensory area, trunk, layer 1', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1026', 'type': 'Class', 'label': 'Primary somatosensory area, upper limb, layer 6b', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ul6b', 'prefLabel': 'Primary somatosensory area, upper limb, layer 6b', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1030', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 1', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll1', 'prefLabel': 'Primary somatosensory area, lower limb, layer 1', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1035', 'type': 'Class', 'label': 'Supplemental somatosensory area, layer 4', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSs4', 'prefLabel': 'Supplemental somatosensory area, layer 4', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1038', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 6a', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd6a', 'prefLabel': 'Primary somatosensory area, barrel field, layer 6a', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1047', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 4', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd4', 'prefLabel': 'Primary somatosensory area, barrel field, layer 4', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1062', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 6b', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd6b', 'prefLabel': 'Primary somatosensory area, barrel field, layer 6b', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1128', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 5', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll5', 'prefLabel': 'Primary somatosensory area, lower limb, layer 5', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/113', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 2/3', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll2/3', 'prefLabel': 'Primary somatosensory area, lower limb, layer 2/3', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/12993', 'type': 'Class', 'label': 'Somatosensory areas, layer 1', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SS1', 'prefLabel': 'Somatosensory areas, layer 1', 'subClassOf': 'nsg:BrainRegion'}])]\n", - "ddddd\n", - "('somato', [{'id': 'http://api.brain-map.org/api/v2/data/Structure/1006', 'type': 'Class', 'label': 'Primary somatosensory area, trunk, layer 1', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-tr1', 'prefLabel': 'Primary somatosensory area, trunk, layer 1', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1026', 'type': 'Class', 'label': 'Primary somatosensory area, upper limb, layer 6b', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ul6b', 'prefLabel': 'Primary somatosensory area, upper limb, layer 6b', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1030', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 1', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll1', 'prefLabel': 'Primary somatosensory area, lower limb, layer 1', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1035', 'type': 'Class', 'label': 'Supplemental somatosensory area, layer 4', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSs4', 'prefLabel': 'Supplemental somatosensory area, layer 4', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1038', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 6a', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd6a', 'prefLabel': 'Primary somatosensory area, barrel field, layer 6a', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1047', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 4', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd4', 'prefLabel': 'Primary somatosensory area, barrel field, layer 4', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1062', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 6b', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd6b', 'prefLabel': 'Primary somatosensory area, barrel field, layer 6b', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1128', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 5', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll5', 'prefLabel': 'Primary somatosensory area, lower limb, layer 5', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/113', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 2/3', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll2/3', 'prefLabel': 'Primary somatosensory area, lower limb, layer 2/3', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/12993', 'type': 'Class', 'label': 'Somatosensory areas, layer 1', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SS1', 'prefLabel': 'Somatosensory areas, layer 1', 'subClassOf': 'nsg:BrainRegion'}])\n" - ] - } - ], - "source": [ - "res= forge.resolve(\"somato\", scope=\"ontology\", type=\"Class\", strategy=ResolvingStrategy.ALL_MATCHES)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "re = forge.resolve(\"EPFL\", scope=\"agent\", strategy=ResolvingStrategy.BEST_MATCH)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "re" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtypelabeldefinitionisDefinedBynotationprefLabelsubClassOf
0http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, lower limb, layer 5http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ll5Primary somatosensory area, lower limb, layer 5nsg:BrainRegion
1http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, lower limb, layer 2/3http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ll2/3Primary somatosensory area, lower limb, layer 2/3nsg:BrainRegion
2http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, lower limb, layer 1http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ll1Primary somatosensory area, lower limb, layer 1nsg:BrainRegion
3http://api.brain-map.org/api/v2/data/Structure...ClassSupplemental somatosensory area, layer 4http://bbp.epfl.ch/neurosciencegraph/ontologie...SSs4Supplemental somatosensory area, layer 4nsg:BrainRegion
4http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, barrel field, laye...http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-bfd6aPrimary somatosensory area, barrel field, laye...nsg:BrainRegion
5http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, barrel field, layer 4http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-bfd4Primary somatosensory area, barrel field, layer 4nsg:BrainRegion
6http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, barrel field, laye...http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-bfd6bPrimary somatosensory area, barrel field, laye...nsg:BrainRegion
7http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, trunk, layer 1http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-tr1Primary somatosensory area, trunk, layer 1nsg:BrainRegion
8http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, upper limb, layer 6bhttp://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ul6bPrimary somatosensory area, upper limb, layer 6bnsg:BrainRegion
9http://api.brain-map.org/api/v2/data/Structure...ClassSomatosensory areas, layer 1http://bbp.epfl.ch/neurosciencegraph/ontologie...SS1Somatosensory areas, layer 1nsg:BrainRegion
\n", - "
" - ], - "text/plain": [ - " id type \\\n", - "0 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "1 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "2 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "3 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "4 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "5 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "6 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "7 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "8 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "9 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "\n", - " label definition \\\n", - "0 Primary somatosensory area, lower limb, layer 5 \n", - "1 Primary somatosensory area, lower limb, layer 2/3 \n", - "2 Primary somatosensory area, lower limb, layer 1 \n", - "3 Supplemental somatosensory area, layer 4 \n", - "4 Primary somatosensory area, barrel field, laye... \n", - "5 Primary somatosensory area, barrel field, layer 4 \n", - "6 Primary somatosensory area, barrel field, laye... \n", - "7 Primary somatosensory area, trunk, layer 1 \n", - "8 Primary somatosensory area, upper limb, layer 6b \n", - "9 Somatosensory areas, layer 1 \n", - "\n", - " isDefinedBy notation \\\n", - "0 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ll5 \n", - "1 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ll2/3 \n", - "2 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ll1 \n", - "3 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSs4 \n", - "4 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-bfd6a \n", - "5 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-bfd4 \n", - "6 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-bfd6b \n", - "7 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-tr1 \n", - "8 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ul6b \n", - "9 http://bbp.epfl.ch/neurosciencegraph/ontologie... SS1 \n", - "\n", - " prefLabel subClassOf \n", - "0 Primary somatosensory area, lower limb, layer 5 nsg:BrainRegion \n", - "1 Primary somatosensory area, lower limb, layer 2/3 nsg:BrainRegion \n", - "2 Primary somatosensory area, lower limb, layer 1 nsg:BrainRegion \n", - "3 Supplemental somatosensory area, layer 4 nsg:BrainRegion \n", - "4 Primary somatosensory area, barrel field, laye... nsg:BrainRegion \n", - "5 Primary somatosensory area, barrel field, layer 4 nsg:BrainRegion \n", - "6 Primary somatosensory area, barrel field, laye... nsg:BrainRegion \n", - "7 Primary somatosensory area, trunk, layer 1 nsg:BrainRegion \n", - "8 Primary somatosensory area, upper limb, layer 6b nsg:BrainRegion \n", - "9 Somatosensory areas, layer 1 nsg:BrainRegion " - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "forge.as_dataframe(res)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Terms" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To find resources using resolver, you can use regex expressions within the provided string." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### scope\n", - "Resolve a resource for `female` in the terms." - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[]\n" - ] - } - ], - "source": [ - "result = forge.resolve(\n", - " [\"diabetes\",\"covid-19\"],\n", - " scope=\"entity\",\n", - " target = \"terms\",\n", - " limit=10,\n", - " threshold=0.8,\n", - " strategy=ResolvingStrategy.EXACT_MATCH\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "NoneType" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "type(result)" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "'NoneType' object is not subscriptable", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mforge\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mas_dataframe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"diabetes\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m: 'NoneType' object is not subscriptable" - ] - } - ], - "source": [ - "forge.as_dataframe(result[\"diabetes\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"size\": 10,\n", - " \"_source\": {\n", - " \"exclude\": [\"embedding\"]\n", - " },\n", - " \"query\": {\n", - " \"script_score\": {\n", - " \"query\": {\n", - " \"exists\": {\n", - " \"field\": \"embedding\"\n", - " }\n", - " },\n", - " \"script\": {\n", - " \"source\": \"doc['embedding'].size() == 0 ? 0 : (cosineSimilarity(params.queryVector, doc['embedding'])+1.0) / 2\",\n", - " \"params\": {\n", - " \"queryVector\": [-0.06318674236536026, 0.017056960612535477, -0.05687783658504486, -0.04961063712835312, -0.055770013481378555, 0.07958485931158066, 0.11064236611127853, -0.10723460465669632, 0.12150656431913376, 0.06838510185480118, -0.16287577152252197, 0.0036786971613764763, -0.12537777423858643, 0.02500958926975727, 0.09008166939020157, 0.045686326920986176, 0.07828816771507263, -0.001064969110302627, 0.15681831538677216, 0.13517893850803375, -0.028591299429535866, -0.04068496450781822, 0.05460236594080925, 0.015284581109881401, 0.07718798518180847, 0.009188370779156685, -0.0941006988286972, 0.08962488174438477, -0.026030832901597023, 0.19158291816711426, 0.03038346767425537, 0.08494362235069275, -0.08508966863155365, -0.047578055411577225, -0.12622548639774323, 0.11468279361724854, -0.1808488368988037, 0.1316303014755249, 0.018884902819991112, 0.010770749300718307, 0.022466659545898438, 0.11284452676773071, -0.058591749519109726, 0.06493109464645386, -0.07334264367818832, 0.15541072189807892, 0.02732429839670658, -0.11239490658044815, -0.04452183470129967, 0.07472005486488342, -0.025349073112010956, -0.0064052557572722435, -0.0545775480568409, -0.1701928973197937, 0.1171276792883873, -0.07550744712352753, -0.08526283502578735, 0.10705793648958206, -0.007919976487755775, 0.004633917007595301, 0.0361194871366024, -0.05085267871618271, 0.015095999464392662, 0.008926331996917725, -0.026636993512511253, 0.10942723602056503, 0.0993582010269165, -0.005028528161346912, -0.09476382285356522, 0.030978042632341385, -0.032393038272857666, -0.12793108820915222, 0.008940879255533218, -0.04396217688918114, 0.09607124328613281, -0.0679934024810791, -0.11704546213150024, -0.04570922628045082, 0.07971583306789398, -0.055352307856082916, -0.0033038537949323654, 0.08546634763479233, 0.0906103253364563, 0.0015061864396557212, -0.029740462079644203, -0.11008624732494354, 0.045565348118543625, 0.04666541516780853, 0.0706753060221672, 0.03676597401499748, -0.1258198618888855, 0.02330753207206726, 0.007685295306146145, 0.10492029041051865, -0.07350043952465057, 0.012367922812700272, -0.040422920137643814, 0.13253985345363617, -0.07163478434085846, 0.13930170238018036, 0.06291647255420685, 0.01020688097923994, 0.024039441719651222, 0.02229279838502407, 0.06631708145141602, 0.09703384339809418, 0.08566532284021378, 0.14827390015125275, -0.11922971904277802, 0.10077875852584839, 0.14910706877708435, 0.10825697332620621, 0.1725500524044037, 0.10821139067411423, -0.02815954200923443, -0.054691825062036514, 0.037509188055992126, 0.012780158780515194, 0.03460140898823738, 0.026123233139514923, 0.06865038722753525, -0.10310269892215729, -0.11820479482412338, 0.03926319256424904, 0.08443860709667206, 0.027671996504068375, 0.1333904266357422, -0.07140961289405823, -0.03036557510495186, 0.07176783680915833, 0.17313572764396667, -0.06011480093002319, 0.03044525906443596, -0.06695707142353058, 0.07327664643526077, -0.18785588443279266, 0.019129374995827675, 0.03947685658931732, -0.12801730632781982, 0.18097615242004395, -0.07585350424051285, 0.18448811769485474, -0.011218170635402203, 0.1625910848379135, -0.06643730401992798, 0.11979494988918304, -0.1181163415312767, -0.07100541144609451, 0.09992106258869171, 0.11203210055828094, -0.024011125788092613, 0.1220514103770256, 0.08095696568489075, -0.0904512107372284, -0.16544519364833832, -0.030708681792020798, -0.01552105974406004, 0.0053552608005702496, 0.09825281798839569, 0.008354120887815952, 0.12669244408607483, 0.017147915437817574, -0.013287762179970741, 0.01191788725554943, 0.055341608822345734, -0.0993829071521759, 0.08416282385587692, -0.13000838458538055, 0.1472133994102478, 0.0755796730518341, -0.054969027638435364, 0.002381528727710247, 0.12599867582321167, 0.08442728221416473, 0.19714652001857758, -0.033803947269916534, 0.14858795702457428, 0.009812142699956894, 0.10624462366104126, 0.128893181681633, -0.154297336935997, 0.004863475915044546, 0.09608969837427139, -0.03023470565676689, -0.05721775442361832, -0.023621251806616783, -0.09534997493028641, -0.0692063495516777, -0.0817047581076622, -0.10128659754991531, -0.12436564266681671, -0.06688477098941803, -0.03620181605219841, 0.009591644629836082, 0.15832921862602234, 0.052338290959596634, -0.05045191943645477, 0.0436733141541481, 0.011792813427746296, 0.09302110224962234, 0.0716274306178093, -0.05580728501081467, 0.01141833234578371, -0.11193204671144485, 0.0961427390575409, -0.012793589383363724, 0.008298134431242943, -0.17493848502635956, -0.12214327603578568, 0.12841114401817322, 0.006631434895098209, 0.0699044018983841, 0.06317304819822311, -0.02597074769437313, -0.03305799141526222, -0.040184829384088516, -0.06565944850444794, 0.014530735090374947, 0.0032472354359924793, -0.07588525861501694, 0.17429298162460327, -0.043430980294942856, -0.1062096357345581, 0.06159812957048416, 0.019158555194735527, 0.10089364647865295, 0.16287153959274292, 0.040109485387802124, -0.15134260058403015, 0.1654958724975586, -0.01999571919441223, 0.05071735382080078, -0.060226473957300186, 0.0504385307431221, 0.059086792171001434, 0.06204705312848091, 0.0005025854334235191, -0.10125263780355453, -0.03839161992073059, -0.0020141766872256994, -0.02881273813545704, 0.1475628763437271, 0.17236962914466858, 0.070134736597538, -0.06842593103647232, 0.18318647146224976, 0.021807437762618065, 0.0242037121206522, -0.14286594092845917, -0.15149950981140137, 0.186759814620018, -0.06733150035142899, 0.1449187994003296, 0.0063732462003827095, 0.07025810331106186, 0.004106203094124794, 0.07412970811128616, -0.035419952124357224, -0.1257784366607666, 0.08722204715013504, 0.04490261897444725, -0.08603692799806595, 0.07697343081235886, -0.05575799569487572, -0.026347285136580467, 0.03802864998579025, -0.09340986609458923, -0.13330000638961792, -0.02144971676170826, -0.0018227804685011506, 0.10562407970428467, -0.03870806470513344, -0.10024603456258774, -0.1258011907339096, 0.04270568862557411, 0.15457388758659363, -0.096076600253582, 0.04668760672211647, 0.05663395673036575, 0.19698099792003632, -0.0799114778637886, -0.09857992082834244, 0.03749582916498184, -0.024896793067455292, 0.0769171342253685, 0.018364451825618744, -0.08614527434110641, -0.07916735857725143, -0.08039257675409317, 0.04877756908535957, 0.1365644335746765, -0.02335198037326336, -0.06592240184545517, -0.07134587317705154, 0.0898221805691719, -0.054237738251686096, -0.00409023417159915, -0.015309611335396767, -0.08033604174852371, -0.02631666511297226]\n", - " }\n", - " }\n", - " }\n", - " }\n", - " }\n", - "[('0befef0a-134a-455f-8244-c09940fffee0', [Candidate(_validated=False, _synchronized=False, score=1.0, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/0befef0a-134a-455f-8244-c09940fffee0', @type='http://schema.org/SoftwareAgent', name='random name 02b7437e-c1f7-401c-990f-cc09cab93125', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0befef0a-134a-455f-8244-c09940fffee0', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:12.234520Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:12.234520Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0befef0a-134a-455f-8244-c09940fffee0/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0befef0a-134a-455f-8244-c09940fffee0/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.7800082, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', @type='http://schema.org/SoftwareAgent', name='random name 02b7437e-c1f7-401c-990f-cc09cab93125', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:12.880466Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:12.880466Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.7779727, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/9203e600-98de-42fe-aacc-152411970b5c', @type='http://schema.org/SoftwareAgent', name='random name 02b7437e-c1f7-401c-990f-cc09cab93125', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:15.100153Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:15.100153Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.69894576, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/635b6cac-c948-45d1-b258-8d564738635f', @type='http://schema.org/SoftwareAgent', name='random name 02b7437e-c1f7-401c-990f-cc09cab93125', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:14.465959Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:14.465959Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.69775426, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/df95cc4c-b99b-4e08-a8e8-b4a4fe722485', @type='http://schema.org/SoftwareAgent', name='random name 0e67223c-605b-49cb-aaf7-8bdbbb4edebc', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:35.714181Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:35.714181Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.6860905, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1647a417-8f7a-46e0-99b4-21ce0b27e44a', @type='http://schema.org/SoftwareAgent', name='random name b710dfde-68f0-43bb-808d-13a35384317e', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:38.654618Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:38.654618Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.68565005, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/96773bbd-0f02-4469-8388-01ed3979805a', @type='http://schema.org/SoftwareAgent', name='random name 02b7437e-c1f7-401c-990f-cc09cab93125', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:13.857705Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:13.857705Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.68226916, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/0fc1e9cd-b67c-4876-acb9-8df458d63feb', @type='http://schema.org/SoftwareAgent', name='random name a136961f-e795-49ed-ab92-30b95b26d5e6', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:32.621396Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:32.621396Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.67268145, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/c5c2d542-b589-45c5-9572-08978af21d84', @type='http://schema.org/SoftwareAgent', name='random name f36b6192-dd5e-472c-a584-e1239bca4e31', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:48:02.652105Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:48:02.652105Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84/outgoing', _last_action=None, _store_metadata=None), Candidate(_validated=False, _synchronized=False, score=0.67232597, @id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/cde04474-e9a1-4f36-8426-f6c6e316e9d0', @type='http://schema.org/SoftwareAgent', name='random name 0ee72127-9593-424d-a10a-5f0a8b9de9c3', version='0.0.1', _self='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0', _constrainedBy='https://bluebrain.github.io/nexus/schemas/unconstrained.json', _project='https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', _rev=1, _deprecated=False, _createdAt='2021-02-13T19:47:29.890972Z', _createdBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _updatedAt='2021-02-13T19:47:29.890972Z', _updatedBy='https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', _incoming='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0/incoming', _outgoing='https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0/outgoing', _last_action=None, _store_metadata=None)])]\n", - "[('0befef0a-134a-455f-8244-c09940fffee0', [{'score': 0.67232597, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/cde04474-e9a1-4f36-8426-f6c6e316e9d0', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 0ee72127-9593-424d-a10a-5f0a8b9de9c3', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:29.890972Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:29.890972Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0/outgoing'}, {'score': 0.67268145, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/c5c2d542-b589-45c5-9572-08978af21d84', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name f36b6192-dd5e-472c-a584-e1239bca4e31', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:48:02.652105Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:48:02.652105Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84/outgoing'}, {'score': 0.68226916, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/0fc1e9cd-b67c-4876-acb9-8df458d63feb', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name a136961f-e795-49ed-ab92-30b95b26d5e6', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:32.621396Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:32.621396Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb/outgoing'}, {'score': 0.68565005, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/96773bbd-0f02-4469-8388-01ed3979805a', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:13.857705Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:13.857705Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a/outgoing'}, {'score': 0.6860905, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1647a417-8f7a-46e0-99b4-21ce0b27e44a', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name b710dfde-68f0-43bb-808d-13a35384317e', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:38.654618Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:38.654618Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a/outgoing'}, {'score': 0.69775426, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/df95cc4c-b99b-4e08-a8e8-b4a4fe722485', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 0e67223c-605b-49cb-aaf7-8bdbbb4edebc', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:35.714181Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:35.714181Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485/outgoing'}, {'score': 0.69894576, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/635b6cac-c948-45d1-b258-8d564738635f', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:14.465959Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:14.465959Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f/outgoing'}, {'score': 0.7779727, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/9203e600-98de-42fe-aacc-152411970b5c', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:15.100153Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:15.100153Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c/outgoing'}, {'score': 0.7800082, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:12.880466Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:12.880466Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955/outgoing'}])]\n", - "ddddd\n", - "('0befef0a-134a-455f-8244-c09940fffee0', [{'score': 0.67232597, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/cde04474-e9a1-4f36-8426-f6c6e316e9d0', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 0ee72127-9593-424d-a10a-5f0a8b9de9c3', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:29.890972Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:29.890972Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fcde04474-e9a1-4f36-8426-f6c6e316e9d0/outgoing'}, {'score': 0.67268145, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/c5c2d542-b589-45c5-9572-08978af21d84', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name f36b6192-dd5e-472c-a584-e1239bca4e31', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:48:02.652105Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:48:02.652105Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fc5c2d542-b589-45c5-9572-08978af21d84/outgoing'}, {'score': 0.68226916, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/0fc1e9cd-b67c-4876-acb9-8df458d63feb', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name a136961f-e795-49ed-ab92-30b95b26d5e6', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:32.621396Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:32.621396Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F0fc1e9cd-b67c-4876-acb9-8df458d63feb/outgoing'}, {'score': 0.68565005, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/96773bbd-0f02-4469-8388-01ed3979805a', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:13.857705Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:13.857705Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F96773bbd-0f02-4469-8388-01ed3979805a/outgoing'}, {'score': 0.6860905, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1647a417-8f7a-46e0-99b4-21ce0b27e44a', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name b710dfde-68f0-43bb-808d-13a35384317e', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:38.654618Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:38.654618Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1647a417-8f7a-46e0-99b4-21ce0b27e44a/outgoing'}, {'score': 0.69775426, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/df95cc4c-b99b-4e08-a8e8-b4a4fe722485', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 0e67223c-605b-49cb-aaf7-8bdbbb4edebc', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:35.714181Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:35.714181Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2Fdf95cc4c-b99b-4e08-a8e8-b4a4fe722485/outgoing'}, {'score': 0.69894576, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/635b6cac-c948-45d1-b258-8d564738635f', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:14.465959Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:14.465959Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F635b6cac-c948-45d1-b258-8d564738635f/outgoing'}, {'score': 0.7779727, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/9203e600-98de-42fe-aacc-152411970b5c', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:15.100153Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:15.100153Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F9203e600-98de-42fe-aacc-152411970b5c/outgoing'}, {'score': 0.7800082, '@id': 'https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', '@type': 'http://schema.org/SoftwareAgent', 'name': 'random name 02b7437e-c1f7-401c-990f-cc09cab93125', 'version': '0.0.1', '_self': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', '_constrainedBy': 'https://bluebrain.github.io/nexus/schemas/unconstrained.json', '_project': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/projects/dke/myverycoolproj', '_rev': 1, '_deprecated': False, '_createdAt': '2021-02-13T19:47:12.880466Z', '_createdBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_updatedAt': '2021-02-13T19:47:12.880466Z', '_updatedBy': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/realms/bbp/users/sy', '_incoming': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955/incoming', '_outgoing': 'https://staging.nexus.ocp.bbp.epfl.ch/v1/resources/dke/myverycoolproj/_/https%3A%2F%2Fsandbox.bluebrainnexus.io%2Fv1%2Fresources%2Fdke%2Fmyverycoolproj%2F_%2Fhttps%3A%2F%2Fbbp.epfl.ch%2Fdke%2Fkgforge_tests%2F1e4bd1b0-e0dd-4cd7-9aad-70133eed6955/outgoing'}])\n" - ] - } - ], - "source": [ - "result = forge.resolve(\"0befef0a-134a-455f-8244-c09940fffee0\",\n", - " scope=\"entity\",\n", - " target = \"terms\",\n", - " limit=10,\n", - " threshold=1.0,\n", - " strategy=ResolvingStrategy.ALL_MATCHES\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "../../configurations/entitylinking-resolver/entitylinking-mapper-es.hjson\n" - ] - } - ], - "source": [ - "!ls ../../configurations/entitylinking-resolver/entitylinking-mapper-es.hjson\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "list" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "type(result)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/cde04474-e9a1-4f36-8426-f6c6e316e9d0', type='http://schema.org/SoftwareAgent', score=0.67232597),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/c5c2d542-b589-45c5-9572-08978af21d84', type='http://schema.org/SoftwareAgent', score=0.67268145),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/0fc1e9cd-b67c-4876-acb9-8df458d63feb', type='http://schema.org/SoftwareAgent', score=0.68226916),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/96773bbd-0f02-4469-8388-01ed3979805a', type='http://schema.org/SoftwareAgent', score=0.68565005),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1647a417-8f7a-46e0-99b4-21ce0b27e44a', type='http://schema.org/SoftwareAgent', score=0.6860905),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/df95cc4c-b99b-4e08-a8e8-b4a4fe722485', type='http://schema.org/SoftwareAgent', score=0.69775426),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/635b6cac-c948-45d1-b258-8d564738635f', type='http://schema.org/SoftwareAgent', score=0.69894576),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/9203e600-98de-42fe-aacc-152411970b5c', type='http://schema.org/SoftwareAgent', score=0.7779727),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/1e4bd1b0-e0dd-4cd7-9aad-70133eed6955', type='http://schema.org/SoftwareAgent', score=0.7800082),\n", - " Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='https://sandbox.bluebrainnexus.io/v1/resources/dke/myverycoolproj/_/https://bbp.epfl.ch/dke/kgforge_tests/0befef0a-134a-455f-8244-c09940fffee0', type='http://schema.org/SoftwareAgent', score=1.0)]" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "result" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtypescore
0https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.672326
1https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.672681
2https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.682269
3https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.685650
4https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.686091
5https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.697754
6https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.698946
7https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.777973
8https://sandbox.bluebrainnexus.io/v1/resources...http://schema.org/SoftwareAgent0.780008
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "1 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "2 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "3 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "4 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "5 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "6 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "7 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "8 https://sandbox.bluebrainnexus.io/v1/resources... \n", - "\n", - " type score \n", - "0 http://schema.org/SoftwareAgent 0.672326 \n", - "1 http://schema.org/SoftwareAgent 0.672681 \n", - "2 http://schema.org/SoftwareAgent 0.682269 \n", - "3 http://schema.org/SoftwareAgent 0.685650 \n", - "4 http://schema.org/SoftwareAgent 0.686091 \n", - "5 http://schema.org/SoftwareAgent 0.697754 \n", - "6 http://schema.org/SoftwareAgent 0.698946 \n", - "7 http://schema.org/SoftwareAgent 0.777973 \n", - "8 http://schema.org/SoftwareAgent 0.780008 " - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "forge.as_dataframe(result)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "../../configurations/entitylinking-resolver/entitylinking-mapper.hjson\n" - ] - } - ], - "source": [ - "!ls ../../configurations/entitylinking-resolver/entitylinking-mapper.hjson\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### target" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'id': 'http://api.brain-map.org/api/v2/data/Structure/1070', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 5', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd5', 'prefLabel': 'Primary somatosensory area, barrel field, layer 5', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1086', 'type': 'Class', 'label': 'Primary somatosensory area, trunk, layer 4', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-tr4', 'prefLabel': 'Primary somatosensory area, trunk, layer 4', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1090', 'type': 'Class', 'label': 'Supplemental somatosensory area, layer 5', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSs5', 'prefLabel': 'Supplemental somatosensory area, layer 5', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1094', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 4', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll4', 'prefLabel': 'Primary somatosensory area, lower limb, layer 4', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1102', 'type': 'Class', 'label': 'Primary somatosensory area, mouth, layer 6a', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-m6a', 'prefLabel': 'Primary somatosensory area, mouth, layer 6a', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1111', 'type': 'Class', 'label': 'Primary somatosensory area, trunk, layer 5', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-tr5', 'prefLabel': 'Primary somatosensory area, trunk, layer 5', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/1128', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 5', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll5', 'prefLabel': 'Primary somatosensory area, lower limb, layer 5', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/113', 'type': 'Class', 'label': 'Primary somatosensory area, lower limb, layer 2/3', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-ll2/3', 'prefLabel': 'Primary somatosensory area, lower limb, layer 2/3', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/2', 'type': 'Class', 'label': 'Primary somatosensory area, mouth, layer 6b', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-m6b', 'prefLabel': 'Primary somatosensory area, mouth, layer 6b', 'subClassOf': 'nsg:BrainRegion'}, {'id': 'http://api.brain-map.org/api/v2/data/Structure/201', 'type': 'Class', 'label': 'Primary somatosensory area, barrel field, layer 2/3', 'isDefinedBy': 'http://bbp.epfl.ch/neurosciencegraph/ontologies/mba', 'notation': 'SSp-bfd2/3', 'prefLabel': 'Primary somatosensory area, barrel field, layer 2/3', 'subClassOf': 'nsg:BrainRegion'}]\n" - ] - } - ], - "source": [ - "b = forge.resolve(\"somatosensory\", scope=\"ontology\", target=\"terms\", strategy=ResolvingStrategy.ALL_MATCHES)" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtypelabeldefinitionisDefinedBynotationprefLabelsubClassOf
0http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, barrel field, layer 5http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-bfd5Primary somatosensory area, barrel field, layer 5nsg:BrainRegion
1http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, trunk, layer 4http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-tr4Primary somatosensory area, trunk, layer 4nsg:BrainRegion
2http://api.brain-map.org/api/v2/data/Structure...ClassSupplemental somatosensory area, layer 5http://bbp.epfl.ch/neurosciencegraph/ontologie...SSs5Supplemental somatosensory area, layer 5nsg:BrainRegion
3http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, lower limb, layer 4http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ll4Primary somatosensory area, lower limb, layer 4nsg:BrainRegion
4http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, mouth, layer 6ahttp://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-m6aPrimary somatosensory area, mouth, layer 6ansg:BrainRegion
5http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, trunk, layer 5http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-tr5Primary somatosensory area, trunk, layer 5nsg:BrainRegion
6http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, lower limb, layer 5http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ll5Primary somatosensory area, lower limb, layer 5nsg:BrainRegion
7http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, lower limb, layer 2/3http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-ll2/3Primary somatosensory area, lower limb, layer 2/3nsg:BrainRegion
8http://api.brain-map.org/api/v2/data/Structure/2ClassPrimary somatosensory area, mouth, layer 6bhttp://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-m6bPrimary somatosensory area, mouth, layer 6bnsg:BrainRegion
9http://api.brain-map.org/api/v2/data/Structure...ClassPrimary somatosensory area, barrel field, laye...http://bbp.epfl.ch/neurosciencegraph/ontologie...SSp-bfd2/3Primary somatosensory area, barrel field, laye...nsg:BrainRegion
\n", - "
" - ], - "text/plain": [ - " id type \\\n", - "0 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "1 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "2 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "3 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "4 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "5 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "6 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "7 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "8 http://api.brain-map.org/api/v2/data/Structure/2 Class \n", - "9 http://api.brain-map.org/api/v2/data/Structure... Class \n", - "\n", - " label definition \\\n", - "0 Primary somatosensory area, barrel field, layer 5 \n", - "1 Primary somatosensory area, trunk, layer 4 \n", - "2 Supplemental somatosensory area, layer 5 \n", - "3 Primary somatosensory area, lower limb, layer 4 \n", - "4 Primary somatosensory area, mouth, layer 6a \n", - "5 Primary somatosensory area, trunk, layer 5 \n", - "6 Primary somatosensory area, lower limb, layer 5 \n", - "7 Primary somatosensory area, lower limb, layer 2/3 \n", - "8 Primary somatosensory area, mouth, layer 6b \n", - "9 Primary somatosensory area, barrel field, laye... \n", - "\n", - " isDefinedBy notation \\\n", - "0 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-bfd5 \n", - "1 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-tr4 \n", - "2 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSs5 \n", - "3 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ll4 \n", - "4 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-m6a \n", - "5 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-tr5 \n", - "6 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ll5 \n", - "7 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-ll2/3 \n", - "8 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-m6b \n", - "9 http://bbp.epfl.ch/neurosciencegraph/ontologie... SSp-bfd2/3 \n", - "\n", - " prefLabel subClassOf \n", - "0 Primary somatosensory area, barrel field, layer 5 nsg:BrainRegion \n", - "1 Primary somatosensory area, trunk, layer 4 nsg:BrainRegion \n", - "2 Supplemental somatosensory area, layer 5 nsg:BrainRegion \n", - "3 Primary somatosensory area, lower limb, layer 4 nsg:BrainRegion \n", - "4 Primary somatosensory area, mouth, layer 6a nsg:BrainRegion \n", - "5 Primary somatosensory area, trunk, layer 5 nsg:BrainRegion \n", - "6 Primary somatosensory area, lower limb, layer 5 nsg:BrainRegion \n", - "7 Primary somatosensory area, lower limb, layer 2/3 nsg:BrainRegion \n", - "8 Primary somatosensory area, mouth, layer 6b nsg:BrainRegion \n", - "9 Primary somatosensory area, barrel field, laye... nsg:BrainRegion " - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "forge.as_dataframe(b)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### type" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "print(forge.resolve(\"female\", scope=\"terms\", type=\"Class\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Entity" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### scope\n", - "Resolving a resource for `EPFL` in the entities." - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'id': 'https://bbp.epfl.ch/neurosciencegraph/data/persons/287b93c3-40f9-42d2-9d77-b16bc536eb8a', 'type': ['Person', 'Agent'], 'familyName': 'Malcher Lopez', 'givenName': 'Renato', 'name': None}]\n" - ] - } - ], - "source": [ - "epfl = forge.resolve(\"Malcher Lopez\", scope=\"agent\", strategy=ResolvingStrategy.ALL_MATCHES)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "kgforge.core.resource.Resource" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "type(epfl)" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtypefamilyNamegivenName
0https://bbp.epfl.ch/neurosciencegraph/data/per...[Person, Agent]Malcher LopezRenato
\n", - "
" - ], - "text/plain": [ - " id type \\\n", - "0 https://bbp.epfl.ch/neurosciencegraph/data/per... [Person, Agent] \n", - "\n", - " familyName givenName \n", - "0 Malcher Lopez Renato " - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "forge.as_dataframe([epfl])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " id: https://bbp.epfl.ch/neurosciencegraph/data/persons/287b93c3-40f9-42d2-9d77-b16bc536eb8a\n", - " type:\n", - " [\n", - " Person\n", - " Agent\n", - " ]\n", - " familyName: Malcher Lopez\n", - " givenName: Renato\n", - "}\n" - ] - } - ], - "source": [ - "print(epfl)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### target" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'id': 'https://bbp.epfl.ch/neurosciencegraph/data/persons/287b93c3-40f9-42d2-9d77-b16bc536eb8a', 'type': ['Agent', 'Person'], 'familyName': 'Malcher Lopez', 'givenName': 'Renato', 'name': None}]\n" - ] - } - ], - "source": [ - "p = forge.resolve(\"Malcher Lopez\", scope=\"agent\", target=\"agents\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### type" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(forge.resolve(\"EPFL\", scope=\"entities\", type=\"Organization\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Strategies" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Different strategies can be used to resolve terms. \n", - "\n", - "In the following example, the missing 'e' at the end is intended for the demonstration." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "text = \"mal\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### best match" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The default applied strategy is `strategy=ResolvingStrategy.BEST_MATCH`." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(forge.resolve(text, scope=\"terms\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### exact match" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(forge.resolve(text, scope=\"terms\", strategy=ResolvingStrategy.EXACT_MATCH))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### fuzzy match (all matches)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The result list is ordered by matching relevance." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "results = forge.resolve(text, scope=\"terms\", strategy=ResolvingStrategy.ALL_MATCHES, limit=3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "type(results)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "len(results)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "type(results[0])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(*results, sep=\"\\n\")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python (entity_linking)", - "language": "python", - "name": "entity_linking" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.13" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -}