2012-12-28

Turtle power and other RDF serialized formats

RDF triples specify statements with 3 parts: subject, predicate, object.

To store triples in a file there are several alternatives:

The first is RDF/XML.

The others are text based and are easier to read and use:
N3, TURTLE (TTL) and N-TRIPLE are plain text serializations of RDF.

N3 is a superset of TTL, and TTL is a superset of N-TRIPLE.

The most basic representation is N-TRIPLE but it is very verbose.

My personal favorite is TURTLE (TTL) because it provides some very nice shorcuts while maintaining the overall simplicity. Read more about it in the guide, section 2.

How to install Jena command line tools?

Apache Jena is an open-source library for building Semantic Web applications using the Java programming language.
At the core of the library is a RDF implementation.
The SPARQL query language can be used to query RDF models.

The distribution includes a set of command line tools that can be very useful.
To install them, follow the next steps:

1. Download Jena binaries from http://www.apache.org/dist/jena/

2. Unzip file to an installation folder

3. Define the environment variable JENAROOT

4. Add %JENAROOT%\bat to the PATH environment variable

At the present moment, the following tools are available:

qtest
query
rdfcat
rdfcompare
rdfcopy
rdfparse
rset
RuleMap
schemagen
sparql
turtle
version

Consult the javadoc (jena package) for more details.

2012-12-10

Your next boss could be a computer

Your next boss could be a computer - tech - 06 December 2012 - New Scientist: "I'D RATHER have a computer as my boss than a jerk," says Daniel Barowy. To that end he has created AutoMan, the first fully automatic system that can delegate tasks to human workers via crowdsourcing platforms such as Amazon's Mechanical Turk. Barowy and colleagues designed AutoMan to send out jobs, manage workers, accept or reject work and make payments. "You're replacing people's bosses with a computer," he says.

2012-12-01

Niall Ferguson - West less good at being West

Niall Ferguson: 'West less good at being West' (CNN)

"
(CNN) -- The speed at which the global economy has pivoted from the West to emerging economies like China is astounding, says author Niall Ferguson.

"If you think back to 1978 when I was a teenager, the average American was 22 times richer than the average Chinese. And today it's less than five times," said Ferguson, a Harvard history professor and a former adviser to 2008 Republican Party presidential candidate John McCain. "That's an amazing reduction in the global imbalance and it's happen in the space really of 30 years."

"The West is at a different phase of development -- economically, demographically -- and it's also at a different place culturally from these countries that are emerging from various forms of economic control -- whether the bureaucratic system of post-Raj India or the communist system that was gradually dismantled economically in China after 1978," he said. This is bringing back one of the most remarkable shifts in the global balance of economic power."

Ferguson sat down last week with CNN's Andrew Stevens in detailed talk on the global economy.

What are the underlying reasons for the decline of the West?

In our lifetime Western ascendancy is coming to an end, after 500 years, when the story was the great divergence -- when the west got much richer than everybody else. And it's extraordinary that really since the 1970s, this historical tide has turned.
New age of U.S. prosperity?
Are central banks doing enough?
Niall Ferguson: The West and the Rest
Sharing the wealth of ideas

I think there are two processes at work here. One is the rest of the world -- led by China -- have been downloading our killer applications. They have been imitating the things that work well in the West, particularly in the realm of business. And this is to be celebrated. It's great to see countries like China and India lifting hundreds of millions of people out of poverty by essentially copying Western ways of doing things.

But I think there is another process at work, which is in some ways independent -- the West is becoming less good at being the West. The things that worked well in the West for over half a millennia don't work so well now. And one way of looking at it is to say: Why is it that the Western economies have malfunctioned? It's not just that there ways a financial crisis and bankers are terrible people. It's much more profound than that.

Why are Western economies performing so badly?

One way of thinking about this is to ask why so many economies, most of them Western -- Japan is the exception -- are currently crushed by debt, which in some cases exceed 100% of GDP? And these debts are forecast to rise even further in the U.S. The simple answer is to say there is a terrible problem of government extravagancy, but I don't think that's the right answer. One way of thinking about this is to say that debt represents a tax on the future. And the big accumulation of debt that we've seen over the last 20 or 30 years in the Western world reflects a breach of contract between the current generation and the next generations. And these debts represent a big burden on the future. And that is one reason I think we've seen a slowdown in the Western world because these burdens of debt act as a major check on economic dynamism.

