<commit_before>package graph

type WalkData struct {
	Node       Node
	Connectors []Connector

	done chan struct{}
}

func NewWalkData(n Node, c []Connector, d chan struct{}) WalkData {
	return WalkData{Node: n, Connectors: c, done: d}
}

func (wd WalkData) Close() {
	close(wd.done)
}<commit_msg>supply the connector names and the parent node in the walk data<commit_after>package graph

type WalkData struct {
	Node    Node
	Parents []Parent

	done chan struct{}
}

type Parent struct {
	From string
	To   string
	Node Node
}

func NewWalkData(n Node, conns []Connector, d chan struct{}) WalkData {
	parents := []Parent{}
	for _, c := range conns {
		if t, o := c.Target(); t != nil {
			parents = append(parents,
				Parent{From: o.Name(), To: c.Name(), Node: t.Node()})
		}
	}
	return WalkData{Node: n, Parents: parents, done: d}
}

func (wd WalkData) Close() {
	close(wd.done)
}
{'fraction_non_alphanumeric': 0.1291053227633069, 'fraction_numerical': 0.0, 'mean_word_length': 3.857142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '563700', 'n_tokens_mistral': 316, 'n_tokens_neox': 302, 'n_words': 106}