NOTE: These queries are meant to be run in the SNAP SPARQL tab in Protege. They can be run in the normal SPARQL tab, but since that doesn't use the reasoner's inferences most will not return any useful results. SPARQL Query for Competancy Question 1: What dog breed would meet the needs of a large family with allergies in a large home? Usage scenario covered: A large family consisting of 3 kids is looking for a dog, thus, it requires a breed that is good with children, friendly, and has a high energy level. Explanation: This query is specifically using the family in competancy question 1. It returns whether or not the breed is a good fit based on some of the potential characteristic of the family: since it's a large family we use good with kids (inferred based on childfriendliness), and since there are multiple children the dog will need to have high activity level (inferred based on exercise level value). PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX cmns-cls: PREFIX cmns-rt: PREFIX oe2022-dogs: SELECT ?label ?popularityQuantitativeScore ?childfriendlinesslevel ?exerciseneedslevel WHERE { ?breed a oe2022-dogs:GoodForChildrenBreed; rdfs:label ?label. ?char_profile a oe2022-dogs:BreedCharacteristicProfile; cmns-cls:characterizes ?breed; oe2022-dogs:displaysChildFriendlinessLevel ?childfriendlinesslevel; oe2022-dogs:displaysExerciseNeedsLevel ?exerciseneedslevel. ?popularityRating a oe2022-dogs:BreedPopularityRating; cmns-rt:rates ?breed; cmns-rt:hasRatingScore ?ratingScore. ?ratingScore cmns-rt:hasMeasureWithinScale ?popularityQuantitativeScore. } ORDER BY ?popularityQuantitativeScore SPARQL Query for Competancy Question 2: What dog breeds are good for students living in apartments? Usage scenario covered: A group of 4 college students is looking to adopt a dog. PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX cmns-cols: PREFIX cmns-rt: PREFIX cmns-pts: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: select ?breedLabel ?rating where { oe2022-dogs-ind:Question2Student a oe2022-dogs:Student ; cmns-pts:playsRole ?adopter . ?adopter a oe2022-dogs:PotentialAdopter ; oe2022-dogs:primarilyResidesAt ?residence . ?residence a oe2022-dogs:Residence ; cmns-cols:comprises ?space . ?space a oe2022-dogs:ApartmentIndoorSpace . ?breed a oe2022-dogs:LowMaintenanceBreed ; a oe2022-dogs:LowExpenseBreed ; a oe2022-dogs:ApartmentFriendlyBreed ; rdfs:label ?breedLabel . ?popularityRating a oe2022-dogs:BreedPopularityRating ; cmns-rt:rates ?breed ; cmns-rt:hasRatingScore ?ratingScore . ?ratingScore cmns-rt:hasMeasureWithinScale ?rating . } order by ?rating This query specifically uses the person in competancy question 2 and seeing which dogs are a good fit. It returns the dogs that are a good fit based on: apartment friendliness (based on size, barking value, and stranger friendliness value), ability to care for on a low budget (based on size, initial cost, and health susceptability values), and ability to care for on minimal time (based on mental stimulation needing value, exercise needing value, and grooming value). The query returns the japanese chin. SPARQL Query for Competancy Question 3: What dog breeds are good for a farm environment in Texas? Usage scenario covered:A family with small kids are looking for a dog to help around their farm in Texas PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX cmns-cls: PREFIX cmns-cols: PREFIX cmns-rt: PREFIX cmns-pts: PREFIX prov: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: select Distinct ?breedLabel ?barkingLevel ?barkingLevelSource ?rating where { oe2022-dogs-ind:Question3FarmOwner a oe2022-dogs:Person ; cmns-pts:playsRole ?adopter . ?adopter a oe2022-dogs:PotentialAdopter ; oe2022-dogs:primarilyResidesAt ?residence . ?residence a oe2022-dogs:Residence ; cmns-cols:comprises ?space ; oe2022-dogs:isLocatedIn ?state . ?space a oe2022-dogs:OutdoorSpace . ?state oe2022-dogs:hasClimateZone ?zone . ?zone oe2022-dogs:isHotterClimateZoneThan oe2022-dogs:ClimateZone5 . ?breed a oe2022-dogs:HotClimateAppropriateBreed ; a oe2022-dogs:TrainableBreed ; a oe2022-dogs:HighExerciseNeedingBreed ; a oe2022-dogs:DogFriendlyBreed ; a oe2022-dogs:CatFriendlyBreed ; rdfs:label ?breedLabel . ?profile a oe2022-dogs:BreedCharacteristicProfile; cmns-cls:characterizes ?breed; prov:wasAttributedTo ?source ; oe2022-dogs:displaysBarkingLevel ?barkingLevel . ?source rdfs:label ?barkingLevelSource . ?popularityRating a oe2022-dogs:BreedPopularityRating ; cmns-rt:rates ?breed ; cmns-rt:hasRatingScore ?ratingScore . ?ratingScore cmns-rt:hasMeasureWithinScale ?rating . } order by ?barkingLevel ?rating This query specifically uses the person in competancy question 3 and seeing which dogs are a good fit. It returns the dogs that are a good fit based on: the location (since the home is in Texas, a warm climate, the dog must be tollerant to heat), good with other animals (such as cats and dogs which are inferred based on dog/cat friendliness values), able to be trained to be a herder (based on trainability value), and its ability to do a lot of physical work (based on exercise needing value). The query returns 2 results, both for australian cattle dog. This is because barking is important for herding, but the AKC and VetStreet give different values for how loud the dog is. SPARQL Query for Competancy Question 4: Is a greyhound a good breed for a large family with multiple pets, including cats and other dogs? Usage scenario covered: A large family consisting of 3 kids is looking for a dog; A family just came into a pet store looking to get a new dog PREFIX rdfs: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: select ?breedLabel where { oe2022-dogs-ind:Question4Family a oe2022-dogs:FamilyWithSmallChildren ; oe2022-dogs:ownsPet ?dog ; oe2022-dogs:ownsPet ?cat . ?dog a oe2022-dogs:Dog . ?cat a oe2022-dogs:Cat . oe2022-dogs-ind:Greyhound a oe2022-dogs:GoodForChildrenBreed ; a oe2022-dogs:DogFriendlyBreed ; a oe2022-dogs:CatFriendlyBreed ; rdfs:label ?breedLabel . } This query is specifically using the family in competancy question 4 and seeing if a greyhound is an appropriate dog for them. It returns whether or not the breed is a good fit based on some of the potential characteristic of the family: since it's a large family we use good with kids (inferred based on playfullness and child safety values), good with other dogs (inferred based on dog friendliness value), and good with cats (inferred based on cat friendliness value). The query returns nothing, since a greyhound is not a good choice for this type of family. For additional details, each part of the query can be run individually. Due to the nature of SNAP SPARQL, ask queries must be written as select queries that return nothing if the result would be false. The first and third queries return the label since greyhound is a good for children breed and a dog friendly breed. The second does not return anything since greyhound is not a cat friendly breed. PREFIX rdfs: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: select ?breedLabel where { oe2022-dogs-ind:Question4Family a oe2022-dogs:FamilyWithSmallChildren . oe2022-dogs-ind:Greyhound a oe2022-dogs:GoodForChildrenBreed ; rdfs:label ?breedLabel . } PREFIX rdfs: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: select ?breedLabel where { oe2022-dogs-ind:Question4Family oe2022-dogs:ownsPet ?cat . ?cat a oe2022-dogs:Cat . oe2022-dogs-ind:Greyhound a oe2022-dogs:CatFriendlyBreed ; rdfs:label ?breedLabel . } PREFIX rdfs: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: select ?breedLabel where { oe2022-dogs-ind:Question4Family oe2022-dogs:ownsPet ?dog . ?dog a oe2022-dogs:Dog . oe2022-dogs-ind:Greyhound a oe2022-dogs:DogFriendlyBreed ; rdfs:label ?breedLabel . } SPARQL Query for Competancy Question 5: Question: What is a cute dog breed that can do well in an apartment that doesn’t get cleaned very often? Explanation: Query first requires apartment friendly characteristics (which will require a low barking, high stranger friendliness level, and a small or medium sized breed). It also requires that the dog have low shedding and drooling to account for the lack of cleaning in this apartment. It prioritizes our hard apartment constraints (barking and stranger friendliness) but ranks by popularity to account for the "cuteness" expectation Sample answer: Poodle PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX cmns-cls: PREFIX cmns-rt: PREFIX oe2022-dogs: SELECT ?label ?popularityQuantitativeScore ?barkinglevel ?strangerfriendlinesslevel ?sheddinglevel ?droolinglevel ?maxWeight WHERE { ?breed a oe2022-dogs:ApartmentFriendlyBreed; a oe2022-dogs:LowSheddingBreed; a oe2022-dogs:LowDroolingBreed; rdfs:label ?label. ?char_profile a oe2022-dogs:BreedCharacteristicProfile; cmns-cls:characterizes ?breed; oe2022-dogs:displaysDroolingLevel ?droolinglevel; oe2022-dogs:displaysSheddingLevel ?sheddinglevel; oe2022-dogs:displaysBarkingLevel ?barkinglevel; oe2022-dogs:displaysStrangerFriendlinessLevel ?strangerfriendlinesslevel. ?phys_profile a oe2022-dogs:BreedPhysicalProfile; cmns-cls:characterizes ?breed; oe2022-dogs:hasMaxWeight ?maxWeight. ?popularityRating a oe2022-dogs:BreedPopularityRating; cmns-rt:rates ?breed; cmns-rt:hasRatingScore ?ratingScore. ?ratingScore cmns-rt:hasMeasureWithinScale ?popularityQuantitativeScore. } ORDER BY ?popularityQuantitativeScore ?barkinglevel DESC(?strangerfriendlinesslevel) ?sheddinglevel ?droolinglevel