def __init__(self): """ initialize local variables. """ self.qparser = JsonParser.JsonParser() self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.resp = ResponseUtil.ResponseUtil() self.result = {}
def __init__(self): """ initialize local variables. """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.sentence = SentenceReader.SentenceReader() self.splitor = HanlpSplitor.HanlpSplitor() #self.cypherlist = [] self.sentcypherlist = []
def __init__(self): """ initialize local variables. """ self.__sleep_time_per_request = 0.01 self.__sleep_time_per_request_none = 180.00 self.__sleep_time_per_loop = 60 self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.reader = WikiReader.WikiReader()
def __init__(self): """ initialize local variables. """ self.coursename = None self.sourcefilepath = None self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.sentence = SentenceReader.SentenceReader() #self.splitor = JiebaSplitor.JiebaSplitor() self.splitor = HanlpSplitor.HanlpSplitor() #self.cypherlist = [] self.sentcypherlist = []
def __init__(self): """ initialize local variables. """ self.__sleep_time_per_request = 0.01 self.__sleep_time_per_request_none = 180.00 self.__sleep_time_per_loop = 60 self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.reader = ExcelReader_v1.ExcelReader() # 从文件中没有读取出数据的文件列表 self.emptyfile_list = []
def __init__(self): """ initialize local variables. """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) # 从文件中没有读取出数据的文件列表 self.emptyfile_list = [] # 已经处理的文件 self.processed_file = [] # 排除的文件,这些文件有问题 self.exclude_files = []
def __init__(self): """ initialize local variables. 仅仅是对知识点的关键词,如果在子网中,则,改知识点为候选知识点,本类仅做这些事情 """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.sentence = SentenceReader.SentenceReader() #self.splitor = JiebaSplitor.JiebaSplitor() self.splitor = HanlpSplitor.HanlpSplitor() #self.cypherlist = [] self.sentcypherlist = [] #self.cypherlist.append("CREATE CONSTRAINT ON (c:WORD) ASSERT c.name IS UNIQUE;") self.knowledge = {}
def __init__(self): """ initialize local variables. 该类为了处理v2中的问题,题干中没有知识点的概念,此时需要统计题干子网的聚集度,通过统计子网中关系的集中概念 来给定概念的权重,以此来决定知识点 """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.sentence = SentenceReader.SentenceReader() #self.splitor = JiebaSplitor.JiebaSplitor() self.splitor = HanlpSplitor.HanlpSplitor() #self.cypherlist = [] self.sentcypherlist = [] #self.cypherlist.append("CREATE CONSTRAINT ON (c:WORD) ASSERT c.name IS UNIQUE;") self.knowledge = {}
def __init__(self): """ initialize local variables. 该类对v1版本进行了改进,通过题干中的关键词和知识点中的关键词,匹配度高者,优先作为知识点候选 该类仅对知识点中的关键词,包含在题干中,比较有效,对于题干中毫无知识点的感念,则无效 """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.sentence = SentenceReader.SentenceReader() #self.splitor = JiebaSplitor.JiebaSplitor() self.splitor = HanlpSplitor.HanlpSplitor() #self.cypherlist = [] self.sentcypherlist = [] #self.cypherlist.append("CREATE CONSTRAINT ON (c:WORD) ASSERT c.name IS UNIQUE;") self.knowledge = {}
def __init__(self): """ initialize local variables. 该类综合v2,v3的情况,形成的 """ self.sentenceparam = 0.4 self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) self.sentence = SentenceReader.SentenceReader() #self.splitor = JiebaSplitor.JiebaSplitor() self.splitor = HanlpSplitor.HanlpSplitor() #self.cypherlist = [] self.sentcypherlist = [] #self.cypherlist.append("CREATE CONSTRAINT ON (c:WORD) ASSERT c.name IS UNIQUE;") self.knowledgefilepath = None self.questionfilepath = None self.outputfilepath = None self.knowledge = {} self.outputcontentlist = []
def __init__(self): """ initialize local variables. """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None) #self.cypherlist = [] self.sentcypherlist = [] self.nousecharlist = [] self.hasquerydict = {} self.inqueue = {} #self.cypherlist.append("CREATE CONSTRAINT ON (c:WORD) ASSERT c.name IS UNIQUE;") self.wordposlist = [] # 把停用词做成字典 self.stopwords = {} fstop = open('./../data/stopwords-single.txt', 'r') for eachWord in fstop: self.stopwords[eachWord.strip().decode( 'utf-8', 'ignore')] = eachWord.strip().decode('utf-8', 'ignore') fstop.close()
def __init__(self): """ initialize local variables. """ self.neo4jdriver = Neo4jHandler.Neo4jHandler(None)