Prompt Resource

Find and mind-map concepts in texts

 

Examples

Here is a diagram derivation (mind-map) for a certain cat joke:

In[1]:=
txt = "A policeman in the big city stops a man in a car with a Siberian Lynx in the front seat. \[OpenCurlyDoubleQuote]What are you doing with that Siberian Lynx?\[CloseCurlyDoubleQuote] He exclaimed, \[OpenCurlyDoubleQuote]You should take it to the zoo.\[CloseCurlyDoubleQuote] The following week, the same policeman sees the same man with the cat again in the front seat, with both of them wearing sunglasses. The policeman pulls him over. \[OpenCurlyDoubleQuote]I thought you were going to take that cat to the zoo!\[CloseCurlyDoubleQuote] The man replied, \[OpenCurlyDoubleQuote]I did. We had such a good time we are going to the beach this weekend!\[CloseCurlyDoubleQuote]";
LLMResourceFunction["MindMapper"][txt]
Out[2]=

Here is a plot corresponding to the obtained Mermaid-JS spec (some tweaking was applied):

In[3]:=
ResourceFunction["MermaidInk"][%]
Out[3]=

Scope (2) 

The second argument can be used to specify the type of diagram:

In[4]:=
gr = LLMResourceFunction["MindMapper"][
  ExampleData[{"Text", "Hamlet"}], "characters relationships mind-map"]
Out[4]=

Here is the corresponding plot:

In[5]:=
ResourceFunction["MermaidInk"][gr]
Out[5]=

Here with the third argument we invoke the generation of a more detailed diagram:

In[6]:=
gr2 = LLMResourceFunction["MindMapper"][txt, "mind-map", "between the relationships of the concepts in"]
Out[6]=
In[7]:=
ResourceFunction["MermaidInk"][gr2]
Out[7]=

Different models produce fairly different outcomes.

Source Metadata

See Also

  • AntonAntonov/MermaidJS
  • MermaidInk

Publisher Information