def run(key, altUrl='https://api.rosette.com/rest/v1/'): syntax_dependencies_data = "Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday." params = DocumentParameters() params["content"] = syntax_dependencies_data params["genre"] = "social-media" # Create an API instance api = API(user_key=key, service_url=altUrl) return api.syntax_dependencies(params)
def run(key, alt_url='https://api.rosette.com/rest/v1/'): """ Run the example """ syntax_dependencies_data = "Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday." params = DocumentParameters() params["content"] = syntax_dependencies_data # Create an API instance api = API(user_key=key, service_url=alt_url) try: return api.syntax_dependencies(params) except RosetteException as exception: print(exception)