Biography

Provided Queries

This section contains links to pre-written SPARQL queries. Most of the queries below appear as:

                    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 oa: <http://www.w3.org/ns/oa#>

SELECT ?obj ?snippet WHERE { 
    GRAPH <http://sparql.cwrc.ca/db/BiographyV6> {
        ?context ?pred ?obj;
            cwrc:contextFocus ?person;
            oa:hasTarget ?target;
            rdf:type cwrc:FamilyContext.
        ?person rdfs:label "Fiennes, Celia".
    }
    
    ?target oa:hasSelector ?xpath_selector.
    ?xpath_selector oa:refinedBy ?text_selector.
    ?text_selector oa:exact ?snippet.
    ?pred cwrc:subjectCentricPredicate cwrc:hasFather.
}                   
                

This query starts with listing the prefixes of all the ontologies to be used. The variables that are being returned are the object that we're searching for, in this case Fiennes's father, and the snippet from which this information is derived from. This query also shows the graph that is being searched and specifies the context, which is listed after rdf:type. Outside of the graph section, the query searches for the snippet of text that the data is stored as. The last line is what we're searching for; it allows us to specify the relationship between the subject and the object.

The name of the person whose information is being searched is in bold. In this case, the person is Celia Fiennes. If you would like to search for another person, a name can be chosen from http://orlando.cambridge.org

The other data in bold is the predicate which connects the subject and object. There are a variety of predicated in the CWRC Ontology, any of which may be used to construct a query.

Family & Friends & Intimate Relationships

Who was the father of an author?

Who was the mother of an author?

Who was the brother of an author?

Notice the queries above only differ slightly. They each specify a different person and have a different predicate following the cwrc:subjectCentricPredicate, but are otherwise identical.

The predicate following 'cwrc:' can be replaced with many others which are listed on the CWRC website. Some examples include:

Who were the family members of a particular author?

Who were the siblings of a particular author?

Location

How many authors lived in London?

You will notice something different about the query above. Most of the other queries had the following construction under GRAPH:

                    ?context ?pred ?obj
                

This query had specified the object instead of leaving it as a variable. The object was taken from the GeoNames ontology. If you would like to specify a different location, search for a place on https://www.geonames.org/v3/and replace the number in the URI to reflect your desired location.

                    ?context ?pred <http://sws.geonames.org/2643743/>
                

Where did a particular author travel to?

What places has an author visited?

Did a particular author immigrate anywhere?

Occupation

How many authors were also teachers?

Notice how the query above returned a small number of people who were also teachers. There were certainly more than 45 teachers, so why was the result so small? This has to do with the specifics of your query. In the data teachers are not only grouped by hasOccupation but also by hasPaidOccupation, hasVolunteerOccupation, etc.

Using hasPaidOccupation and hasVolunteerOccupation alone would look like the following:

How many authors were paid teachers

How many authors were volunteer teachers

So you can see that the hasOccupation predicate can be replaced by others to modify queries. However, all of these predicates are also subproperties of the predicate Occupation. You can search for these subproperties by using the rdfs:subPropertyOf* constraint to return results for every author who was a teacher. The query below is an example of this:

How many authors were also teachers? (Using subproperties)

How many people held each job?

What was the most popular job?

Education

Where did a particular author go to school?

What subjects were studied by a particular author?

What were the schools attended by a particular author?

Death

When did a particular author die?

What was the cause of death of a particular author?

Where did a particular author die?

Where was a particular author buried?

Politics

What was a particular person’s political affiliation?

What political organizations was a particular author associated with?

Birth

When was a particular author born?

Where was a particular author born?

Health

Associated Via Health With

Violence

Associated By Violence With

Wealth

Relates Economically To

Leisure and society

What hobbies did a person enjoy?