<commit_before>namespace System.Text

type StringBuilder(value: string, capacity: int) =
    let buf = ResizeArray<string>(capacity)
    do if not (System.String.IsNullOrEmpty value) then buf.Add(value)
    new (capacity: int) = StringBuilder("", capacity)
    new (value: string) = StringBuilder(value, 16)
    new () = StringBuilder("", 16)
    member x.Append(s: string) = buf.Add(s); x
    member x.Append(c: char) = buf.Add(string c); x
    member x.AppendFormat(fmt: string, o: obj) = buf.Add(System.String.Format(fmt, o)); x
    member x.AppendLine() = buf.Add(System.Environment.NewLine); x
    member x.AppendLine(s: string) = buf.Add(s); buf.Add(System.Environment.NewLine); x
    override __.ToString() = System.String.Concat(buf)
    member x.Length = buf |> Seq.sumBy String.length
    member x.ToString(firstIndex: int, length: int) =
        let str = x.ToString()
        str.Substring(firstIndex, length)
    member x.Clear() =
        buf.Clear()
        x<commit_msg>+ Overload for StringBuilder.Append(SringBuilder)<commit_after>namespace System.Text

type StringBuilder(value: string, capacity: int) =
    let buf = ResizeArray<string>(capacity)
    do if not (System.String.IsNullOrEmpty value) then buf.Add(value)
    new (capacity: int) = StringBuilder("", capacity)
    new (value: string) = StringBuilder(value, 16)
    new () = StringBuilder("", 16)
    member x.Append(s: string) = buf.Add(s); x
    member x.Append(c: char) = buf.Add(string c); x
    member x.Append(s: StringBuilder) = buf.Add(s.ToString()); x
    member x.AppendFormat(fmt: string, o: obj) = buf.Add(System.String.Format(fmt, o)); x
    member x.AppendLine() = buf.Add(System.Environment.NewLine); x
    member x.AppendLine(s: string) = buf.Add(s); buf.Add(System.Environment.NewLine); x
    override __.ToString() = System.String.Concat(buf)
    member x.Length = buf |> Seq.sumBy String.length
    member x.ToString(firstIndex: int, length: int) =
        let str = x.ToString()
        str.Substring(firstIndex, length)
    member x.Clear() =
        buf.Clear()
        x
{'fraction_non_alphanumeric': 0.1437530149541727, 'fraction_numerical': 0.003859141341051616, 'mean_word_length': 3.5682819383259914, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6697537', 'n_tokens_mistral': 667, 'n_tokens_neox': 659, 'n_words': 169}