Skip to content

Instantly share code, notes, and snippets.

@charliejllewellyn
Created October 10, 2018 12:43
Show Gist options
  • Save charliejllewellyn/48b3b1fe464a15c4ee2fd4224e98744b to your computer and use it in GitHub Desktop.
Save charliejllewellyn/48b3b1fe464a15c4ee2fd4224e98744b to your computer and use it in GitHub Desktop.
def create_entityjob(mediaUrl, Key, DataAccessRoleArn):
client = boto3.client('comprehend')
response = client.start_entities_detection_job(
InputDataConfig={
'S3Uri': mediaUrl,
'InputFormat': 'ONE_DOC_PER_FILE'
},
OutputDataConfig={
'S3Uri': output_bucket
},
DataAccessRoleArn=DataAccessRoleArn,
JobName='key_phrases' + Key[-59:],
LanguageCode='en',
ClientRequestToken='string'
)
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment