An entity is a recognized semantic item in language or structured knowledge: a place, time expression, person, drug, crop type, organization, or other named thing. Its role depends on the system: knowledge graphs identify entities as nodes in factual triples, while chatbots extract them as information carried by a user request. section 11.8.1 section 12.2.1
Entity handling commonly involves:
- Naming entities precisely and consistently, using normalized spellings that can function like database field names or Python variable names. section 11.8.1
- Representing a knowledge-graph entity in a triple that states one isolated fact about it, such as an entity, relation, and value. section 11.8.1
- Extracting entities from utterances so a chatbot can use locations, times, durations, distances, or domain-specific items as request parameters. section 12.2.1
- Distinguishing detected entities from slots: the system may recognize an item such as a person without needing it to execute the requested action. section 12.2.1
Weather request
In “What’s the weather in Paris?” Paris is an entity that supplies the location parameter. In “I’m going to Paris with John this Monday,” Paris and Monday may matter to the forecast, while John can be recognized but ignored because it is not required. section 12.2.1
>>> df = simplify_names(df) #1
>>> df[df.columns[[0, 1, 2, 4]]].head()
entity relation value prob
0 aspect_medical_systems is_a biotechcompany 0.924
1 limited_brands ceo leslie_wexner 0.938
2 limited_brands is_a retailstore 0.990
3 limited_brands is_a company 1.000
4 calavo_growers is_a biotechcompany 0.983
Inspect normalized knowledge-graph entities such as aspect_medical_systems and limited_brands, alongside their relations and values. section 11.8.1
>>> text = 'Ruslan Borisov and Vlad Snisar rebuilt ConvoHub.'
>>> context_diff = extract_proper_nouns(context=dict(user_text=text))
>>> context_diff
{'proper_nouns': ['Ruslan Borisov', 'Vlad Snisar', 'ConvoHub']}
Run proper-noun extraction on an utterance to obtain entities such as Ruslan Borisov, Vlad Snisar, and ConvoHub. section 12.2.1











