예제 #1
0
파일: gkernel.py 프로젝트: aquadrop/solr_py
    def __init__(self, graph_path, clf_path):
        # self.tokenizer = CoreNLP()
        self.graph = None
        self.gbdt = None
        self.state_cleared = True
        self._load_graph(graph_path)
        self._load_clf(clf_path)

        self.qu = QueryUtils()
예제 #2
0
 def __init__(self):
     print('attaching qa kernel...')
     ## http://localhost:11403/solr/sc_qa/select?fq=entity:%E5%8E%95%E6%89%80&indent=on&q=*:*&wt=json
     self.qa_url = 'http://localhost:11403/solr/sc_qa/select?q.op=OR&wt=json&q={0}'
     self.qa_exact_match_url = 'http://localhost:11403/solr/sc_qa/select?wt=json&q=question:{0}'
     self.qu = QueryUtils()
     try:
         self.bt = BenebotSim.Instance()
     except:
         traceback.print_exc()
예제 #3
0
 def __init__(self, data_path):
     print('initilizing classifier...')
     self.data_path = data_path
     self.num_vol = 0
     self.vol = {}
     self.classes = {}
     self.index_classes = {}
     self.classes_num_sub = {}
     self.classifiers = {}
     self.qu = QueryUtils()
예제 #4
0
 def __init__(self):
     print('initilizing interactive kernel...')
     self.last_g = None
     self.qu = QueryUtils()
예제 #5
0
 def __init__(self):
     print('initilizing qa kernel...')
     self.qu = QueryUtils()
예제 #6
0
 def __init__(self):
     print('attaching greeting kernel...')
     self.last_g = None
     self.qu = QueryUtils()
     self.greeting_url = 'http://localhost:11403/solr/sc_greeting/select?q.op=OR&wt=json&q=question:(%s)'
     self.exact_greeting_url = 'http://localhost:11403/solr/sc_greeting/select?wt=json&q=exact_question:(%s)'
예제 #7
0
 def __init__(self):
     print('attaching sing kernel...')
     ## http://localhost:11403/solr/sc_qa/select?fq=entity:%E5%8E%95%E6%89%80&indent=on&q=*:*&wt=json
     self.qa_url = 'http://localhost:11403/solr/sc_music_kb/select?q.op=OR&wt=json&q=%s'
     self.qu = QueryUtils()