<commit_before>module Supertag
  class Usertag < ActiveRecord::Base
    self.table_name = "supertag_usertags"

    has_many :usertaggings

    validates :name, uniqueness: true

    # TODO Beef up the regex (ie.:what if content is HTML)
    # this is how Twitter does it:
    # https://github.com/twitter/twitter-text-rb/blob/master/lib/twitter-text/regex.rb
    USERTAG_REGEX = /(?:\s|^)(@(?!(?:\d+|\w+?_|_\w+?)(?:\s|$))([a-z0-9\-_]+))/i
<commit_msg>added belongs to for usertag<commit_after>module Supertag
  class Usertag < ActiveRecord::Base
    self.table_name = "supertag_usertags"

    has_many :usertaggings
    belongs_to :user

    validates :name, uniqueness: true

    # TODO Beef up the regex (ie.:what if content is HTML)
    # this is how Twitter does it:
    # https://github.com/twitter/twitter-text-rb/blob/master/lib/twitter-text/regex.rb
    USERTAG_REGEX = /(?:\s|^)(@(?!(?:\d+|\w+?_|_\w+?)(?:\s|$))([a-z0-9\-_]+))/i

{'fraction_non_alphanumeric': 0.18017057569296374, 'fraction_numerical': 0.0042643923240938165, 'mean_word_length': 3.536231884057971, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6576993', 'n_tokens_mistral': 364, 'n_tokens_neox': 346, 'n_words': 70}