<commit_before>﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace XidNet
{
	/// <summary>
	/// Represents a statistcally unique value, similar to a <see cref="System.Guid"/> but only 15 bytes in it's raw form and 20 bytes when encoded as a string.
	/// </summary>
	/// <remarks>
	/// <para>Xid is using Mongo Object ID algorithm to generate globally unique ids with a different serialization (base64) to make it shorter when transported as a string: https://docs.mongodb.org/manual/reference/object-id/</para>
	/// <list type="Bullet">
	/// <item>4-byte value representing the seconds since the Unix epoch.</item>
	/// <item>3-byte machine identifier.</item>
	/// <item>2-byte process id.</item>
	/// <item>3-byte counter, starting with a random value.</item>
	/// </list>
	/// <para>
	/// The binary representation of the id is compatible with Mongo 12 bytes Object IDs. The string representation is using base32 hex (w/o padding) for better space efficiency when stored in that form (20 bytes). The hex variant of base32 is used to retain the sortable property of the id.
	/// </para>
	/// <para>
	/// Xid doesn't use base64 because case sensitivity and the 2 non alphanum chars may be an issue when transported as a string between various systems. Base36 wasn't retained either because 1/ it's not standard 2/ the resulting size is not predictable (not bit aligned) and 3/ it would not remain sortable. To validate a base32 xid, expect a 20 chars long, all lowercase sequence of a to v letters and 0 to 9 numbers ([0-9a-v]{20}).
	/// </para>
	/// <para>
	/// No configuration or central generator server is required so it can be used directly in server's code.
	/// </para>
	/// <para>Xid's are also k-sortable.</para><commit_msg>Add comments/links to repo at top of Xid.cs.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

// Ported from https://github.com/rs/xid
// Original license; https://github.com/rs/xid/blob/master/LICENSE
// Xid.Net Latest code/license; https://github.com/Yortw/Xid.Net

namespace XidNet
{
	/// <summary>
	/// Represents a statistcally unique value, similar to a <see cref="System.Guid"/> but only 15 bytes in it's raw form and 20 bytes when encoded as a string.
	/// </summary>
	/// <remarks>
	/// <para>Xid is using Mongo Object ID algorithm to generate globally unique ids with a different serialization (base64) to make it shorter when transported as a string: https://docs.mongodb.org/manual/reference/object-id/</para>
	/// <list type="Bullet">
	/// <item>4-byte value representing the seconds since the Unix epoch.</item>
	/// <item>3-byte machine identifier.</item>
	/// <item>2-byte process id.</item>
	/// <item>3-byte counter, starting with a random value.</item>
	/// </list>
	/// <para>
	/// The binary representation of the id is compatible with Mongo 12 bytes Object IDs. The string representation is using base32 hex (w/o padding) for better space efficiency when stored in that form (20 bytes). The hex variant of base32 is used to retain the sortable property of the id.
	/// </para>
	/// <para>
	/// Xid doesn't use base64 because case sensitivity and the 2 non alphanum chars may be an issue when transported as a string between various systems. Base36 wasn't retained either because 1/ it's not standard 2/ the resulting size is not predictable (not bit aligned) and 3/ it would not remain sortable. To validate a base32 xid, expect a 20 chars long, all lowercase sequence of a to v letters and 0 to 9 numbers ([0-9a-v]{20}).
	/// </para>
	/// <para>
	/// No configuration or central generator server is required so it can be used directly in server's code.
	/// </para>
	/// <para>Xid's are also k-sortable.</para>
{'fraction_non_alphanumeric': 0.11660026560424967, 'fraction_numerical': 0.019123505976095617, 'mean_word_length': 3.4410377358490565, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 5, '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': '4515136', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1052, 'n_words': 500}