featuremapper/__init__.py
def _coordinate_inputs(self, p, feature_values):
        """
        Generates pattern generators for all the requested inputs, applies the
        correct feature values and iterates through the metafeature_fns,
        coordinating complex features.
        """
        input_names = self.metadata.inputs.keys()
        feature_values = dict(feature_values, **p.static_features)

        for feature, value in feature_values.items():
            setattr(p.pattern_generator, feature, value)

        if len(input_names) == 0:
            input_names = ['default']

        # Copy the given generator once for every input
        inputs = dict.fromkeys(input_names)
        for k in inputs.keys():
            inputs[k] = copy.deepcopy(p.pattern_generator)

        # Apply metafeature_fns
        for fn in p.metafeature_fns:
            fn(inputs, feature_values)

        return inputs

        Generates pattern generators for all the requested inputs, applies the
        correct feature values and iterates through the metafeature_fns,
        coordinating complex features.
        
Generates pattern generators for all the requested inputs, applies the
correct feature values and iterates through the metafeature_fns,
coordinating complex features.
Generates pattern generators for all the requested inputs applies the correct feature values and iterates through the metafeature_fns coordinating complex features .
def _coordinate_inputs(self, p, feature_values):
        input_names = self.metadata.inputs.keys()
        feature_values = dict(feature_values, **p.static_features)
        for feature, value in feature_values.items():
            setattr(p.pattern_generator, feature, value)
        if len(input_names) == 0:
            input_names = ['default']
        inputs = dict.fromkeys(input_names)
        for k in inputs.keys():
            inputs[k] = copy.deepcopy(p.pattern_generator)
        for fn in p.metafeature_fns:
            fn(inputs, feature_values)
        return inputs
def _coordinate_inputs ( self , p , feature_values ) : input_names = self . metadata . inputs . keys ( ) feature_values = dict ( feature_values , ** p . static_features ) for feature , value in feature_values . items ( ) : setattr ( p . pattern_generator , feature , value ) if len ( input_names ) == 0 : input_names = [ 'default' ] inputs = dict . fromkeys ( input_names ) for k in inputs . keys ( ) : inputs [ k ] = copy . deepcopy ( p . pattern_generator ) for fn in p . metafeature_fns : fn ( inputs , feature_values ) return inputs
Generates pattern generators for all the requested inputs, applies the
correct feature values and iterates through the metafeature_fns,
coordinating complex features.
Generates pattern generators for all the requested inputs applies the correct feature values and iterates through the metafeature_fns coordinating complex features .
"""
        Generates pattern generators for all the requested inputs, applies the
        correct feature values and iterates through the metafeature_fns,
        coordinating complex features.
        """ # Copy the given generator once for every input # Apply metafeature_fns
self
p
feature_values