示例#1
0
文件: HostModel.py 项目: Lancert9/WUA
 def calSinglePathProp(self, a_record):
     """
     get the probability of a UrlRecord's url path.
     :param a_record: UrlRecord
     :return: dict --> {str: float} -- url's encoded path map to it's probability.
     """
     a_path_prop = CalProp.calPathProp({a_record: 1}, self.__path_cell, self.__2path_cells)[0]
     a_path_code = a_record.get_path()
     return {a_path_code: a_path_prop}
示例#2
0
 def calSinglePathProp(self, a_record):
     """
     get the probability of a UrlRecord's url path.
     :param a_record: UrlRecord
     :return: dict --> {str: float} -- url's encoded path map to it's probability.
     """
     a_path_prop = CalProp.calPathProp({a_record: 1}, self.__path_cell,
                                       self.__2path_cells)[0]
     a_path_code = a_record.get_path()
     return {a_path_code: a_path_prop}