Linbo Jin
Linbo Jin
Jul 28, 2017 · 1 min read

Hi, thx for you blog, i have one question, subject_nouns may always be empty, because there are no intersection. How do you handle this case?

In another way, you already get top entities, why do you need to compute intersection with most_freq_nouns rather than just return top entities?

subject_nouns = [entity for entity in top_10_entities
if entity.split()[0] in most_freq_nouns]
    Linbo Jin

    Written by

    Linbo Jin