Comprehensive RDF Query API's for RDFLib

[by Chimezie Ogbuji]

RDFLib's support for SPARQL has come full circle and I wasn't planning on blogging on the developments until they had settled some – and they have. In particular, the last piece was finalizing a set of APIs for querying and result processing that fit well within the framework of RDFLib's various Graph API's. The other issue was for the query APIs to accomodate eventual support for other querying languages (Versa for instance) that are capable of picking up the slack where SPARQL is wanting (transitive closures, for instance – try composing a concise SPARQL query for calculating the transitive closure of a given node along the rdfs:subClassOf property and you'll immediately see what I mean).

Querying

Every Graph instance now has a query method through which RDF queries can be dispatched:

def query(self, strOrQuery, initBindings={}, initNs={}, DEBUG=False, processor="sparql")
    """
    Executes a SPARQL query (eventually will support Versa queries with same method) against this Conjunctive Graph
    strOrQuery - Is either a string consisting of the SPARQL query or an instance of rdflib.sparql.bison.Query.Query
    initBindings - A mapping from variable name to an RDFLib term (used for initial bindings for SPARQL query)
    initNS - A mapping from a namespace prefix to an instance of rdflib.Namespace (used for SPARQL query)
    DEBUG - A boolean flag passed on to the SPARQL parser and evaluation engine
    processor - The kind of RDF query (must be 'sparql' until Versa is ported)
    """

The first argument is either a query string or a pre-compiled query object (compiled using the appropriate BisonGen mechanism for the target query language). Pre-compilation can be useful for avoiding redundant parsing overhead for queries that need to be evaluated repeatedly:

from rdflib.sparql.bison import Parse
queryObject = Parse(sparqlString)

The next argument (initBindings) is dictionary that maps variables to their values. Though variables are common to both languages, SPARQL variables differ from Versa queries in that they are string terms in the form “?varName”, wherease in Versa variables are QNames (same as in Xpath). For SPARQL queries the dictionary is expected to be a mapping from variables to RDFLib terms. This is passed on to the SPARQL processor as initial variable bindings.

initNs is yet another top-level parameter for the query processor: a namespace mapping from prefixes to namespace URIs.

The debug flag is pretty self explanatory. When True, it will cause additional print statements to appear for the parsing of the query (triggered by BisonGen) as well as the patterns and constraints passed on to the processor (for SPARQL queries).

Finally, the processor specifies which kind of processor to use to evaluate the query: 'versa' or 'sparql'. Currently (with emphasis on 'currently'), only SPARQL is supported.

Result formats

SPARQL has two result formats (JSON and XML). Thanks to Ivan Herman's recent contribution the SPARQL processor now supports both formats. The query method (above) returns instances of QueryResult, a common class for RDF query results which define the following method:

def serialize(self,format='xml')

The format argument determines which result format to use. For SPARQL queries, the allowable values are: 'graph' – for CONSTRUCT / DESCRIBE queries (in which case a resulting Graph object is returned), 'json',or 'xml'. The resulting object also behaves as an iterator over the bindings for manipulation in the host language (Python).

Versa has it's own set of result formats as well. Primarily there is an XML result format (see: Versa by Example) as well as Python classes for the various internal datatypes: strings,resources,lists,sets,and numbers. So, the eventual idea is for using the same method signature for serializing Versa queries as XML as you would for SPARQL queries.

SPARQL Limitations

The known SPARQL query forms that aren't supported are:

  • DESCRIBE/CONSTRUCT (very temporary)
  • Nested Group Graph Patterns
  • Graph Patterns can only be used (once) by themselves or with OPTIONAL patterns
  • UNION patterns can only be combined with OPTIONAL patterns
  • Outer FILTERs which refer to variables within an OPTIONAL

Alot of the above limitations can be addressed with formal equivalence axioms of SPARQL semantics, such as those mentioned in the recent paper on the complexity and semantics of SPARQL. Since there is very little guidance on the semantics of SPARQL I was left with the option of implementing only those equivalences that seemed obvious (in order to support the patterns in the DAWG test suite):

1) { patternA { patternB } } => { patternA. patternB }
2) { basicGraphPatternA OPTIONAL { .. } basicGraphPatternB }
  =>
{ basicGraphPatternA+B OPTIONAL { .. }}

