You are currently browsing the category archive for the ‘semantics’ category.

Imagine a big two-story house with 10 bedrooms, 8.5 bathrooms, and various specialized rooms (such as libraries, map rooms, dining rooms, and dens).  Oddly, there’s only one staircase in the whole house, connecting the den on the first floor to the library on the second.

The problem is to identify the rooms on an architectural diagram that let you go up to the second floor.  For many people, it’s sufficient to highlight the den, but consider somebody confined to a wheelchair: without a stairclimbing mechanism, the den fails to afford the ability to get to the second floor.

Pushing the example, let’s assume that our actor is indeed confined to a wheelchair, and there is an elevator in the first-floor kitchen.  How specific can you get when it comes to highlighting the things that afford the ability for our actor to go upstairs?  Highlighting the whole kitchen is a bit too rough, but the elevator itself is insufficient – there’s lots of wiring, a circuit breaker in the basement, a backup generator outside, power lines running to a power station, and eventually the water flowing down the Niagra River.

Finally, let’s simplify things with a futuristic elevator that requires no wiring and generates its own power.  Clearly, this elevator plays a part in affording our actor the ability to get to the second floor.  However, the design of the kitchen is also crucial: if the pathways to the elevator were too narrow, it would be impossible to navigate a wheelchair to the elevator in the first place.  Thus, there are different parts of the kitchen that fit together in a way that enables our actor.

Affordances are interesting phenomena when describing regions, because of their actor-dependence, their causal roots, and their basis in heterogeneous regional parts.  These features distinguish affordances from their relatively simpler kin, qualities.  Recent work has shown how to draw a line on a map that justifiably delimits a region characterized by a quality such as forested or populated.  It would be helpful to extend this ability to delimit regions that can be characterized as habitable, navigable, or defensible.

I hypothesize that recent work on construing dispositions as causal predications made true by processes is sufficient to establish a theory of affordances that meshes well with current work in ecological psychology.  Moreover, I argue that this theory would be suitable for extending granular theories of quality-based region delineation to encompass regions characterized by affordances.


In a recent issue of the Monist, E.J. Lowe argues that lots of us have been thinking about dispositions in the wrong way.  It’s quite normal to construe fragility as a property with

  • stimulus: a whack
  • manifestation: a shatter

So to look for fragility, I thought I’d look for shatters, and then examine those to see which ones were caused by a whack.  Lots of problems arise from this construal, because it feels natural to define fragility as

  • the quality such that if something is whacked with a relatively light force, then it shatters


  • the quantity such that if something is whacked with a force greater than or equal to N, it shatters

That if-then form of the definition is the root of the problem, as it leaves lots of holes for surprises to wiggle in.  For example, was a vase not fragile simply because it was never whacked (instead it was melted down)?  If a wizard intervenes when a vase is whacked to prevent it from shattering, is the vase still fragile?  These kinds of situations are troublesome, to be sure, since they get right down to how we can manage to define a disposition in the first place.

Lowe suggests we throw the whole if-then notion out the window.  He argues that dispositions surely manifest, but they’re never tied to a stimulus or trigger.  Rather, what we think of as a stimulus is really part of what we mean by the manifestation.

For example, a fragile vase can shatter, but something can’t shatter without being whacked (technically, without the application of force).  So, shattering entails whacking and we define fragility as

  • the quality such that something can be shattered with a light force


  • the quantity such that something can be shattered with a force greater to or equal to N

It’s a bit weird at first glance, in the sense of feeling that a trick is being pulled.  We’re still talking about whacking and shattering vases, right?  The important difference is what we’re looking for.  By the first account (referred to by philosophers as the Conditional Analysis), we’re looking for events (shatters) and truthmakers for if-then statements.  By Lowe’s account, we’re looking for a complex event (a shatter).

It turns out that my definition of retaliation is closer to Lowe’s account than the first account.  Retaliations were defined as enforcer actions (hits and certain kinds of penalties) that occurred within five minutes of a violent action (certain other kinds of penalties).  The definition itself sucks in obvious ways, but the important part here is the form – I was looking for events that relate to other events in a certain way.  That boils down to looking for complex events, or at least seems less an appeal to a stimulus/if-then situation.

