def __init__(self, config, x=None, y=None, h=None, w=None): Generator.__init__(self, config) if x is None: self._x = numericalGenerator(None, None) self._x.setLabel("x") self._y = numericalGenerator(None, None) self._y.setLabel("y") self._h = numericalGenerator(None, None) self._h.setLabel("height") self._w = numericalGenerator(None, None) self._w.setLabel("width") else: self._x = x self._y = y self._h = h self._w = w self._page = None # correspond to _structure self._structure = [[(self.getX(), 1, 100), (self.getY(), 1, 100), (self.getHeight(), 1, 100), (self.getWidth(), 1, 100), 100]] # standard deviation used for numerical values self._TH = None
def __init__(self,lang): self.lang = lang locale.setlocale(locale.LC_TIME, self.lang) Generator.__init__(self,{}) # list of content self._value = None # reference to the list of content (stored) self._lresources = None self.isWeighted = False
def __init__(self, lw=[1,0,0]): """ config: provides a weight for each typo positions """ assert len(lw) == 3 Generator.__init__(self,{}) mylist=[] for i,w in enumerate(lw): mylist.append((self.lnames[i],w)) self.loadResourcesFromList([mylist])
def __init__(self, mean, sd): Generator.__init__(self, None) self._name = 'num' self._mean = mean self._std = sd self._generation = None self._value = None self.realization = [ 'D', # digits : 101 'N' # text (hundred one) ]
def __init__(self, config, configKey=None, x=None, y=None, x2=None, y2=None, h=None, w=None, alpha=0): Generator.__init__(self, config, configKey) if x is None: self._x = numericalGenerator(None, None) self._x.setLabel("x") self._y = numericalGenerator(None, None) self._y.setLabel("y") self._h = numericalGenerator(None, None) self._h.setLabel("height") self._w = numericalGenerator(None, None) self._w.setLabel("width") self._x2 = numericalGenerator(None, None) self._x2.setLabel("x2") self._y2 = numericalGenerator(None, None) self._y2.setLabel("y2") else: self._x = x self._y = y self._x2 = x2 self._y2 = y2 self._h = h self._w = w # text orientation self._rotationAngle = alpha # keep track of the last positions for further content self._lastYposition = None self._lastXPosition = None self._page = None # correspond to _structure self._structure = [[(self.getX(), 1, 100), (self.getY(), 1, 100), (self.getX2(), 1, 100), (self.getY2(), 1, 100), (self.getHeight(), 1, 100), (self.getWidth(), 1, 100), 100]] # standard deviation used for numerical values self._TH = None
def __init__(self, config, configKey, objGen, nbMaxGen): Generator.__init__(self, config, configKey) self.configObj = configKey self.myObjectGen = objGen self.nbMax = nbMaxGen
def __init__(self, config, objGen, nbMaxGen): Generator.__init__(self, config) self.myObjectGen = objGen self.nbMax = nbMaxGen