Why has this generation decided to ignore future generations? Why have we become so selfish?

At some level I think it's a cultural shift. We've moved a long way from our ideals of self-sacrifice for the future that characterized the West during its hay days of industrialization, overseas expansion -- not to mention large-scale warfare. So there's partly been a cultural shift towards the 'me generation' -- consume now, live in the present. But I think it's slightly more than that.

I think what happened after World War II was that it was decided in most Western countries to create pretty generous welfare states that were going to exist to transfer resources from the rich to the poor. And that worked pretty well. It did reduce inequality in those countries when these systems were introduced. But over time the welfare state has become dysfunctional in a surprising way. But in a way it became a victim of its own success: It became so successful at prolonging life, that it becomes financially unsustainable, unless you make major changes to things like retirement ages. And everywhere you see the same basic story, whether you're looking at northern Europe, southern Europe, or north America -- welfare states become harder and harder to finance, and structural budget deficits emerge.

That's to say deficits that are there even when the economy is growing well. And I think these are symptoms of a more profound problem that is causing the Western slowdown. Contrast that with the story in Asia, where welfare states, let's say in China, are much less well developed.

Is it going to take something like a fiscal cliff -- a sovereign debt crisis -- to bring this period to an end?

The European experience suggests nothing gets done until there is a crisis. And this crisis has begun in countries like Spain, Greece, Ireland, and I think soon it will spread to France, as people begin to realize that the French position is actually no better than the other Latin European countries. At some point one can imagine a crisis like that happening in the most developed Asian economy, Japan. And I think sooner or later it may end up happening in the U.S. Although I must say I'm becoming less and less sure that will happen soon. There are things happening in the U.S. that make it quite different, in the sense for example that the demographics are not so bad -- partly because of immigration -- and also interestingly the U.S. is about to have the most amazing free lunch on the back of shale gas and shale oil. The US economy is going to get a really big shot in the arm.

What then is the restructuring that needs to happen at an economic level in the West?

Well, I think the most important thing to recognize is that it's not just about taxing and spending. If you define this too narrowly in fiscal terms then you end up in the mess that southern Europe is in -- trying to balance the budget, even as your economy is shrinking. It's better I think to ask questions of a more profound nature about the institutional framework within which society operates. To me one of the most profound contrasts between the West and the rest is that things like the rule of law -- regulation, bureaucracy -- are becoming more burdensome in Western countries, even as they are becoming less burdensome in emerging markets.

You mean they are getting in the way of development?

They really are. I mean one of the main arguments that I make in my new book, "The Great Degeneration," is that the rule of law in the US is becoming the rule of lawyers. The legal profession has become a very major source of cost for business. You have very complex regulation and a very parasitic legal profession, and it battens off the private sector. It's almost impossible for any major organization to function without a huge compliance department and teams of lawyers. And that is all just dead cost. It doesn't really add to the productivity of the economy.

And I think that's one of the things that I am trying to focus on: Why is our regulation so over-complicated? Why does the tax code occupy shelves, rather than just a few pages? And why is it that if you want to regulate the financial sector, you need a bill that is 2000-plus pages long? If we could aspire for greater simplicity and transparency in the tax code and most regulation, I think there would be real benefits.

As China cherry picks the best of the West, do you think they may also fall into Western excesses as well: Is this an evolutionary likelihood?

It's possible. They have some way to go. Short-term, I think the biggest problem facing the Chinese is the rule of law question. It's not the democracy question. It's more -- can China transition to a system in which the rule of law really works? That matters a lot for China's rapidly growing middle class. They want security for their property. They do not want to feel that they could have their property confiscated by an all powerful party at the drop of a hat.

It's not difficult to see what China needs to do, but whether it can do it politically, whether it can override the vested interests, or not, I really don't know.

If you think about it China is acquiring this huge middle class that's one of the direct consequences of rapid growth. And historically if you look at the Western experience it's the middle class that starts to push for rule of law and representative government and freedom of the press -- those are middle class things to want. You really don't worry about those things if you're a peasant or an industrial worker. It's inevitable I think that as this class grows in China, it will start to behave in the ways that middle classes always behave. And the Communist Party is not well set-up to meet those demands.
"