<commit_before>package main

import (
	"flag"
	"log"
	"net/http"
	"os"

	"github.com/apg/heproxy"
)

var (
	listen = flag.String("listen", ":9999", "address:port to listen on")
	help   = flag.Bool("help", false, "this help message")
)

func main() {
	flag.Parse()
	if *help {
		flag.PrintDefaults()
		os.Exit(0)
	}

	ruleSets := heproxy.ReadRuleSets("./rulesets")
	rewriter := heproxy.NewLinearRewriter(ruleSets)
	proxy := heproxy.NewHEProxy(rewriter)
	log.Fatal(http.ListenAndServe(*listen, proxy))
}<commit_msg>In lieu of a proper installation, just GOPATH find rulesets.<commit_after>package main

import (
	"flag"
	"log"
	"net/http"
	"os"
	"path"

	"github.com/apg/heproxy"
)

var (
	listen = flag.String("listen", ":9999", "address:port to listen on")
	help   = flag.Bool("help", false, "this help message")
)

func main() {
	flag.Parse()
	if *help {
		flag.PrintDefaults()
		os.Exit(0)
	}

	ruleSets := heproxy.ReadRuleSets(path.Join(
		os.Getenv("GOPATH"), "src", "github.com", "apg", "heproxy", "cmd", "heproxy", "rulesets"))
	rewriter := heproxy.NewLinearRewriter(ruleSets)
	proxy := heproxy.NewHEProxy(rewriter)
	log.Fatal(http.ListenAndServe(*listen, proxy))
}
{'fraction_non_alphanumeric': 0.17591801878736124, 'fraction_numerical': 0.008539709649871904, 'mean_word_length': 4.745098039215686, 'pattern_counts': {'":': 2, '<': 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': '3262645', 'n_tokens_mistral': 472, 'n_tokens_neox': 448, 'n_words': 92}