Created
November 18, 2015 22:35
-
-
Save matael/db943ce9d5dfaeeecde5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GenericMetric: | |
def __init__(self): | |
pass | |
def score(self): | |
raise NotImplementedError | |
# etc... | |
## et pour l'usage | |
class BLEU(GenericMetric): | |
def __init__(self): | |
pass | |
def __exec_external(self, result_set): | |
# appels à tes trucs externes (en méthodes privées | |
def score(self, result_set): | |
score = self.__exec_external(result_set) | |
# do stuff | |
return score |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment