Example #1
0
 def __init__(self, des, ctrl_code, Ltptool):
     '''
     des 接受用户的描述
     ctrl_code 控制码,控制查询类型
     '''
     self.des = des
     self.qcode = int(ctrl_code)
     self.ltptool = Ltptool
     self.graphQuery = neo4jQuery()
Example #2
0
    def __init__(self):

        self.index="baike_data_abstract"
        self.type="knowledge"
        self.key="abstract"
        self.num=10

        self.graphQuery=neo4jQuery()

        self.mongoSearch=mongoSearch()
        self.dbName='spider_data'
        self.collection='baidu_baike_3_test'
        self.collection2='baidu_baike_BIG'

        self.ltpTool=ltpTools()

        self.min_similarity_score=0.5
Example #3
0
    def __init__(self, des):
        '''初始化模块'''

        self.graphQuery = neo4jQuery()
        self.parser = TripleExtractor()

        self.index = 'case_data'
        self.docType = 'caseText'
        self.key = 'abstract'
        self.res_limit = 10
        self.des = des
        self.searchMongo = mongoSearch()

        #达到一定的分数就属于“核心相关关系”
        #“coreRela”
        self.rela_score = 0.25
        #达到标准分数就不再检索,直接返回答案,加快速度
        self.score_standard = 0.8
Example #4
0
    def __init__(self, des, tripletool):
        '''初始化模块'''

        self.graphQuery = neo4jQuery()
        #self.ltpTools=Ltptool
        print('{ + } 案例分析加载模型')
        self.parser = tripletool

        self.index = 'case_data'
        self.docType = 'caseText'
        self.key = 'plainText'
        self.res_limit = 10
        self.des = des
        self.searchMongo = mongoSearch()

        #达到一定的分数就属于“核心相关关系”
        #“coreRela”
        self.rela_score = 0.25
        #达到标准分数就不再检索,直接返回答案,加快速度
        self.score_standard = 0.8
Example #5
0
    def __init__(self, Ltptool):

        self.index = "baike_data_abstract"
        #self.type="knowledge"
        self.key = "plainText"
        self.num = 10

        self.graphQuery = neo4jQuery()

        self.mongoSearch = mongoSearch()
        self.dbName = 'spider_data'
        self.collection = 'baidu_baike_3_test'
        self.collection2 = 'baidu_baike_BIG'

        #此处self直接引用参数中的对象
        self.ltpTools = Ltptool
        print('{ + } 知识查询加载模型')

        self.min_similarity_score = 0.5
        print('{+} 知识查询控制脚本完成了初始化!')