A bit of discussion on URIs in the T-Box has been popping up lately on the W3C’s Semantic Web mailing list.  At issue in a thread on “Best Practice for Renaming OWL Vocabulary Elements” is whether T-Box URIs should be somewhat meaningful names, like foo:fatherOf, or meaningless names, like foo:R9814.

There are pros and cons for both sides.  Meaningful T-Box URIs are easier to to use when making ontologies and writing queries.  However, it’s very difficult to change a URI after you’ve created it (you may later become unsatisfied with an unforeseen connotation of your URI).  Moreover, you have to accept that the language you’re using (like English or Tagalog) may not be understood by a user.

Meaningless T-Box URIs have the pros and cons reversed – harder for creating ontologies and writing queries, easier for lifecycle management and (in theory) buy-in from non-native speakers.  To sweeten the deal for these meaningless URIs, advocates point out that tools can be written to correct for the difficulties in ontology and query authoring.

This all brings to mind a division in labor in the ontology/semantic web community, which you might call A-ontology and T-ontology (tracking the distinction between the A-Box and T-Box in description logics).

A-ontology is focused on analyzing data, leveraging the implicit semantics found in datasets.  Ontologies are a tool for declaring semantics so that

  • It’s clear what assumptions and interpretations have been made in the analysis
  • A reasoner can read and process the additional semantics

There’s no community effort to re-use the ontology going on, so these ontologies are narrowly purpose-driven.  Not to say the semantics comes cheap – a data analysis is ill-served by a rush to charts and graphs.

T-ontology is a bit different, primarily focussed on sharing re-usable terminology.  The ontology is not a tool, but rather the product of T-ontology work.  Communities of interest and stakeholders factor into the development of the ontology, since they and the people they represent are going to be using the fruits of this labor.

These two kinds of ontology work intersect in practice.  A-ontology will often use data that’s been published with semantics governed by the product of T-ontology.  If significant results are found when performing A-ontology work, the analysts may consider publication of their results, meaning a re-consideration of terminology and alignment with community standards.

A realization of the Linked Data dream of a globally-distributed data space is an undoubtedly good thing.  If meaningless T-Box URIs help this dream along, then we just need to be sure we’re not crimping the style of A-ontology.  If tools have to be written, then they need to fit the workflow of A-ontology before changes to RDF or SPARQL are made (and most modern data analysis takes place at the command line with scripts on the side – GUIs and faceted browsers won’t find a large audience here).

As things things currently stand (with RDF 2004 and Sparql 1.1), meaningless URIs would overburden A-ontology efforts.  It’s hard to imagine how I’d productively use the rrdf library (or rdflib+scipy or seabass+incanter or any ontology and data analysis library combination) if I had to deal with meaningless URIs in the T-Box.

This post’ll be a short one tonight, since I just had to watch Adventureland (and thank god I did – that’s a great movie).

The analysis of enforcement doesn’t seem well-suited to a statistical approach, and I think it’s because there’s no pattern or distribution to be explained or predicted.  There aren’t any awards for enforcement, and top-ten lists of enforcers aren’t sufficiently … important? … to warrant prediction.

However, predicting which cities in the NHL will host the games with the most physical action is undeniably of public benefit.  As the League has cracked down on fighting and physical play over the years, it’s become increasingly important to find out where the good physical games will be played.

Although consideration for a scale of game physicality is appropriate, for now we’ll just tally the number of hits per game between each pairing of teams:

prefix nhl: <>
construct {
  _:z a nhl:HitsSummary . _:z nhl:participant ?x .
  _:z nhl:participant ?y . _:z nhl:value ?v }
  {  select ?x ?y (count(?h) as ?v)
     {  ?g nhl:hometeam ?x . ?g nhl:awayteam ?y .
        ?g nhl:play ?h . ?h a nhl:Hit . }
  group by ?x ?y	}

I’d like to take these results and tie them to the geo-coordinates of each team’s home city, so that I can generate a map depicting the relative physicality of each city that season.

