Permalink
Browse files

Hardcode removal of united states from result list, and limit results…

… to 500
  • Loading branch information...
1 parent 8b33b69 commit 26c73234e726074af4e1588c6a63eeb0a9ee3a28 Yves Raimond committed Jul 20, 2009
Showing with 3 additions and 2 deletions.
  1. +1 −1 irc_bots/connectionfinder.py
  2. +2 −1 irc_bots/placefinder.py
@@ -78,7 +78,7 @@ def arbitrary_connection(self, e, cmd, results = []):
(str(?p) != "http://dbpedia.org/ontology/genre") &&
(str(?p2) != "http://dbpedia.org/ontology/genre")
)
-}
+} LIMIT 500
""" % (uri, uri, uri, uri)
print sparql
dbpedia = SPARQLWrapper("http://dbpedia.org/sparql")
View
@@ -76,10 +76,11 @@ def place_connection(self, e, cmd, results = []):
?place rdfs:label ?place_label .
?o <http://dbpedia.org/property/name> ?ol .
FILTER (
+(str(?place) != 'http://dbpedia.org/resource/United_States') &&
(langMatches(lang(?ol), "en") || lang(?ol) = "" ) &&
(langMatches(lang(?place_label), "en") || lang(?place_label) = "" )
)
-}
+} LIMIT 500
""" % (uri, uri)
print sparql
dbpedia = SPARQLWrapper("http://dbpedia.org/sparql")

0 comments on commit 26c7323

Please sign in to comment.