It's still a work in progress but has come quite a long way. CONSTRUCT and DESCRIBE are already supported by the underlying processor, I just need to find some time to hook it up to the query interfaces. Time is something I've been real short of lately.

Chimezie Ogbuji

via Copia

World Cup Blotter, part 2

Predator Absolute & Teamgeist People have been exaggerating Brazil's flair for a long time. Brazil has always owed its success as much to dogged defense as to samba soccer. Except for Ronaldo's inexplicable funk, I don't see much wrong with how Brazil has ground out their advancement. I do think it sets up some very exciting confrontations down the line against other teams that have proven just as deep, but younger and more dynamic. I personally expect the champion to be one of:

  • Brazil
  • Argentina
  • Holland
  • Spain

I thought long and hard about excluding Germany from that list. Their home field advantage will be very important, but I think they're just way too vulnerable in the middle of defense.

I should note, however, that Holland and Argentina both had their midfield thoroughly outplayed by a lesser rated Ivorean side, and I think they're very vulnerable. A team with a strong midfield and a disciplined back line could really expose the two present darlings of the tournament.

Tunisia deserved their misfortune against Spain. When will teams learn that retreating into the bunker after scoring an early goal almost never works? Didn't help that their goalkeeper had real trouble figuring out where on the pitch he was.

Togo on the other hand, deserved much better from their energetic play, and if they'd been awarded the penalty they deserved it would have been a different story completely.

The sight of the giant Korean flag being waved back and forth in unison during their national anthem was quite impressive. I think Koreans are still proving, away from home, that they are going to give Brazilians a run for best fans in the world. Les bleues don't seem to have an answer for any team that brings them a fight. Henry poached one and squandered two, but if it's all to be on his back, then the French might as well plan Zizou's retirement party for this coming weekend. Where was Wiltord, or any of the talented midfield to lend firepower against the pugnacious Koreans? Wiltord, Mr. trois-fois-champion-parmi-les-cinq-fois-champions (Arsenal+Lyon+Lyon) was a bit of a let-down alongside his old running mate Henry. And Vieira was looking as befuddled as he did coming back to Highbury to face his old club in the Champion's League.

Japan/Croatia was more competitive than I'd expected. The Japanese players seemed to have serious problems with their touch, which surprises me for such a disciplined team. Nagasawa has the miss of the tournament so far, although a minute later Klasnić scuffed a shot in a situation he would have taken full advantage of wearing a Werder Bremen strip. Every time Kranjčar woke from a narcoleptic fit, he'd own the midfield for a spell, and then promptly go back to sleep again. Maybe ten minutes from playing the penalty-saving hero, Kawaguchi almost offered the World Cup its very own Enckelman moment. Peter Enckelman was an Aston Villa goalkeeper, who was always known for the occasional gaffe, but surpassed himself when a teammate threw a ball in to him, and he let it roll under his foot into the net. Worse yet, the game was the Birmingham derby, one of the most bitter rivalries in England. Birmingham City fans were in such a raucous state at their arch-rival's misfortune that one of them jumped onto the field to taunt the hapless Enckelman up close. Not the EPL's finest hour. I found footage of the gaffe on YouTube. In Kawaguchi's case the ball jumped over his foot, assisted by a divot, but luckily rolled wide of the net.

It was good to see the U.S. show some spirit against Italy. Concerning one bit of controversy, both of Pope's yellow cards were deserved. The first one was a professional foul against Gilardino just before the first Italian goal. Pope was the last defender, and it's a lucky thing the referee saw that the Italian route-one pass did not present a clear goal-scoring opportunity, so he didn't get a red. It was fun to hear the U.S. crowd contingent yelling clear as day "Bullshit! Bullshit! Bullshit!" As a Copia commenter mentioned, ESPN has been doing a better job of mixing the Atmosphere into the audio.

