[erlang-questions] digraph questions

Hugo Mills hugo@REDACTED
Tue Apr 9 10:43:06 CEST 2019


On Mon, Apr 08, 2019 at 07:28:49PM -0400, lloyd@REDACTED wrote:
> 
> The Erlang digraph library looks like it may provide an interesting way to diagram scenes in a novel.
>  
> 1> Scene10 = digraph:new().
>  
> Imagine:
>  
> Setting:"park"
> Character1:"Franco"
> Character2:"Sophia"
>  
> 2> digraph:add_vertex(Scene10, "Park", "Night").
> 3> digraph:add_vertex(Scene10, "Franco", "Old and fat").
> 4> digraph:add_vertex(Scene10, "Sophia", "Young and beautiful").
> 5> digraph:add_edge(Scene10, "Franco", "Sophia", "loves").

   Congratulations, you just invented a subset of RDF. :)

   Also, I fear that contextus.net has now vanished, but there were a
bunch of people at Southampton University about 10 years ago
(including me) who were working on narrative descriptions in RDF.

   It gets more complicated when you have to deal with temporal
descriptions (X loved Y until X discovered that Y was having an affair
with Z), and different narrative timelines (the audience's experience
of the timeline of Pulp Fiction is very different to that of the
characters; CSI usually shows multiple inconsistent views of the crime
over the course of an episode). You can also start modelling different
characters' beliefs (see, for example, the end of Romeo and Juliet,
where the plot hinges critically on what people think they know).

   I'm not sure if I've got any of the ontologies any more, but I can
ask around the group and see if it's on someone's hard disk still...

   Hugo.

> OK to here EXCEPT command 5 returns:
>  
> ['$e'|0]
>  
> 6> digraph:add_edge(Scene10, "Sophia", "Franco", "hates").
>  
> OK to here EXCEPT command 5 returns:
>  
> ['$e'|0]
>  
> 6> digraph:add_edge(Scene10, "Sophia", "Franco", "hates").
> ['$e'|1]
>  
> Wah!
>  
> Question 1: How do I see labels?
>  
> Question 2: Be cool to add a sequence of actions. I can probably figure this out, but is there an elegant solution?
>  
> Question 3: I'd love to visualize the graph. I see it can be done in Elixir. But I don't know Elixir. Has anyone programmed a way to visualize digraphs in Erlang?
>  
> Comment: Digraph is crying out for a comprehensive tutorial. I'd love to do it, but just don't know enough yet.

-- 
Hugo Mills             | Books are superior to radio: the soundtrack is
hugo@REDACTED carfax.org.uk | better
http://carfax.org.uk/  |
PGP: E2AB1DE4          |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190409/091154b0/attachment.bin>


More information about the erlang-questions mailing list