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.
评论列表
文章目录