Esempio n. 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)
Esempio n. 2
0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except (RecursionDepthException, TooBigException):
         return set()
Esempio n. 3
0
 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)
Esempio n. 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
Esempio n. 5
0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except EvaluationException:
         return set()
Esempio n. 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
Esempio n. 7
0
 def __call__(self, *args):
     try:
         return RecursiveLexicon.__call__(self, *args)
     except EvaluationException:
         return set()
Esempio n. 8
0
 def propose(self):
     while True:
         try:
             return RecursiveLexicon.propose(self)
         except RecursionDepthException:
             pass
Esempio n. 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