nkjp.py
345 Bytes
import poliqarp
def contains(connection, query):
connection.make_query(query)
connection.run_query(1)
if connection.get_n_spotted_results() > 0:
return True
return False
def connect(corpus):
connection = poliqarp.Connection()
connection.make_session()
connection.open_corpus(corpus)
return connection