> For the complete documentation index, see [llms.txt](https://gang-gems.gitbook.io/qtv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gang-gems.gitbook.io/qtv/competency-questions-and-model-application.md).

# Competency Questions & Model Application

Once our ontology was structured, we identified a set of **Competency Questions** — the key questions our model should be able to answer.\
These questions helped us **validate the ontology**, **guide refinement**, and **ensure practical utility** for real-world analysis.

***

### ❓ What Are Competency Questions?

In ontology design, Competency Questions are formulated to:

* Express the **kinds of knowledge** we want the ontology to capture
* Test whether the ontology’s structure and logic are sufficient
* Guide **SPARQL queries**, applications, and potential reasoning use

***

### 🎯 Our Competency Questions

The questions we defined reflect both the **Portrayal** and **Perspective** layers of our dual ontology.

***

### 🧪 From Questions to Queries

{% hint style="warning" %}
The prefixes to be added to each query are the following ones.
{% endhint %}

PREFIX : <http://www.semanticweb.org/LGBTQPortrayal#>\
PREFIX LGBTQPortrayal: <http://www.semanticweb.org/LGBTQPortrayal#>\
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\
PREFIX owl: <http://www.w3.org/2002/07/owl#>\
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

#### 1️⃣ LGBTQ+ Representation in General

* Which LGBTQ+ characters are portrayed as dynamic versus static?

```
SELECT ?character ?type
WHERE {
  ?character rdf:type LGBTQPortrayal:PortrayalofLgbtqCharacter .
  
  OPTIONAL {
    ?character rdf:type ?type .
    FILTER(?type IN (LGBTQPortrayal:Dynamic, LGBTQPortrayal:Static))
  }
}
```

* How many portrayals are associated with Dynamic vs. Static characters?

```
SELECT ?type (COUNT(?portrayal) AS ?count)
WHERE {
  ?portrayal rdf:type LGBTQPortrayal:PortrayalofLgbtqCharacter .
  ?portrayal rdf:type ?type .
  FILTER(?type IN (LGBTQPortrayal:Dynamic, LGBTQPortrayal:Static))
}
GROUP BY ?type
```

* What are the most common portrayal patterns of LGBTQ+ characters?

```
SELECT ?portrayalPattern (COUNT(?character) AS ?count)
WHERE {
  ?character a LGBTQPortrayal:PortrayalofLgbtqCharacter .
  
  ?character rdf:type ?portrayalPattern .
  
  FILTER(?portrayalPattern != LGBTQPortrayal:PortrayalofLgbtqCharacter)
  FILTER(?portrayalPattern != owl:NamedIndividual)
}
GROUP BY ?portrayalPattern
ORDER BY DESC(?count)
```

* Which LGBTQ+ characters have which sex orientations?

```
SELECT ?character ?sexOrientation
WHERE {
  ?character rdf:type :Character .
  OPTIONAL { ?character :hasSexOrientation ?sexOrientation. }
}
ORDER BY ?character
```

* Which identity subgroups (e.g., lesbian, gay, trans, non-binary) are most represented?

```
SELECT ?identity (COUNT(?character) AS ?count)
WHERE {
  {
    ?character rdf:type :Character .
    ?character :hasSexOrientation ?identity .
  }
  UNION
  {
    ?character rdf:type :Character .
    ?character :hasGender ?identity .
  }
  UNION
  {
    ?character rdf:type :Character .
    ?character :isTransgender true .
    BIND(:Transgender AS ?identity)
  }
}
GROUP BY ?identity
ORDER BY DESC(?count)
```

***

#### 2️⃣ Influence of Perspective

* Which LGBTQ+ characters are portrayed through Profit-Driven Lens?

```
SELECT ?character
WHERE {
  ?character a LGBTQPortrayal:PortrayalofLgbtqCharacter ;
             LGBTQPortrayal:viewedThroughLens ?lens .
  ?lens a LGBTQPortrayal:ProfitDrivenLens .
}
```

* Which LGBTQ+ characters are portrayed through Social Impact Lens?

```
SELECT ?character
WHERE {
  ?character a LGBTQPortrayal:PortrayalofLgbtqCharacter ;
             LGBTQPortrayal:viewedThroughLens ?lens .
  ?lens a LGBTQPortrayal:SocialImpactLens .
}
```

***

#### 3️⃣ Attitudes Toward Representation

* Which characters are most frequently associated with queerbaiting?

```
SELECT DISTINCT ?character
WHERE {
  ?character a LGBTQPortrayal:PortrayalofLgbtqCharacter .
  
  {
    ?character a LGBTQPortrayal:Static .
  }
  UNION
  {
    ?character a LGBTQPortrayal:Superficial .
  }
  UNION
  {
    ?character a LGBTQPortrayal:TokenCharacter .
  }
}
ORDER BY ?character
```

* Are LGBTQ+ characters more likely to be token characters or fully developed?

```
SELECT ?category (COUNT(?instance) AS ?count)
WHERE {
  {
    SELECT ?instance ("TokenCharacter" AS ?category)
    WHERE {
      ?instance rdf:type :TokenCharacter .
    }
  }
  UNION
  {
    SELECT ?instance ("FullyDeveloped" AS ?category)
    WHERE {
      ?instance rdf:type ?type .
      FILTER(?type IN (:Detailed, :Dynamic))
    }
  }
}
GROUP BY ?category
```

* Which LGBTQ+ characters are portrayed as authentic versus stereotypical?

```
SELECT ?character ?representationType
WHERE {
  ?character rdf:type ?representationType .
  FILTER(?representationType IN (
    :AuthenticRepresentation,
    :TokenCharacter,
    :TragicTrope,
    :GayBestFriend
  ))
}
ORDER BY ?representationType
```

***

#### 4️⃣ Representation Outcomes

* Which LGBTQ+ characters have a positive versus negative role model?

```
SELECT ?character ?roleModelType
WHERE {
  ?character rdf:type LGBTQPortrayal:PortrayalofLgbtqCharacter .
  ?character LGBTQPortrayal:impactsCommunity ?impact .
  
  {
    ?impact rdf:type LGBTQPortrayal:PositiveRoleModel .
    BIND("Positive Role Model" AS ?roleModelType)
  }
  UNION
  {
    ?impact rdf:type LGBTQPortrayal:NegativeRoleModel .
    BIND("Negative Role Model" AS ?roleModelType)
  }
}
ORDER BY ?roleModelType ?character
```

* How frequently do LGBTQ+ characters face tragic outcomes?

```
SELECT (COUNT(?tragic) AS ?TragicOutcomeCount)
WHERE {
  ?tragic rdf:type :TragicTrope .
}
```
