merge_machine/api.py
def update_targets_labeller(project_id):
    '''
    Update filters for a labeller and receive the updated labeller state. 
    
    GET:
        project_id: ID for "link" project
    
    POST:
        module_params:
            target_precision: value between 0 and 1 representing the minimal 
                acceptable value for precision (results with lower values will
                be strongly penalised)
            target_recall:value between 0 and 1 representing the minimal 
                acceptable value for recall (results with lower values will
                be strongly penalised)
    '''
    _, module_params = _parse_request()
    
    logging.info('update_musts got:', module_params)
    t_p = module_params['target_precision']    
    t_r = module_params['target_recall'] 
    
    proj = ESLinker(project_id=project_id)
    labeller = proj.labeller_from_json()
    
    labeller.update_targets(t_p, t_r)
    
    proj.labeller_to_json(labeller)
    
    encoder = MyEncoder()
    return jsonify(error=False,
                   result=encoder.encode(labeller.to_emit()))

    Update filters for a labeller and receive the updated labeller state. 
    
    GET:
        project_id: ID for "link" project
    
    POST:
        module_params:
            target_precision: value between 0 and 1 representing the minimal 
                acceptable value for precision (results with lower values will
                be strongly penalised)
            target_recall:value between 0 and 1 representing the minimal 
                acceptable value for recall (results with lower values will
                be strongly penalised)
    
Update filters for a labeller and receive the updated labeller state.
GET:
project_id: ID for "link" project

value between 0 and 1 representing the minimal
acceptable value for precision (results with lower values will
be strongly penalised)
target_recall:value between 0 and 1 representing the minimal
acceptable value for recall (results with lower values will
be strongly penalised)
Update filters for a labeller and receive the updated labeller state . GET : project_id : ID for " link " project value between 0 and 1 representing the minimal acceptable value for precision ( results with lower values will be strongly penalised ) target_recall : value between 0 and 1 representing the minimal acceptable value for recall ( results with lower values will be strongly penalised )
def update_targets_labeller(project_id):
    _, module_params = _parse_request()
    logging.info('update_musts got:', module_params)
    t_p = module_params['target_precision']    
    t_r = module_params['target_recall'] 
    proj = ESLinker(project_id=project_id)
    labeller = proj.labeller_from_json()
    labeller.update_targets(t_p, t_r)
    proj.labeller_to_json(labeller)
    encoder = MyEncoder()
    return jsonify(error=False,
                   result=encoder.encode(labeller.to_emit()))
def update_targets_labeller ( project_id ) : _ , module_params = _parse_request ( ) logging . info ( 'update_musts got:' , module_params ) t_p = module_params [ 'target_precision' ] t_r = module_params [ 'target_recall' ] proj = ESLinker ( project_id = project_id ) labeller = proj . labeller_from_json ( ) labeller . update_targets ( t_p , t_r ) proj . labeller_to_json ( labeller ) encoder = MyEncoder ( ) return jsonify ( error = False , result = encoder . encode ( labeller . to_emit ( ) ) )
Update filters for a labeller and receive the updated labeller state.
Update filters for a labeller and receive the updated labeller state .
'''
    Update filters for a labeller and receive the updated labeller state. 
    
    GET:
        project_id: ID for "link" project
    
    POST:
        module_params:
            target_precision: value between 0 and 1 representing the minimal 
                acceptable value for precision (results with lower values will
                be strongly penalised)
            target_recall:value between 0 and 1 representing the minimal 
                acceptable value for recall (results with lower values will
                be strongly penalised)
    '''
project_id