To do this, I can use DBpedia’s endpoint to grab each team’s city’s lat/long.  On inspection, it seems that the DBpedia data provides the relevant geo-coordinates in decimal-minute-second form.  I’d much rather have it in decimal format (so that I can associate a single value for each of latitude and longitude to a team), so a little arithmetic is in order.  Fortunately, Sparql 1.1 allows arithmetic expressions in the select clauses.  Here’s the longitude query (with the latitude query being similar):

prefix rdfs: <>
prefix dbo: <>
prefix dbp: <>
prefix nhl: <>
construct { ?team nhl:longitude ?v . ?team nhl:name ?name }
  {  select ?team ?name
            ( -1 * (?d + (((?m * 60) + ?s) / 3600.0)) as ?v)
     {  ?team a dbo:HockeyTeam . ?team rdfs:label ?name .
        ?team dbp:city ?cityname . ?city rdfs:label ?cityname .
        ?city dbp:longd ?d; dbp:longm ?m; dbp:longs ?s .
        filter ( lang(?name) = 'en') }}

The DBpedia server is a little persnickety about memory, so it complains if I try to ask for lat and long in the same query.

You might be wondering about that -1 in the front of that arithmetic.  Longitude is positive or negative depending on whether it’s east or west of the Prime Meridian.  Since all the NHL hockey teams are west of the Meridian, the decimal longitude is negative.  If the DBpedia endpoint were compliant with the very latest Sparql 1.1 spec, I could have used an IF operator to interpret the East/West part of the coordinate.  However, it seems that feature isn’t implemented yet in DBpedia’s server, so this’ll have to do.

All that’s left is to query for each game, its home and away teams, and join those results with the relevant coordinates and hits-summary.  That query might take a few minutes for a whole season, but it’s a static result and thus safe to save off as an RDF file for quick retrieval later.

What does this have to do with enforcement?  Well, with next season’s schedule and the current rosters, we might be able to predict this physicality distribution based on the enforcement of the players on each team for each game.  Perhaps teams with higher enforcement correlate with more physical games.  Or, maybe a game tends to have higher physicality when one team has much more enforcement than the other.  And with historical data from past seasons, there should be some opportunity for verification.  And maybe even neat maps.

A few posts back, I wrote the following as a rule for detecting enforcement events:

An event is an enforcement if it is an Enforcer Action taking place within 2 minutes after a Violent Action against one of the teammates of the Enforcer.

Since then, a few parts of this rule have been bugging me:

  • what’s an enforcer action?
  • why two minutes?
  • what’s a violent action?

So I’m going to take a step back and look at this again.  I’m defining enforcement event to be a manifestation of an enfoo quantity (like gravitational attraction would be for a mass quantity).  If these manifestations are what makes somebody an enforcer, then it may be that a pattern amongst these events can be extracted that determines an ordering of players sufficiently close to the original crude orderings of enforcers. So,

  1. hockey players can be crudely ordered according to their capabilities as an enforcer.
  2. I dub this capability enfoo
  3. I hypothesize that enfoo manifests in certain ways that can be analyzed to yield an ordering of players according to their degree of enfoo
    • That is, I hypothesize that enfoo can be measured via enfoo manifestations, which I call enforcements
  4. A scale for measuring enfoo via enforcements is defined, and is called the barce scale.
  5. Barce measurements are made on NHL play-by-play data, and the resulting player orderings are compared to crude orderings.
    • If the barce orderings track the crude orderings closely, then the barce scale captures the intuitions of the creators of the crude orderings (i.e. experts).
    • If the barce and crude orderings are very different, then all is not lost.  If the semantics of the barce scale are interesting, then the scale provides a new perspective on the concept of enforcement.

This all tracks the 1968 work of Brian Ellis quite well (this would be a fundamental derived measurement in his theory).  However, not everything rests on solid ground here.  Ellis didn’t really discuss social quantities (like enfoo), instead concentrating on physical quantities like mass, pressure, and electrical resistance.  Thus, the idea of looking at events (manifestations of enfoo) brings with it some difficulties.

