in comprehend_groundtruth_integration/src/comprehend_customer_scripts/GroundTruth/EntityRecognizer/groundtruth_to_comprehend_format_converter.py [0:0]
def get_labeling_job_name(self, index, jsonObj):
job_name = None
for key, value in jsonObj.items():
if self.is_json_serializable(value):
if ANNOTATIONS in value:
job_name = key
if job_name is None or ANNOTATIONS not in jsonObj[job_name].keys() or ENTITIES not in jsonObj[job_name][ANNOTATIONS].keys():
raise Exception(CANNOT_PARSE_AUGMENTED_MANIFEST.substitute(line=index,
file_name=self.groundtruth_manifest_file_name))
return job_name