<commit_before>//  Copyright (c) 2015 <NAME>. All rights reserved.

public struct AssumptionSet: DictionaryLiteralConvertible, Equatable, Printable, SequenceType {
	public subscript(variable: Int) -> [Type] {
		get { return assumptions[variable] ?? [] }
		set { assumptions[variable] = self[variable] + newValue }
	}


	public var count: Int {
		return assumptions.count
	}


	// MARK: DictionaryLiteralConvertible

	public init(dictionaryLiteral elements: (Int, [Type])...) {
		assumptions = [:] + elements
	}


	// MARK: Printable

	public var description: String {
		let s = lazy(assumptions)
			.map {
				let types = ", ".join(lazy($1).map(toString) |> sorted)
				return "\($0) ~ [ \(types) ]"
			}
			|> sorted
			|> (join <| "")
		return "{ \(s) }"
	}


	// MARK: SequenceType

	public func generate() -> GeneratorOf<(Int, [Type])> {
		return GeneratorOf(assumptions.generate())
	}


	// MARK: Private

	private var assumptions: [Int: [Type]]
}
<commit_msg>Empty AssumptionSets are described as {}.<commit_after>//  Copyright (c) 2015 <NAME>. All rights reserved.

public struct AssumptionSet: DictionaryLiteralConvertible, Equatable, Printable, SequenceType {
	public subscript(variable: Int) -> [Type] {
		get { return assumptions[variable] ?? [] }
		set { assumptions[variable] = self[variable] + newValue }
	}


	public var count: Int {
		return assumptions.count
	}


	// MARK: DictionaryLiteralConvertible

	public init(dictionaryLiteral elements: (Int, [Type])...) {
		assumptions = [:] + elements
	}


	// MARK: Printable

	public var description: String {
		let s = lazy(assumptions)
			.map {
				let types = ", ".join(lazy($1).map(toString) |> sorted)
				return "\($0) ~ [ \(types) ]"
			}
			|> sorted
			|> (join <| "")
		return assumptions.count > 0 ?
			"{ \(s) }"
		:	"{}"
	}


	// MARK: SequenceType

	public func generate() -> GeneratorOf<(Int, [Type])> {
		return GeneratorOf(assumptions.generate())
	}


	// MARK: Private

	private var assumptions: [Int: [Type]]
}

{'fraction_non_alphanumeric': 0.15897693079237712, 'fraction_numerical': 0.006519558676028084, 'mean_word_length': 3.5033860045146725, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, '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': '1179885', 'n_tokens_mistral': 738, 'n_tokens_neox': 629, 'n_words': 163}