One difficulty is that the units of the barce scale are quite unlike grams and meters.  When defining the meter, experts talk about how far light travels in a vacuum in a very short period of time.  The gram is based on an actual object known as the IPK (International Prototype Kilogram).

The barce scale introduces two kinds of difficulties, which I alluded to at the top of this post: subjectivity and causal influence.

The events of a hockey game, such as penalties and goals, are only identified by certain officials on the ice and in the booth.  It doesn’t matter whether you or I think a hit was a cross-check, even if the officials for that game agree with us the next day – if an official doesn’t identify the hit as a cross-check (thus penalizing the hitter) during the game, then it’s not a cross-check.  The events of a hockey game, then, cannot be be determined without knowing the officials’ in-game decisions.  Fortunately, these decisions are themselves objectively verifiable due to their documentation.

A more worrisome difficulty is the detection of causal influence.  Enforcements are defined as events that are in some sense caused by a provocation by a member of the other team.  For example, we might consider the following causal influences:

  1. An enforcement would not have occurred had it not been for the provocation.
  2. A provocation increased the probability of an enforcement occurring.
  3. A provocation inclined a player to perform an enforcement.

An added difficulty builds on the problem with subjectivity mentioned above: a provocation may not be noticed by an official, but nevertheless be noticed by a player who subsequently goes after the provoker.

I think one way to resolve this is to take a page out of moral theory.  Let’s say that an enforcer is a player who goes after players on the other team who do something provocative.  Let’s further say that there are good definitions for what it means to go after somebody and to be provocative in the context of a hockey game.  Then we expect that a good enforcer should go after opponents who are being provocative.  In other words, the more a player retaliates, the better he is at enforcing.

The form in use here looks like this:

"quantity Q manifest as event E"
(Q manifests-as E)

"things with Q should perform events of type E"
(x has Q) => should(x do E)

"all things being equal, x has more Q having performed e"
Q(x|e) > Q(x|~e) c.p.

It’s pseudo-logic, for sure, but hopefully the intent is somewhat clear.  Looking at that pseudo-logic, there’s nothing that prevents a quantity from manifesting in more than one way.  And that’s a good thing, because good enforcers do more than retaliate – they also deter provocations.  If a player has reputation for retaliating harshly, then opponents may be less likely to provoke.  This result is even better for the enforcer’s team, since an enforcer’s retaliations sometimes land him in the penalty box.  Thus, we can say that a good enforcer plays in games where the opposing side doesn’t often provoke.  In other words, the less an opposing team provokes, the better an enforcer is doing.

I updated the analysis file with a new query to reflect this new bi-valued barce scale:

prefix nhl: <>
prefix rdfs: <>
select ?name (sum(?enfActs) as ?enf)  (sum(?totChances) as ?opp)
where { ?x a nhl:Enforcement . ?x nhl:actor ?player .
  ?x nhl:value ?enfActs . ?x nhl:game ?game .
  ?y a nhl:ViolentPenaltyTally . ?y nhl:game ?game .
  ?y nhl:team ?otherTeam . ?y nhl:value ?totChances .
  ?z a nhl:GameRoster . ?z nhl:game ?game . ?z nhl:player ?player .
  ?z nhl:team ?team . ?player rdfs:label ?name .
  filter( ?team != ?otherTeam) }
group by ?name

The retaliation value is ?enf and the deterrent value is ?opp.  I haven’t gotten around to changing the variable names to something more suitable, so don’t read too much into them yet.

I also haven’t changed the definitions of nhl:Enforcement, nhl:ViolentPenalty, or nhl:EnforcerAction yet, so those are still on the docket for review.  I also opted to skip the Sparql Construct I used for the other two barce formulations and just spit the measurement out into a result set (which is interpreted as an Incanter dataset in seabass).  For purposes of ranking, the two values for this barce measurement can be multiplied (the inverse of the deterrent value has to be used, since enfoo is inversely proportional to the number of provocations).

Maybe I’ll get to some charts and analysis tomorrow, if the theory bug doesn’t bite me again.

Before returning to the analysis of the NHL play-by-play data I’ve been looking at, here are some definitions to frame the project:

