Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a graph representing the interactions among characters in a story
ResourceFunction["CharacterInteractionGraph"][story] returns an undirected graph representing the interactions among characters in a story. |
Create a character interaction graph for the novel 'Dracula':
In[1]:= |
Out[1]= |
Create a character interaction graph for a recent film that might not be in the training data of the LLM using WikipediaData:
In[2]:= |
In[3]:= |
Out[3]= |
Change the base style and edge style of the graph:
In[4]:= |
Out[4]= |
Compare graphs generated using different LLMs (gpt-3.5-turbo - vs - gpt-4):
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
Generate a different graph by modifying the sampling temperature:
In[7]:= |
Out[7]= |
Create a graph for a random "Movie" entity:
In[8]:= |
Out[8]= |
In[9]:= |
Out[9]= |
Create a CommunityGraphPlot directly from CharacterInteractionGraph:
In[10]:= |
Out[10]= |
Some "Movie" entities have information about the list of characters (roles):
In[11]:= |
Out[11]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License