<commit_before>package main

import (
  "bufio"
  "path/filepath"
  "fmt"
  "os"
  "crypto/rand"
  "math/big"
  "unicode"
  "unicode/utf8"
  "flag"
)

func main() {
  var dict        string = "/usr/share/dict/"
  var words       []string
  var err         error
  var dictLength  *big.Int

  lang, pplen, wordMaxLen := setFlags()
  langPath := dict + *lang

  if len(*lang) == 0 {
    usage(dict)
    os.Exit(1)
  }

  _, err = os.Stat(langPath)
  if os.IsNotExist(err) {
    fmt.Printf("Language \"%s\" is not installed\n\n", *lang)
    usage(dict)
    os.Exit(1)
  }

  words = readLines(langPath, *wordMaxLen)
  fmt.Printf("  - %d\n", *pplen)
  fmt.Printf("  - %d\n", len(words))
  fmt.Printf("  - %d\n", *wordMaxLen)

  dictLength = big.NewInt(int64(len(words)))
  for i := 0; i < *pplen; i++ {
    var index *big.Int
    index, err = rand.Int(rand.Reader, dictLength)
    word := []byte(words[index.Uint64()])
    fmt.Printf("%s", upperFirst(toUtf8(word)))
  }
  fmt.Println("")
}

func setFlags() (*string, *int, *int){<commit_msg>Cleaning it up a bit<commit_after>package main

import (
  "bufio"
  "path/filepath"
  "fmt"
  "os"
  "crypto/rand"
  "math/big"
  "unicode"
  "unicode/utf8"
  "flag"
)

func main() {
  var dicts       string = "/usr/share/dict/"
  var err         error

  lang, pplen, wordMaxLen := setFlags()
  langPath := dicts + *lang

  if len(*lang) == 0 {
    usage(dicts)
    os.Exit(1)
  }

  _, err = os.Stat(langPath)
  if os.IsNotExist(err) {
    fmt.Printf("Language \"%s\" is not installed\n\n", *lang)
    usage(dicts)
    os.Exit(1)
  }

  words := readLines(langPath, *wordMaxLen)
  fmt.Printf("  - %d\n", *pplen)
  fmt.Printf("  - %d\n", len(words))
  fmt.Printf("  - %d\n", *wordMaxLen)

  dictLength := big.NewInt(int64(len(words)))
  for i := 0; i < *pplen; i++ {
    var index *big.Int
    index, err = rand.Int(rand.Reader, dictLength)
    word := []byte(words[index.Uint64()])
    fmt.Printf("%s", upperFirst(toUtf8(word)))
  }
  fmt.Println("")
}

func setFlags() (*string, *int, *int){
{'fraction_non_alphanumeric': 0.1889763779527559, 'fraction_numerical': 0.00984251968503937, 'mean_word_length': 2.8358490566037737, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3340611', 'n_tokens_mistral': 851, 'n_tokens_neox': 834, 'n_words': 173}