Enfoo:  The disposition to respond to aggressive play through retaliatory checking and fighting.
Enforcer: A person considered to have a high degree of Enfoo.
Enforcement: The kind of event that is the realization of an Enfoo.

Because no good names for the (dispositional) quantity under the scope came to mind, I chose a silly name.  Despite this, I think there’s sufficient reason to think that a crude order could be created by a group of hockey fans.  For a physical comparison, these three definitions are similar to the following:

Weight: The gravitational force on a body.
Heavy Person: A person considered to weigh a lot.
Gravitational Attraction: The kind of event where two objects attract one another due to their mass and mutual distance.

Dispositions can be tricky things to identify, so we’ll assert the following detection rule:

Detection Rule: An event is an enforcement if it is an Enforcer Action taking place within 2 minutes after a Violent Action against one of the teammates of the Enforcer.

The following definitions round out the necessary machinery:

Enforcer Action: An action penalized as fighting, cross-checking, roughing, or unsportsmanlike conduct.
Violent Action: An action penalized as charging, high-sticking, roughing, slashing, or unsportsmanlike conduct.

The goal of this analysis is to come up with a formal definition of enfoo and an appropriate measurement scale that can aid future analyses.  It would be nice if the order generated by the detection rule above was similar to rankings of enforcers by hockey analysts, but this is not necessary.  If this were a material definition of enfoo, then the goal would be to uncover the intended semantics of a group of hockey analysts that rank enforcers.  Instead, this formal definition of the disposition only depends on the semantics of the terms in its definitions (like Violent Action, Player, and Minutes).

Finally, a scale for measuring enfoo needs to be defined:

Barce: A scale for measuring the amount of enfoo a player had during a period of time.  A player has one barce when he is the agent of an enforcement once during the set period of time.  A player has (x+1) barce when he is the agent of (x+1) events of enforcement during the set period of time.

The barce scale unsurprisingly jives with the detection rule asserted above – to measure the enfoo of a player during a game on the barce scale, the enforcement events he is penalized for are tallied.  If a normalized barce scale is desired, then the tally for the game should be divided by the total possible number of enforcement events: the number of violent actions that the other team is penalized for.

It’s not terribly difficult to define a query that results in numbers being assigned to hockey players.  Goals scored, hits taken, and save percentage can be calculated from the play-by-play data I’ve been working with lately.  The idea of enforcement can likewise be used to give each player in the league a number conveying the degree to which he brings enforcement to the game.

However, qualities like goals scored and enforcement seem to be in a different category than physical quantities like mass and volume.  I would think the most apparent difference would be that an object has the mass that it has regardless of what you or I believe.  Thus, when we measure the mass of an object, there’s a real value that we try to get as close to as possible with our measurement.

The goals scored by a player is only slightly less substantial than that player’s mass: after all, according to the rules of a game there were in fact goals that occurred, and the goals scored is simply a tally of these events.  Compared to a notion like enforcement, the acceptability of goals scored sits pretty well, particularly when three different definitions of enforcement seem equally good.

Brian Ellis, in his book Basic Concepts of Measurement, points out that what’s needed to kick things off is a crude order of things according to the quantity such that

  • sufficiently knowledgeable people will more or less agree
  • no formal measurement is used

For example, most people can sort a group of rocks by mass by picking them up two at a time, one in each hand.  When two rocks are close together in mass, even expert rock balancers come up with different results, but the ordered groups are by large similar.

Now imagine there’s a bunch of hockey experts in a room, individually asked to write down the top 20 enforcers from this past season.  There’d be differences in the lists, but I’d expect there to be more similarity than difference.  This is just like Time’s top 100 list of influential people, AMC’s list of top 100 films, and People’s list of the 100 most beautiful people.  In each of these cases, there’s something substantial that we’re talking about, regardless of whether these properties could be measured.

The fact that three different queries with three different result sets purport to describe the same quantity is not a cause to abandon the quantity itself.  Rather, the point of this semantic analysis is to refine the meaning of a term so that it provides a clear picture of what is meant by enforcement.  This needn’t be the only picture of enforcement out there, of course, but somebody looking at it should be able to figure out what’s going on.