def post(self): self.response.headers['Content-Type'] = 'text/html' template = JINJA_ENVIRONMENT.get_template('nlp.jinja') sentence = self.request.get('sentence') phrases = lapi.noun_phrases(sentence) self.response.write(template.render({'sentence':sentence,'phrases':phrases}))
def nouns(query): return lapi.noun_phrases(query)