<commit_before>// This is Free Software covered by the terms of the MIT license.
// See LICENSE file for details.
// (c) 2016 by <NAME>.
// See the full list of contributors in the CONTRIBUTORS file.

package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strings"
	"text/template"
)

var types = []string{
	"int", "int8", "int16", "int32", "int64",
	"uint", "uint8", "uint16", "uint32", "uint64",
}

var headerTmplTxt = `// THIS IS A MACHINE GENERATED FILE!
// BE CAREFUL WITH EDITING BY HAND.
//
// This is Free Software covered by the terms of the MIT license.
// See LICENSE file for details.
// (c) 2016 by <NAME>.
// See the full list of contributors in the CONTRIBUTORS file.

package genmap
`

var mapTmplTxt = `
{{ $F := .From | title -}}
{{- $T := .To | title -}}
{{- $TYPE :=  printf "Map%sTo%s" $F $T -}}
{{- $ENTRY :=  printf "entry%sTo%s" $F $T -}}

type {{ $ENTRY }} struct {
	k    {{.From }}
	v    {{ .To }}
	next *{{ $ENTRY }}
}

// {{ $TYPE }} implements a hash map from {{ .From }} to {{ .To }}.
type {{ $TYPE }} struct {
	mask     int<commit_msg>Small whitespace fix.<commit_after>// This is Free Software covered by the terms of the MIT license.
// See LICENSE file for details.
// (c) 2016 by <NAME>.
// See the full list of contributors in the CONTRIBUTORS file.

package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strings"
	"text/template"
)

var types = []string{
	"int", "int8", "int16", "int32", "int64",
	"uint", "uint8", "uint16", "uint32", "uint64",
}

var headerTmplTxt = `// THIS IS A MACHINE GENERATED FILE!
// BE CAREFUL WITH EDITING BY HAND.
//
// This is Free Software covered by the terms of the MIT license.
// See LICENSE file for details.
// (c) 2016 by <NAME>.
// See the full list of contributors in the CONTRIBUTORS file.

package genmap
`

var mapTmplTxt = `
{{ $F := .From | title -}}
{{- $T := .To | title -}}
{{- $TYPE :=  printf "Map%sTo%s" $F $T -}}
{{- $ENTRY :=  printf "entry%sTo%s" $F $T -}}

type {{ $ENTRY }} struct {
	k    {{ .From }}
	v    {{ .To }}
	next *{{ $ENTRY }}
}

// {{ $TYPE }} implements a hash map from {{ .From }} to {{ .To }}.
type {{ $TYPE }} struct {
	mask     int
{'fraction_non_alphanumeric': 0.18373071528751753, 'fraction_numerical': 0.020570359981299673, 'mean_word_length': 2.8979963570127505, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4972004', 'n_tokens_mistral': 816, 'n_tokens_neox': 769, 'n_words': 285}