<commit_before>package hoi

import (
	"encoding/json"
	"os"
)

type Config struct {
	Port string `json:"port"`
}

func Load(path string) Config {

	file, err := os.Open(path)
	if err != nil {
		return defaultConfig()
	}

	decoder := json.NewDecoder(file)
	conf := Config{}
	err = decoder.Decode(&conf)
	if err != nil {
		return defaultConfig()
	}
	return conf
}

func defaultConfig() Config {
	return Config{
		Port: "8080",
	}
}<commit_msg>Changed hoi server default port.<commit_after>package hoi

import (
	"encoding/json"
	"os"
)

type Config struct {
	Port string `json:"port"`
}

func Load(path string) Config {

	file, err := os.Open(path)
	if err != nil {
		return defaultConfig()
	}

	decoder := json.NewDecoder(file)
	conf := Config{}
	err = decoder.Decode(&conf)
	if err != nil {
		return defaultConfig()
	}
	return conf
}

func defaultConfig() Config {
	return Config{
		Port: "8081",
	}
}
{'fraction_non_alphanumeric': 0.14095449500554938, 'fraction_numerical': 0.008879023307436182, 'mean_word_length': 3.797872340425532, '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': '1000507', 'n_tokens_mistral': 342, 'n_tokens_neox': 321, 'n_words': 90}