예제 #1
0
 def __init__(self):
     self.dataset = FileIO.read_json_file("sematch/benchmark-data/data.txt")
     self.results = FileIO.read_list_file("sematch/benchmark-data/result.txt")
     self.queries = [(d['query'],d['entity']) for d in self.dataset]
     self.relevants = [d['result'] for d in self.dataset]
     self.synsetExpansion = SynsetExpansion()
     self.engine = Engine()
     self.sims = ['wup', 'lch', 'res','jcn', 'lin']
     self.thresholds = [0.9,1]
     self.gpcs = ['gpc1', 'gpc2', 'gpc3', 'gpc4', 'gpc5', 'gpc6']
예제 #2
0
 def __init__(self):
     self.links = FileIO.read_json_file("db/type-linkings.txt")
     self.links = {data['offset']:data for data in self.links}
     self.query_processor = Query()
     self.expander = SynsetExpansion(0.95, 'wup')