Exemple #1
0
 def __init__(self,
              alpha=0.9,
              epsilon=0.0,
              s=0.0,
              recursive_depth_bound=10,
              **kwargs):
     self.alpha = alpha
     self.s = s
     self.epsilon = epsilon
     self.recursive_depth_bound = recursive_depth_bound
     self.point_ll = 0
     RecursiveLexicon.__init__(self, alpha=self.alpha, **kwargs)
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except (RecursionDepthException, TooBigException):
         return set()
 def __init__(self, alpha=0.9, recursive_depth_bound=10, **kwargs):
     self.alpha = alpha
     self.recursive_depth_bound = recursive_depth_bound
     self.point_ll = 0
     RecursiveLexicon.__init__(self, alpha=self.alpha, **kwargs)
Exemple #4
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLexicon.__init__(self, recurse_bound=5, maxnodes=50, variable_weight=3.0, **kwargs)
     self.grammar=grammar
     self.N = 0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except EvaluationException:
         return set()
Exemple #6
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLexicon.__init__(self, recurse_bound=5, maxnodes=50, variable_weight=3.0, **kwargs)
     self.grammar=grammar
     self.N = 0
     self.outlier = -100 # read in MultinomialLikelihood
Exemple #7
0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except EvaluationException:
         return set()
Exemple #8
0
 def propose(self):
     while True:
         try:
             return RecursiveLexicon.propose(self)
         except RecursionDepthException:
             pass
Exemple #9
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLexicon.__init__(self, recurse_bound=5, maxnodes=50, variable_weight=3.0, **kwargs)
     self.grammar=grammar
     self.N = 0