On Gilardino's goal, Pope pulled up waving for a taxi while Gilardino waltzed to goal. It seems a defender at this level does not know better than to follow his mark into the six unless he hears a whistle? Preposterous! Pope has been nothing but a liability in this tournament. Onyewu hasn't played well, either, but he's just a pup. The very experienced Pope has no excuse.

The red card for de Rossi' was richly deserved. He did not need to swing his arm as he did in order to gain leverage for the jump. It was a violent act. Mastroeni's red, however, seemed to be a case of the referee trying to even things up. He did lunge with two sets of studs into Pirlo's ankle, and I would normally expect the harsh punishment, but such dangerous two-footed tackles have been flying all over in this tournament without such sanction (the referees choose instead to bandy cards for mild shoulder charges). The inconsistency is maddening. On Eddie Pope's second yellow card, however, the announcers seemed more eager to castigate the referee than to admit that Pope invited the card. A defender already carrying a yellow card, should know better than to slide into the back his opponent. Could the referee have called him aside for a warning? Sure. It would have been a reasonable thing for him to do. There is no doubt, however, that unlike in the Mastroeni case, it was perfectly consistent for the ref to give Pope his marching orders. Just ask Avery John.

When DeMarcus Beasley came on, what was Arena thinking by taking off Dempsey, who had been one of the bright spots for the U.S.?

I don't think Chris Coleman would have been as patient as Arena with McBride, who was rather wasteful in front of goal.

The ESPN analysts seem to be desperately clinging to hopes for the U.S. I don't see it. I don't see them prevailing against Ghana unless Arena drastically changes his tactics. Ghana is too quick and strong. I think Italy and Ghana are winning this group. It will be fun to watch both remaining games in the group, though. Will the Italians suffer more from soreness due to their physical battle with the U.S., or will the Czechs collapse, shell-shocked from being outplayed by the World Cup noobs? Both teams have the experience to overcome their setbacks, and it will be something to see who does.

I was desperately disappointed in Ghana despite their defeat of the Czech Republic. I may be the only person on Earth saying that, but then again, I was probably the only non-Ghanaian on Earth who expected them to beat the Czechs. Ghana should have won that game by at least 4-0, and they might come to regret the squandered opportunities in such a tight group, when the goal difference tie breaker is brought to play. It was a case of very poor discipline not to go for the kill on an obviously beaten Czech side. They seemed to think it was amusing that Pimpong made the idiotic decision to pass to an obviously off-side Muntari rather than place the ball to either side of the magnificent Peter Cech.

Asamoah Gyan's goal on one minute was no real surprise to me as soon as I could tell that the Ghanaians were going to run right at the Czechs rather than huddle back in their shelter as the U.S. did. I've been calling the Czech back line sluggish all the while, and they proved it throughout the game. The second goal should be watched by all African teams as an example of how to patiently pick apart a defense that's back on its heels. Muntari's finishing blast was almost a footnote. Sure the Czechs were man down at that point, but they showed none of their class in chasing the Ghanaians down during that sequence.

But what was with Pantsil holding up the Israeli flag in the post-game celebration? I knew a few of the Ghanaian players play in Israel, but I got the full scoop from Haaretz's coverage. Defender Mohamed is set to move from the Persian Gulf to Maccabi Netanya. I suspect there will be some extra goodwill now to bring off more such moves. It is nice for African players to have in Israel another good stage for their professional growth. Turkey is the usual locus, and either choice beats obscurity in the Gulf. Pantsil's celebration was certainly a neat moment. No West African quality warms my heart more than exuberant unpredictability, and no quality of football warms my heart more than the global connections it forges.

Argentina versus Serbia/Montenegro to me said as much about the latter team as it did about the former. The Eastern Europeans were the most disgracefully static and uncommitted team I've ever seen in a World Cup. The Argentinians might as well have been dribbling around practice cones. They had clearly fallen apart psychologically even before the first kick of the ball. I predict it will be a long recovery before we see either Serbia or Montenegro in any future World Cup finals.

