Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand extended content to create sets driven from subgraph #269

Open
elrayle opened this issue Aug 12, 2019 · 0 comments
Open

Expand extended content to create sets driven from subgraph #269

elrayle opened this issue Aug 12, 2019 · 0 comments

Comments

@elrayle
Copy link
Contributor

elrayle commented Aug 12, 2019

Description:

Most extended context describes some property about the search result subject. It may be a triple directly off the subject, or it may require a more complex ldpath description to get to the value.

There is an additional use case where the extended context is about an entity in the extended context. For example, a search is performed which returns subjects for works. There is an agent for a work. The agent is a piece of extended context about the work. The agent itself can have an agent-role. This agent-role is related to the agent and not to the work itself.

How can we configure and normalize output to indicate the agent-role is connected to the agent?

Proposed Solution

Related subgraphs will be gathered in the context as context sets. A context set will include the following information.

  • an ldpath that defines the base path for the subgraph
  • properties to pull from the subgraph that are related to each other

Example Context Set for Agent

  • Subgraph defined by: bf:contribution / bf:agent
  • Property: bf:contribution / bf:agent / rdfs:label
  • Property: bf:contribution / bf:agent / bf:role / rdfs:label

NOTE: Above ldpaths start from the search result URI.

Snippet of Context Set Configuration in QA Authority:

  "sets": {
    "agent": {
      "group_label_i18n": "qa.linked_data.authority.locnaf_ld4l_cache.agent_set",
      "group_label_default": "Agents",
    }
  },
  "properties": [
    ...
    {
      "set_id": "agent",
      "property_label_i18n": "qa.linked_data.authority.locnaf_ld4l_cache.agent",
      "property_label_default": "Agent",
      "lpath": "bf:contribution/bf:agent/rdfs:label",
      "selectable": false,
      "drillable": false
    },
    {
      "set_id": "agent",
      "property_label_i18n": "qa.linked_data.authority.locnaf_ld4l_cache.agent_role",
      "property_label_default": "Agent Role",
      "lpath": "bf:contribution/bf:agent/bf:role/rdfs:label",
      "selectable": false,
      "drillable": false
    },
    ...
  ]
}

Snippet of Normalized QA Output:

[
    ...
    {
      "set": "Agents",
        [
          {
            "property": "Agent",
            "values: ['Twain, Mark'],
            "selectable": false,
            "drillable": false
          },
          {
            "property": "Agent Role",
            "values: ['Contributor'],
            "selectable": false,
            "drillable": false
          }
        ],
        [
          {
            "property": "Agent",
            "values: ['Chatto & Windus'],
            "selectable": false,
            "drillable": false
          },
          {
            "property": "Agent Role",
            "values: ['Publisher'],
            "selectable": false,
            "drillable": false
          }
        ]
    }
    ...
]

Full QA Output example

[
  {
    "property": "Authoritative Label",
    "values": ["Adventures of Huckleberry Finn"],
    "selectable": true,
    "drillable": false
  },
 
  {
    "property": "Variant Label",
    "values": ["Huckleberry Finn"],
    "selectable": false,
    "drillable": false
  },
  {
    "set": "Agents",
      [
        {
          "property": "Agent",
          "values: ['Twain, Mark'],
          "selectable": false,
          "drillable": false
        },
        {
          "property": "Agent Role",
          "values: ['Contributor'],
          "selectable": false,
          "drillable": false
        }
      ],
      [
        {
          "property": "Agent",
          "values: ['Chatto & Windus'],
          "selectable": false,
          "drillable": false
        },
        {
          "property": "Agent Role",
          "values: ['Publisher'],
          "selectable": false,
          "drillable": false
        }
      ]
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant