<commit_before>// +build ignore

package main

import (
	"archive/tar"
	"bufio"
	"bytes"
	"compress/gzip"
	"errors"
	"flag"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"regexp"
	"strings"
	"unicode"

	"github.com/knq/snaker"
)

const (
	ncursesSrc = "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz"

	capsFile = "ncurses-6.0/include/Caps"
)

var (
	flagCache = flag.String("cache", ".cache", "cache directory")
	flagOut   = flag.String("out", "capvals.go", "out file")
)

var commentRE = regexp.MustCompile(`^#.*`)

func notSpace(r rune) bool {
	return !unicode.IsSpace(r)
}

func main() {
	flag.Parse()

	var err error

	// get archive
	buf, err := get(ncursesSrc)
	if err != nil {
		log.Fatal(err)
	}

	// load caps file<commit_msg>Minor update to gen.go<commit_after>// +build ignore

package main

import (
	"archive/tar"
	"bufio"
	"bytes"
	"compress/gzip"
	"errors"
	"flag"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"regexp"
	"strings"
	"unicode"

	"github.com/knq/snaker"
)

const (
	ncursesSrc = "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz"

	capsFile = "ncurses-6.1/include/Caps"
)

var (
	flagCache = flag.String("cache", ".cache", "cache directory")
	flagOut   = flag.String("out", "capvals.go", "out file")
)

var commentRE = regexp.MustCompile(`^#.*`)

func notSpace(r rune) bool {
	return !unicode.IsSpace(r)
}

func main() {
	flag.Parse()

	var err error

	// get archive
	buf, err := get(ncursesSrc)
	if err != nil {
		log.Fatal(err)
	}

	// load caps file
{'fraction_non_alphanumeric': 0.18722044728434506, 'fraction_numerical': 0.005111821086261981, 'mean_word_length': 3.487106017191977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7256549', 'n_tokens_mistral': 719, 'n_tokens_neox': 696, 'n_words': 136}