It turns out that the two groups of death were more like groups of three deaths and one wet noodle (Serbia/Montenegro and the U.S., respectively.)

It's a shame Côte d'Ivoire ended up in the group they did. They played magnificently in the losing effort, and the tournament is a bit diminished for their departure. As I said after the first set of games, The Black Stars are looking like the surprise torch-bearer for Africa. Angola's man-down stand against Mexico did some credit to the team that upended Nigeria for the Germany trip, but man does it make me wish even more that I could have seen Nigeria in their place.

Paraguay put up the barricades and meekly waited for the siege. It took 90 minutes, but good for Sweden for sending them packing in the 90th, courtesy Ljungberg's head.

England followed up a 1-0 snoozer with a 2-0 snoozer. They're into the round of 16, but I can't see them venturing far beyond that.

How about that Ecuador? It's not just that Tenorio and Delgado seem to have that Andy Cole/Dwight Yorke connection. Their midfield also plays marvelous, quick touch football. And they bring great energy to the game. I do so hope they make it a good ways. They're the most fun team to watch in the tournament so far.

Gooner notes

Arsenal players are just killing it in this tournament. Rosický, Ljungberg, van Persie, Senderos, Fabregas, Touré and Eboué. And it looks as if we might just see Theo Walcott. The confidence and experience should do wonders for The Arsenal. Here's to the Barclay's cup (and more) at Ashburton Grove in 2007.

[Uche Ogbuji]

via Copia

FIFA FUBAR

I hate FIFA. It's amazing that football is growing so rapidly despite the stupidity of its governing body. The edict for referees to hand out cautions like candy has almost ruined a magnificent tournament. WC06 has been fun so far, but could you imagine how much better it would have been if players were actually allowed to play? People have been heaping abuse on the match officials, but I think that's near-sighted. Referees know that their top-flight careers depend on their slavish observance of FIFA edicts, even when they beggar common sense. I'm glad no less a figure than Beckenbauer finally spoke his mind on the subject. Not that even Beckenbauer can likely sway the imperial Sepp Blatter, who won't be satisfied until bureaucracy drowns the actual play in our beloved sport. The U.S./Italy game was a showcase for madness. There was one deserved straight red, and maybe three deserved yellows. The rest of the bookings did nothing but ruin a game that had every promise of being a Cup classic. Thank goodness for Graham Poll and Dr. Markus Merck, who seem to be the only two refs willing to use common sense in defiance of FIFA.

[Uche Ogbuji]

via Copia

Bah Humbug Father's day

So I figured it would have kicked in by now. I'm thrice a father and Hallmark says it's my day. I'm still waiting for the territorial madness to set in. I know well, at first hand, how most women are about Mother's day. I shall not have the temerity to suggest that this obsession is completely arbitrary, so I have to imagine it's a biological process based on the intersection of natural selection with the sidereal cycle. Maybe I'm a mutant--an emerging species who doesn't look at the calendar in expectation of appreciation of my fatherly contribution, nor wields the calendar to force extortion of such appreciation.

Of course Father's day is good for one thing. I used it as excuse to buy myself a nice home theater DVD/speaker set. I'm a happy grinch listening to Gnarls Barkley right now.

Does that make me craaaaaaaaazy
Does that make me craaaaaaaaazy
Does that make me craaaaaaaaazy
...Probably...

[Uche Ogbuji]

via Copia

ABC/ESPN World Cup announcers: The debacle continues

First of all, ESPN has started to get more useful analysts on the program, but unfortunately not in the commentator's booth where they belong: .

  • Allen Hopkins has been doing the tabloid trawl for them. Hopkins is another good analyst. He's usually on Fox Soccer Channel where I've come to know him for his knowledge of the game. His only problem comes when he's teamed with his great mate Max Bretos. They both drift off into their chummy world together rather than focusing on the game at hand.
  • Derek Rae is appearing about five seconds at a time with a smidgen of news on some obscure topic. What a freaking waste. Rae's Champions League commentary is impeccable, so you would think ESPN would think to use him as more than a cameo reporter.

