def makeResult(targetEntity, targetEntityType, responseAndSentence):
    """Evaluates each provider's reponse to an NER call by checking whether the target named entity and its type were correctly annotated by the provider.

    Arguments:
        targetEntity {String} -- The ground-truth named entity
        targetEntityType {String} -- The ground-truth named entity type
        responseAndSentence {Dictionary} -- The NLP provider's reponse and the sentence that was tested

    Returns:
        Dictionary -- The results of the evaluation, including whether a provider recognized the named entity, its type, or both
    """
    
    print("... making results ...")
    result = {
        "testSentence": responseAndSentence['sentence_data'],
        "providerResults": [],
        "failed": False
    }
    for provider, providerResponse in responseAndSentence['response']['values'].items():
        providerResults = []
        # did not recognize any Entities
        if len(providerResponse['entities']) == 0 and responseAndSentence['response']['errors'][provider] == "":
            providerResults.append({
                "didRecognizeEntity": False,
                "didRecognizeEntityType": False,
                "didRecognizeBoth": False,
                "recognizedZeroEntities": True,
                "providerReponse": providerResponse})
        elif len(providerResponse['entities']) == 0 and responseAndSentence['response']['errors'][provider] != "":  # error
            providerResults.append({
                "didRecognizeEntity": False,
                "didRecognizeEntityType": False,
                "didRecognizeBoth": False,
                "recognizedZeroEntities": True,
                "providerReponse": providerResponse})
            result["failed"] = True  # mark this test as failed

        else:
            didRecognizeEntity = False
            didrecognizeEntityType = False

            for recognizedEntity in providerResponse['entities']:
                # e.g. 'Dimitri Staufer' and 'Event'
                if (recognizedEntity['entity'] == targetEntity) and (recognizedEntity['type'] != targetEntityType):
                    didRecognizeEntity = True
                # e.g. 'Dimitri Staufer' and 'Person'
                elif (recognizedEntity['entity'] == targetEntity) and (recognizedEntity['type'] == targetEntityType):
                    didRecognizeEntity = True
                    didrecognizeEntityType = True

            providerResults.append({
                "didRecognizeEntity": didRecognizeEntity,
                "didRecognizeEntityType": didrecognizeEntityType,
                "didRecognizeBoth": (didRecognizeEntity and didrecognizeEntityType),
                "recognizedZeroEntities": False,
                "providerReponse": providerResponse
            })

        result['providerResults'].append({
            provider: providerResults
        })

    return result