clips/pattern — pull request #34 by kkoch986 (2013-02-27 15:40:22+00:00)
Title: Added a DBPedia search engine

I needed to change the result structure a little bit, but the DBPedia class now provides a gateway for sparql queries against DBPedia. If this is interesting to the project, I have also considered some other tools namely a freebase connector and a MongoDB connector.

Here is an example usage of the dbpedia code:
```
# Some Usage Examples:
# >>> from pattern.web import DBPedia
# >>> DBPedia().search('select distinct ?Concept where {[] a ?Concept}')
# >>>
# >>> results = DBPedia().search('PREFIX rdf: PREFIX : select * where {?a rdf:type ?s.}',"SPARQL", 1,1)
# >>> for row in results:
# ... print "Entity: " + row.data('a') + " ( " + row.data('s') + " )"
# ... print row.download('a')
```

Thanks,
- Ken