def nlp_parse(text): """ pass the text to the stanford NLP core server and get the parsed data """ server = Server("http://localhost:8080") parsed_data = loads(server.parse(text)) return parsed_data
def nlp_parse_multi(split_article): """ Parse each sentence of the article separately. """ server = Server("http://localhost:8080") re = [] for sentence in split_article: result = loads(server.parse(sentence)) re.append(result) return re