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

Simple triples is missing data #29

Open
alliyya opened this issue Mar 8, 2022 · 5 comments
Open

Simple triples is missing data #29

alliyya opened this issue Mar 8, 2022 · 5 comments
Assignees
Labels
Conversion: CWRC This is related to the conversion process using the CWRC ontologies. (Classic Branch) type:bug type:enhancement New feature or request

Comments

@alliyya
Copy link
Member

alliyya commented Mar 8, 2022

Task: investigate what components may be currently missing.

Further enhancements are needed to make sure that simple triples are comprehensive for all use cases.

Current Queries (March 11th)

From March 8th

@alliyya alliyya added the type:enhancement New feature or request label Mar 8, 2022
@alliyya alliyya self-assigned this Mar 8, 2022
@alliyya
Copy link
Member Author

alliyya commented Mar 10, 2022

Schools and some other parts of education may be missing.

Schools are their own entities with typings and need to be handled more similarly to Responses.

@alliyya
Copy link
Member Author

alliyya commented Mar 10, 2022

Uncertain if Oeuvres are represented in simple triples

@alliyya
Copy link
Member Author

alliyya commented Mar 11, 2022

every entity needs to have an associated type. including places, LOC. etc.

@alliyya
Copy link
Member Author

alliyya commented Mar 11, 2022

Current Queries:

Simple Triples:

PREFIX cwrc: <http://sparql.cwrc.ca/ontologies/cwrc#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX data: <http://cwrc.ca/cwrcdata/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX bf: <http://id.loc.gov/ontologies/bibframe/>
CONSTRUCT {
  ?contextFocus ?subjectCentricP ?otherRelations ;
    rdfs:label ?name;
    a ?focusType.
  ?otherRelations rdfs:label ?label;
    a ?type.
}
WHERE {
  VALUES ?nameOfInterest {
    "Yonge, Charlotte"
  }
  GRAPH <http://sparql.cwrc.ca/data/orlando/1.7> {
    {
      ?contextFocus rdfs:label ?nameOfInterest;
                    a ?focusType.
      bind(?nameOfInterest as ?name)
      ?context cwrc:contextFocus ?contextFocus ;
               ?p ?o .
      filter(?contextFocus != ?o) #Getting rid of circular relations
      ?p cwrc:subjectCentricPredicate ?subjectCentricP .
      filter(?p != cwrc:response) # attempt at removing duplicate responses
      optional {
        ?o rdfs:label ?label;
           a ?type.
      }
      bind (?o as ?otherRelations)
    }
    union
    {
      {
        ?o rdfs:label ?nameOfInterest.
        ?context cwrc:contextFocus ?contextFocus ;
                 ?p ?o .
        ?contextFocus rdfs:label ?name;
                      a ?focusType.
        filter(?contextFocus != ?o) #Getting rid of circular relations
        ?p cwrc:subjectCentricPredicate ?subjectCentricP .
        filter(?p != cwrc:response) # attempt at removing duplicate responses
        optional {
          ?context ?p ?otherRelations.
          ?otherRelations rdfs:label ?label.
          ?otherRelations rdf:type ?type
          filter(?contextFocus != ?otherRelations)
        }
      }
    }
    filter(?type != bf:Person) # no bf:person
    filter(?focusType != bf:Person) # no bf:person

  }
}

Responses

PREFIX cwrc: <http://sparql.cwrc.ca/ontologies/cwrc#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX data: <http://cwrc.ca/cwrcdata/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX bf: <http://id.loc.gov/ontologies/bibframe/>
CONSTRUCT {
  ?contextFocus cwrc:hasResponse ?response;
    rdfs:label ?focusName;
    a ?focusType.
  ?response a ?type;
    rdfs:label ?label;
    cwrc:hasResponseRelationTo ?otherRelations.
  ?otherRelations rdfs:label ?relationName;
    a  ?otherRelationsType.
}
WHERE {
  VALUES ?name {
    "Yonge, Charlotte"
  }
  GRAPH <http://sparql.cwrc.ca/data/orlando/1.7> {
    {
      ?context cwrc:response ?response;
               cwrc:contextFocus ?contextFocus.
      ?contextFocus rdfs:label ?focusName;
                    a ?focusType.
      ?response  a ?type;
                 rdfs:label ?label;
                 cwrc:hasResponseRelationTo ?relation.
      ?relation rdfs:label ?name.
      optional {
        ?response cwrc:hasResponseRelationTo ?otherRelations.
        ?otherRelations rdfs:label ?relationName;
                        a  ?otherRelationsType.
      }
    }
    union 
    {
      ?contextFocus rdfs:label ?name;
                    a ?focusType.
      bind (?name as ?focusName)
      ?context cwrc:response ?response;
               cwrc:contextFocus ?contextFocus.
      ?response  a ?type;
                 rdfs:label ?label;
                 cwrc:hasResponseRelationTo ?otherRelations.
      ?otherRelations rdfs:label ?relationName;
                      a  ?otherRelationsType.
    }
    filter(?type != bf:Person)
  }                      .
}

@alliyya alliyya added the Conversion: CWRC This is related to the conversion process using the CWRC ontologies. (Classic Branch) label May 8, 2022
@alliyya
Copy link
Member Author

alliyya commented Jul 11, 2022

Awards are missing (Thanks Hannah for catching this)

TODO: Review education triples, there's likely gaps with schools and educational texts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Conversion: CWRC This is related to the conversion process using the CWRC ontologies. (Classic Branch) type:bug type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant