Created
March 31, 2021 15:21
-
-
Save NesrineSF/575165fc9c3bf14d9532bd5a1ccb25f3 to your computer and use it in GitHub Desktop.
request of the API for both sentences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#first sentence | |
object_noun = "The object of this exercise is to raise money for the charity." | |
#second sentence | |
object_verb = "A lot of people will object to the book." | |
language = 'en' | |
#Request to the API for the first sentence | |
output = client.specific_resource_analysis( | |
body={"document": {"text": object_noun}}, | |
params={'language': language, 'resource': 'disambiguation' | |
}) | |
#Request to the API for the second sentence | |
output_2 = client.specific_resource_analysis( | |
body={"document": {"text": object_verb}}, | |
params={'language': language, 'resource': 'disambiguation' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment