def __init__(self, scenario, args):
     """\
     Constructor, just checking the argument values.
     """
     Block.__init__(self, scenario, args)
     if self.language is None:
         raise LoadingException('Language must be defined!')
     self.lexicon = Lexicon()
Beispiel #2
0
 def __init__(self, scenario, args):
     """\
     Constructor, checks if language is set and selects encoding according
     to args, defauts to UTF-8.
     """
     Block.__init__(self, scenario, args)
     if self.language is None:
         raise LoadingException('Language must be defined!')
     self.encoding = args.get('encoding', 'UTF-8')
Beispiel #3
0
 def __init__(self, scenario, args):
     "Constructor, checking the argument values"
     Block.__init__(self, scenario, args)
     # just check if there is any valid argument in the argument dictionary
     if not [
             True for arg in args.keys() if arg in self.__class__.valid_args
     ]:
         raise LoadingException(
             'No valid argument given (document, bundle, zone, X(tree|node)'
         )
Beispiel #4
0
 def __init__(self, scenario, args):
     "Constructor, checking the argument values"
     Block.__init__(self, scenario, args)
     if self.language is None:
         raise LoadingException('Language must be defined!')
 def __init__(self, scenario, args):
     "Constructor, just checking the argument values"
     super(AddClausalExpletives, self).__init__(scenario, args)
     if self.language is None:
         raise LoadingException('Language must be defined!')
     self.lexicon = Lexicon()
Beispiel #6
0
 def __init__(self, scenario, args):
     "Constructor, just checking the argument values"
     super(AddPrepositions, self).__init__(scenario, args)
     if self.language is None:
         raise LoadingException('Language must be defined!')