SYMBOL INDEX (99 symbols across 14 files) FILE: Matcher/KeywordMatcher.py class KeywordMatcher (line 3) | class KeywordMatcher(Matcher): method __init__ (line 9) | def __init__(self): method match (line 14) | def match(self, query): FILE: Matcher/bm25Matcher.py class bestMatchingMatcher (line 6) | class bestMatchingMatcher(Matcher): method __init__ (line 12) | def __init__(self, segLib="jieba", removeStopWords=False): method initialize (line 34) | def initialize(self,ngram=1): method initBM25 (line 48) | def initBM25(self): method sim (line 71) | def sim(self, doc, index): method calculateIDF (line 82) | def calculateIDF(self): method buildWordLocationRecord (line 95) | def buildWordLocationRecord(self): method buildWordSet (line 105) | def buildWordSet(self): method addNgram (line 113) | def addNgram(self,n): method generateNgram (line 124) | def generateNgram(self,n,sentence): method joinTitles (line 128) | def joinTitles(self): method match (line 131) | def match(self, query): FILE: Matcher/fuzzyMatcher.py class FuzzyMatcher (line 5) | class FuzzyMatcher(Matcher): method __init__ (line 11) | def __init__(self, segLib="jieba", removeStopWords=False): method joinTitles (line 18) | def joinTitles(self): method tieBreak (line 21) | def tieBreak(self, query, i, j): method match (line 45) | def match(self, query): FILE: Matcher/matcher.py class Matcher (line 12) | class Matcher(object): method __init__ (line 19) | def __init__(self, segLib="jieba"): method jiebaCustomSetting (line 35) | def jiebaCustomSetting(self, dict_path, usr_dict_path): method TaibaCustomSetting (line 42) | def TaibaCustomSetting(self, usr_dict): method loadStopWords (line 48) | def loadStopWords(self, path): method loadTitles (line 53) | def loadTitles(self, path): method match (line 58) | def match(self, query): method getSimilarity (line 74) | def getSimilarity(self): method wordSegmentation (line 77) | def wordSegmentation(self, string): method TitlesSegmentation (line 88) | def TitlesSegmentation(self, cleanStopwords=False): FILE: Matcher/quickSearch.py class QuickSearcher (line 1) | class QuickSearcher(object): method __init__ (line 7) | def __init__(self, docs=None): method buildInvertedIndex (line 12) | def buildInvertedIndex(self, docs): method quickSearch (line 27) | def quickSearch(self, query): FILE: Matcher/vectorMatcher.py class VectorMatcher (line 6) | class VectorMatcher(Matcher): method __init__ (line 8) | def __init__(self): method match (line 13) | def match(self, query): FILE: Matcher/wordWeightMatcher.py class WordWeightMatcher (line 10) | class WordWeightMatcher(Matcher): method __init__ (line 16) | def __init__(self, segLib="Taiba"): method initialize (line 24) | def initialize(self): method buildWordDictionary (line 33) | def buildWordDictionary(self): method buildWordBag (line 41) | def buildWordBag(self): method calculateWeight (line 44) | def calculateWeight(self): method getCooccurrence (line 54) | def getCooccurrence(self, q1, q2): method getWordWeight (line 69) | def getWordWeight(self, word, n=1): method match (line 73) | def match(self, query, sort=False): FILE: article.py class Article (line 1) | class Article(object): method __init__ (line 7) | def __init__(self, article): method merge_response (line 25) | def merge_response(self, responses): FILE: chat.py function main (line 10) | def main(): class GossipBot (line 17) | class GossipBot(object): method __init__ (line 22) | def __init__(self,match_type="bm25"): method testSegment (line 31) | def testSegment(self): method chatTime (line 40) | def chatTime(self): method getResponse (line 46) | def getResponse(self,query,threshold=50): method randomPick (line 59) | def randomPick(self, answers): method randomTalks (line 66) | def randomTalks(self, num=100): FILE: corpus.py class Corpus (line 8) | class Corpus(object): method __init__ (line 10) | def __init__(self): class PTTCorpus (line 14) | class PTTCorpus(Corpus): method __init__ (line 16) | def __init__(self): method load_data (line 19) | def load_data(self, path, is_dir=False): method get_text (line 38) | def get_text(self): method get_titles (line 47) | def get_titles(self): FILE: filter.py function main (line 5) | def main(): class ArticleFilter (line 16) | class ArticleFilter(object): method __init__ (line 18) | def __init__(self): method init_load_stopwords (line 36) | def init_load_stopwords(self): method process_raw_data (line 47) | def process_raw_data(self, path, is_dir=False, to_one_file=False, one_... method reclean_corpus (line 78) | def reclean_corpus(self): method merge_coprus (line 81) | def merge_coprus(self, path="data/processed/"): method load_processed_corpus (line 97) | def load_processed_corpus(self, path="data/processed/"): method generate_corpus (line 118) | def generate_corpus(self, articles, drop_response=True, negative_tag=N... method clean_responses (line 176) | def clean_responses(self, responses, negative_user=set(), min_length=6... method _update_users_history (line 213) | def _update_users_history(self, response): method get_tag (line 238) | def get_tag(self, title): method print_titles (line 253) | def print_titles(self): method print_user_info (line 262) | def print_user_info(self): method print_response (line 266) | def print_response(self): FILE: match.py function main (line 12) | def main(): function getMatcher (line 15) | def getMatcher(matcherType,removeStopWords=False): function matcherTesting (line 42) | def matcherTesting(matcherType,removeStopWords=False): function woreWeightMatch (line 61) | def woreWeightMatch(): function fuzzyMatch (line 68) | def fuzzyMatch(cleansw=False): function bm25 (line 87) | def bm25(): FILE: responsesEvaluate.py class Evaluator (line 12) | class Evaluator(Matcher): method __init__ (line 16) | def __init__(self,segLib="jieba"): method cleanFormerResult (line 36) | def cleanFormerResult(self): method getBestResponse (line 44) | def getBestResponse(self, responses, topk, debugMode=False): method loadFilterdWord (line 59) | def loadFilterdWord(self,path): method buildResponses (line 64) | def buildResponses(self, responses): method segmentResponse (line 78) | def segmentResponse(self): method buildCounterDictionary (line 91) | def buildCounterDictionary(self): method buildTokenDictionary (line 100) | def buildTokenDictionary(self): method evaluateByGrade (line 107) | def evaluateByGrade(self,topk,debug=False): class ClusteringEvaluator (line 152) | class ClusteringEvaluator(Evaluator): FILE: util/fileReader.py class FileReader (line 3) | class FileReader(object): method __init__ (line 5) | def __init__(self): method get_file_list (line 9) | def get_file_list(self, path):