Skip to content

Instantly share code, notes, and snippets.

@matael
Created November 18, 2015 22:35
Show Gist options
  • Save matael/db943ce9d5dfaeeecde5 to your computer and use it in GitHub Desktop.
Save matael/db943ce9d5dfaeeecde5 to your computer and use it in GitHub Desktop.
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