[ner] Fix sparql results for types filtering after modifying in dataio
authorVincent Michel <vincent.michel@logilab.fr>
Wed, 08 Jan 2014 16:17:46 +0100
changeset 381 f6b7eff50f7f
parent 380 041c88ad2c3b
child 382 9494bce3a7a9
[ner] Fix sparql results for types filtering after modifying in dataio
ner/filters.py
--- a/ner/filters.py	Wed Jan 08 16:52:18 2014 +0000
+++ b/ner/filters.py	Wed Jan 08 16:17:46 2014 +0100
@@ -54,7 +54,7 @@
                     filtered_named_entities.append((uri, p, t))
             else:
                 results = sparqlquery(self.endpoint, self.query % {'uri': uri})
-                types = set([r['type']['value'] for r in results])
+                types = set([r[0] for r in results])
                 if not len(types.intersection(self.accepted_types)):
                     seen_uris[uri] = False
                 else: