classifier.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:ClassifyHub 作者: Top-Ranger 项目源码 文件源码
def classify(self, data):
        try:
            language = data.get_repository_data()['language']
        except github.GithubError:
            return utility.get_zero_class_dict()

        if language is None:
            language = '_None_'

        if language in self._model.config:
            return self._model.config[language].copy()
        else:
            return utility.get_zero_class_dict()

    ##
    # \brief Learns the distribution of the languages based on the provided repositories.
    #
    # \param learn List containing Tupel (GITHUB, CLASS), where GITHUB is the repository as a github.Github class and
    #              CLASS is the class label of the repository as a string.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号