<commit_before>package pman.bg.media;

import tannus.io.*;
import tannus.ds.*;
import tannus.sys.*;
import tannus.async.*;
import tannus.async.promises.*;
import tannus.sys.Path;
import tannus.http.Url;
import tannus.sys.FileSystem as Fs;

import Slambda.fn;
import edis.Globals.*;

using StringTools;
using tannus.ds.StringUtils;
using Slambda;
using tannus.ds.ArrayTools;
using tannus.FunctionTools;
using tannus.async.Asyncs;
using pman.bg.MediaTools;

class Tag {
    public inline function new(row: TagRow) {

    }

    public var name: String;
}<commit_msg>finished the pman.bg.media.Tag class<commit_after>package pman.bg.media;

import tannus.io.*;
import tannus.ds.*;
import tannus.sys.*;
import tannus.async.*;
import tannus.async.promises.*;
import tannus.sys.Path;
import tannus.http.Url;
import tannus.sys.FileSystem as Fs;

import Slambda.fn;
import edis.Globals.*;

using StringTools;
using tannus.ds.StringUtils;
using Slambda;
using tannus.ds.ArrayTools;
using tannus.FunctionTools;
using tannus.async.Asyncs;
using pman.bg.MediaTools;

class Tag implements tannus.ds.IComparable<Tag> {
    /* Constructor Function */
    public inline function new(row: TagRow) {
        this.name = row.name;
        this.id = row._id;
    }

/* === Instance Methods === */

    /**
      * convert [this] to a TagRow
      */
    public function toRow():TagRow {
        var row:TagRow = {
            name: name.trim()
        };
        if (id != null) {
            row._id = id;
        }
        return row;
    }

    /**
      * create and return a deep-copy of [this]
      */
    public inline function clone():Tag {
        return new Tag(toRow());
    }

    /**
      * compare [this] to [other]
      */
    public function compareTo(other: Tag):Int {
        return Reflect.compare(name, other.name);
    }

/* === Instance FIelds === */

    public var id: Null<String>;
    public var name: String;
}
{'fraction_non_alphanumeric': 0.13020833333333334, 'fraction_numerical': 0.0, 'mean_word_length': 2.7964426877470356, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4087552', 'n_tokens_mistral': 659, 'n_tokens_neox': 654, 'n_words': 161}