@@ -0,0 +1,1566 @@
+package network.aika.text;%0A%0Aimport network.aika.neuron.activation.Activation;%0Aimport network.aika.neuron.activation.Link;%0Aimport network.aika.neuron.activation.QueueEntry;%0Aimport org.graphstream.graph.Edge;%0Aimport org.graphstream.graph.Graph;%0Aimport org.graphstream.graph.Node;%0Aimport org.graphstream.graph.implementations.SingleGraph;%0A%0Apublic class VisualizedDocument extends Document %7B%0A%0A    public Graph getGraph() %7B%0A        return graph;%0A    %7D%0A%0A    public void setGraph(Graph graph) %7B%0A        this.graph = graph;%0A    %7D%0A%0A    private Graph graph;%0A%0A    public VisualizedDocument(String content) %7B%0A        super(content);%0A        graph = new SingleGraph(%220%22);%0A    %7D%0A%0A    @Override%0A    protected void processEntry(QueueEntry queueEntry) %7B%0A        queueEntry.process();%0A        if (queueEntry instanceof Link) %7B%0A            Link link = (Link) queueEntry;%0A            String inputId = %22%22 + link.getInput().getId();%0A            String outputId = %22%22 + link.getOutput().getId();%0A            String edgeId = inputId + %22-%22 + outputId;%0A            Edge edge = graph.getEdge(edgeId);%0A            if (edge == null) %7B%0A                edge = graph.addEdge(edgeId, inputId, outputId);%0A            %7D%0A%0A        %7D else if (queueEntry instanceof Activation) %7B%0A            Activation activation = (Activation) queueEntry;%0A            String id = %22%22 + activation.getId();%0A            Node node = graph.getNode(id);%0A%0A            if (node == null) %7B%0A                node = graph.addNode(id);%0A            %7D%0A            node.setAttribute(%22ui.label%22, activation.getLabel());%0A        %7D%0A    %7D%0A%7D%0A

add graphstream and initial test