Meanwhile the announcer disgrace continues. I ran out of patience with JP Dellacamera in the Ghana/Czech match. When Amoah was fouled dribbling into the six, Ujfalusi was rightly given a red card. The referee rightly consulted with his assistant, and then gave the big decision. The reason was obvious: Ujfalusi was the last defender, and fouled to prevent a clear goal-scoring opportunity. Apparently this was lost on both Dellacamera and John Harkes. First of all they mused for a few minutes that it was a straight red card for dissent. I was hopping up and down in front of the TV by then. And then someone apparently handed them a slip of paper to point out that the red card was for the foul. But rather than put the obvious together, they instead went on musing that the foul was not bad enough to merit a red card. By this point I had to restrain myself from irrationally damaging my TV. How could they not even guess at the correct reason for the red card? Dellacamera has called enough matches with a red card for that very same reason that he should be aware of the rule. It just seemed to me that they left their brains in the prep room, which is inexcusable for such a big game.

Balboa is not having an inspired time in the booth. I'm biased, as I said, and continue to believe his main problem is in having to cope with O'Brien. I do like that excepting his indignant reaction to the Pope red card, he was generally correct in his assessments of the U.S./Italy game, even when sound judgment ran against the U.S. In the case of the Beasley goal that was correctly ruled out for a McBride off-side, Balboa was very quick to point out the reason for the call. And I expect he was having to bite his tongue while O'Brien was saying "Yes. If McBride didn't lift his foot, it would not have been offside." Say what?

A few gems I couldn't resist quoting:

Dave O'Brien: "That was one stiff shot there by Mastroeni." Behold the midfielder-cum-bartender.

Rob Stone: "Here's Alex. Born in Brazil; native, now, of Japan." The born-again naturalization.

Rob Stone re-christens the instep shot. It's now the "inside stroke". You can use it in the water, too.

Then again while we're collecting ABC/ESPN announcer Goldwynisms, let's not forget that even the true football experts say some screwy things now and then.

[Uche Ogbuji]

via Copia

World Cup Blotter

Man. What a World Cup, so far. Blogging time is still at a real premium for me, but I thought I'd punt out a few notes (no pun intended on Chime's entry "Incredible Golie Punt").

First of all, I'm glad for all the co-signs on my recent complaint about the atrocious ABC/ESPN announcers. I found the same on-line petition to get rid of these clowns others did. I signed with the following comment:

O'Brien is atrocious. Messing is an buffoon. The rest are tolerable, but ESPN must do better.

If you feel our pain, go add your sig. At least you'll get five seconds of satisfaction out of it.

I must say, though that I'm not quite as harsh as some of my fellow complainers. I do think that some of the announcers are decent. I don't mind Dellacamera. He clearly does not have a 130 football IQ, but he does keep a decent rhythm in his play-by-play, and knows enough of the game not to get too many details egregiously wrong. If he were paired up with a good analyst, again a Robbie Earle type, he'd be just fine. I also think Balboa is decent, and suffers mostly by having to spend so much time untangling O'Brien from his own tongue. I was relieved years ago when ESPN replaced Wynalda with Balboa for most of their big-game commentary.

I also share people's disdain for Wynalda (who does that punk think he is?) and Lalas (another self-inflated bladder). Balboa doesn't wear his hall-of-fame credentials as triumphantly on his sleeve as that pair. Finally, I won't hear a bad word against Julie Foudy. Some people may not like the idea that a woman is one of the better American football analysts, but it's true, and for good reason. She ran the on-field tactics of one of the most dominant football squads ever, and if you watched the US Women's national team at its peak, you'll know that it was often mid-game adjustments driven by Foudy that led to their success. In my opinion, she not only has a brilliant football brain, but she also explains the tactics well. I do think she has not shown her best in this World Cup coverage, but I think it's in large part because of the silly moderator, who has the apparent mandate to ask the analysts for dumb analogies, and for 100 different ways to repeat their assessment of the US team (even if the US game is days in the past, or future).

