必备!人工智能和数据科学的七大 Python 库(21)

u"seriously. “I can tell you very senior CEOs of major American "

u"car companies would shake my hand and turn away because I wasn’t "

u"worth talking to,” said Thrun, now the co-founder and CEO of "

u"online higher education startup Udacity, in an interview with "

u"Recode earlier this week.")

doc = nlp(text)

# Find named entities, phrases and concepts

forentityindoc.ents:

print(entity.text, entity.label_)

# Determine semantic similarities

doc1 = nlp(u"my fries were super gross")

doc2 = nlp(u"such disgusting fries")

similarity = doc1.similarity(doc2)

推荐阅读