def query_word(self, word):
     """ Query a word for a Named Entities Recognition process
     """
     if self.endpoint.startswith('http://'):
         # url
         return [r[0] for r in rqlquery(self.endpoint, self.query % {'word': word})]
     else:
         return [r[0] for r in rqlquery(self.endpoint, self.query, word=word)]
 def test_rqlquery(self):
     results = rqlquery('http://www.cubicweb.org',
                        'Any U LIMIT 1 WHERE X cwuri U, X name "apycot"')
     self.assertEqual(results, [[u'http://www.cubicweb.org/1310453']])