And hey, I've watched Faye White giving analysis on Sky TV, so I know it can get a lot worse than Julie Foudy.

I must say that I have resorted to watching some games on Univision, and I've always loved those commentators. Good way to practice my Spanish comprehension, as well. Good for Univision. They treat the game with respect, and they should get the advertising mojo. Based on comparing ads on ESPN and Univision, the big business names definitely know better than to sink too much money into the former's diffident coverage.

Qualifying countries But anyway, about the fun stuff--the games.

I must be the only one who thought Avery John's second tackle in the T&T/Sweden game was undeserving of a foul, let alone a second yellow card. Sure he went in hard, but he clearly went in for the ball. I thought the draw was a bit of justice.

Argentina/Côte d'Ivoire was a marvelous match. The Africans paid for being so wasteful in front of goal, and for having the most scandalously bad center back pairing until the U.S. team played. Their midfield pretty much dominated Argentina's, but they never picked their heads up to send the last ball in to the strikers. Instead they either dribbled into dead ends, or passed the ball merrily to astonished, but grateful Argentines. Touré and Eboué were as solid as you'd expect (Gooooooners!), but they were let down by their central colleagues.

The Dutch played their signature, gorgeous football, but seemed to lack predatory instinct beside Robben and van Persie. Robben's dazzling goal was enough for them in the end, though.

Mexico/Iran was also a huge treat because it's rare to see a game fought so uncompromisingly, and yet in such good spirit. It was high speed and high pressure across the board, but clearly played by 22 gentlemen (no one was calling Mexico gentlemen in 2002, so let's hope they keep up the hygiene). Mexico clearly had the advantage in fitness, which was the difference in the end.

Angola/Portugal shares the snoozer award with England/Paraguay and France/Switzerland so far.

Having watched Ghana play Italy I'm not so sure Côte d'Ivoire is the best African representative. Ghana played a lovely game, with the unfortunate lapses in concentration that have become characteristic of African teams. And we all know what Italy does to teams who lose concentration.

And then there was U.S. versus the Czechs. I hope now people can drop the hyperbole about Landon Donovan. He's a good player, but just put the likes of Nedved on the field and the difference in class is painfully apparent (and Nedved was having a relatively off day). At least no one gave Nedved reason to throw one of his characteristic temper tantrums. Sure Landon ran circles around an aging German team in 2002, but let's see him manage that against the current Germans (beside the still-ponderous central defender pairing). I hated to see Oguchi Onyewu so badly outclassed as well (Igbo represent, or...not). I just hope this tournament will teach him lessons that he won't really pick up in the Belgian league. Beasley's disappearance was amazing. I really didn't expect all that much from Convey, despite the hype, but I did expect Beasley to be ghosting past giant defenders until one of them decided to chop him viciously down. As it was the Czechs didn't need their hatchets.

Eddie Johnson came in and provided a heck of a spark. I'd been pretty annoyed when Arena didn't start either of the soccer-hip-hoppers Dempsey or Johnson. They're the only two players on the U.S. team who don't know any better than to take on world class defenders one on one (that's probably the Hip-Hop attitude right there). I think that considering that Italy will neuter the U.S. midfield as surely as the Czechs did, Arena had better bench McBride (a shame, because McBride is a fine goal-scorer) and put in both Johnson and Dempsey, who can cause havoc blazing in from near the half-way line. McBride plays best with his back to goal, and the present U.S. midfield will never get the ball to such a forward. Personally, I can't see the U.S. beating either Italy and Ghana without wholesale changes. Italy versus Ghana proved how fast and physically imposing both teams are. If the U.S. couldn't handle Koller's strength and Rosický's quickness, they'll really be in for a belting against the other Group E teams. Sure the U.S. was over-matched, but I put the loss down to Arena's tactics. He never really gave them a chance. And the way he's shifting responsibility to his players in the media is disgraceful. The last thing the U.S. needs right now is blow after blow to team spirit inflicted by their own manager.

Speaking of Rosický, hell yeah! Let's see some of that at Ashburton Grove. It would go some way to making up for his big mouth.

So Togo actually scored a goal. They should be thankful. I predict misery for Togo, and it would serve them right for their treatment of Keshi. It's not just that Keshi is a Nigerian, but that he's an African. I have as much disdain for the Nigerian sport authorities for not promoting Sia-Sia after the Flying Eagles' U-20 world championship heroics. If African nations don't start appreciating African coaches, they'll never attain the class of the Europeans and South Americans.

Brazil/Croatia was what I expected. Brazil did just enough to get the result. It's too bad Croatia never managed to score, or we'd have had more of a spectacle. Ronaldinho had a few flashes of outrageous brilliance, and Carlos proved again that he wallops a leather ball as if it were a toy balloon. Ronaldo, however, grew roots under his boots. Something's up, and I wouldn't be surprised if he doesn't make an appearance for the next game.

Spain/Ukraine was nothing like I expected. The new-look team seems to have worked for Spain, because the players clearly haven't read the script, and have no idea they're supposed to disappoint everyone. They assailed the Ukraine, sally after sally with such venom that the Eastern Europeans staggered back instinctively, finding themselves down two-nil in under 25 minutes. I hope some other teams pay attention and go for the feeding frenzy start. The U.S. definitely will have to do so against Italy. The Spanish victory was quite sullied by the inexplicable foul call and red card early in the second half. The referee looked as if he was in a great position to see that David Villa took a wild swing, didn't strike the ball well, and fell of his own clumsiness. How he construed a whack by the Ukranian defender is beyond me. The refereeing so far has been--shall I say--quirky. But my oh my, that fourth goal. I would have thought nothing would top Puyol's rampaging run and visionary pass, but El Niño's scorching strike just about did it justice. I picked Puyol as a player to have a real presence, but I expected it to be more a matter of erasing an opponent's star striker, rather than with mid-field cameos.

BTW, I was going to say that this World Cup has been a terrible advertisement for central defenders, and then Puyol came along and redeemed the class. Who knew he'd shed his occasional clumsiness so emphatically on the big stage?

Tunisia/Saudi Arabia was maybe the best spectacle so far. It was also fought with a combination of intensity and good spirit. You're either Tunisian or born with a heart of stone if you didn't cheer Al-Jaber's marvelous goal. And if you know Bolton at all, you recognize the pugnaciousness that went into Jaidi's response.

As for Germany/Poland, all I can say is: didn't I say Neuville is one of the wiliest strikers? And a great choice for a late entry? One thing the World Cup is lovely for is giving the true soccer fan those occasional moments when he can puff himself into a petty Nostradamus.

[Uche Ogbuji]

via Copia

Incredible Golie Punt

I was wondering if I was the only one (besides Sean Palmer) who saw that incredible punt by the English goalie (I think it was) that hit a recording (or display) device hanging above the field - at least 80 meters above the field?

I used to be a pretty good goalie (still am) so I'm still scratching my head over whether the goalie simply ate his wheaties that day or if the balls are that much different. Soon after, I heard 45000+ people sing God Save the Queen in almost perfect unison and remembered that incredible things are meant to happen in the World Cup.

[Uche Ogbuji]

via Copia

Misery: ABC/ESPN World Cup announcers (very minor spoiler)

I'd suspended blogging until I finished work on a new engine for Copia, but this is the World Cup. I feel like a kid on his birthday, and I just can't keep a lid on.

Despite an exciting start to Germany 2006 I've had a depressing inkling of how hard it's going to be to endure the announcers. For Germany vs. Costa Rica ESPN2 put forth Marcelo Balboa and some git I've never heard of named Dave O'Brien. Balboa is a good analyst. He's not exactly Robbie Earl, but he does know the game very well (he was one of the best US defenders in history, and is in the US Soccer hall of fame). Of course I'm biased because he also lives a few blocks from me (he played for the Colorado Rapids before he retired).

I wondered about the O'Brien guy, though, and I didn't have to wonder long. I think I can summarize his knowledge of football thus: He knows that the ball is round and that the goal's net is not made of barbed wire, but he knows hardly anything beyond that. Marcelo Balboa was constantly having to interrupt to correct O'Brien's laughably wrong assessments of matters on the pitch. Just to give one mad-cap example, a Costa Rican defender stuck out a hand to pull Schweinsteiger's shirt in the box. Schweinsteiger (I think it was him, but I might be remembering incorrectly) dove and the ref ignored him. It was one of those cases of: sure it's technically a foul, but far too minor to merit a penalty. O'Brien, however, took this as an opportunity to say: "That just shows that the idea that you cannot use your hands in soccer is a complete misnomer". As such he managed to 1) misuse the word "misnomer", 2) confound the the many possible senses of the term "use your hands" 3) ignore the fact that shirt-pulling is illegal in football.

My ultimate exasperation came when Klinsman brought in Neuville to replace Klose mid-way though the second half. O'Brien asked Balboa, in a mystified tone, "so why does Klinsman decide to sub Neuville for Klose at this time?" I just about jumped up and down yelling at the TV: "Because Neuville is one of the wiliest strikers in the world, and is a perfect man to bring in to poach a late goal when a game is not quite winding down the way you're hoping". The problem is that clearly O'Brien knows nothing about these players. Neither announcer has mentioned anything to indicate that they're at all familiar with players' exploits at club level. I end up having to explain to Lori each players' characteristics that I've learned from watching club leagues and cups. That's the sort of awareness I expect from an announcer. They should be the ones telling me that Klose sometimes tends to flag a bit at the end of Werder Bremen games. That Wanchope was known for gorgeous, composed goals (as well as some inconsistency) during a long stretch playing in England, etc. O'Brien was more keen on telling us over and over that Wanchope played college Basketball in the U.S. Bah! It's enough to drive a football fan to an early grave.

ESPN, why oh why can we not have Derek Rae to call for US TV? (To everyone else, yeah, I know people find Rae's usual gab partner Tommie Smyth annoying, but Rae himself is extremely knowledgeable and professional). Or if it must be an American, why not poach former USA player Christopher Sullivan from Fox Soccer Channel? Sullivan possibly has the most encyclopaedic knowledge of football of any analyst in any country. I'd say his only problem is that he seems to dislike saying anything negative about anyone. He's just a bit too affable.

[Uche Ogbuji]

via Copia

Updating Metacognition Software Stack

Metacognition was down for some time as I updated the software stack that it runs on (namely 4Suite and RDFLib). There were some core changes:

  • 4Suite repository was reinitialized using the more recent persistence drivers.
  • I added a seperate section for archived publications (I use Google Reader's label service for copia archives)
  • I switched to using RDFLib as the primary RDF store (using a recently written maping between N3/FOL and a highly efficient SQL schema) and the filesystem for everything else
  • I added the SIOC ontology to the core index of ontologies
  • Updated my FOAF graph and Emeka's DOAP graph

Earlier, I wrote up the mapping in a formal notation (using MathML so it will only be viewable in a browser that supports it - like firefox) that RDFLib's FOPLRelationalModel was based on.

In particular, it's incredibly more responsive and better organized. Generally, I hope for it to serve two purposes: 1) Organize my thoughts on and software related to applying Semantic Web Technologies to 'closed' content management systems 2) Serve as a (markdown-powered) whiteboard and playground for tools / demos for advocacy on best practices in problem solving with these technologies.

Below is a marked-up diagram of some of these ideas.

Metacognition-Roadmap

The publications are stored in a single XML file and are rendered (run-time at the server) using a pre-compiled XSLT stylesheet against a cached Domlette. Internally the document is mapped into RDF persistence using an XSLT document definition associated with the document so all modifications are synched into an RDF/XML equivalent.

Mostly as an academic exercise - since the 4Suite repository (currently) doesn't support document definitions that output N3 and the content-type of XSLT transform responses is limited to HTML/XML/Text - I wrote an equivalent publications-to-n3.xslt. The output is here.

Chimezie Ogbuji

via Copia