<commit_before>class PalmInformation < ApplicationRecord
  belongs_to :user

  validates :feeling_length,   numericality: { only_integer: true }, allow_nil: true
  validates :feeling_slope,    numericality: { only_integer: true }, allow_nil: true
  validates :knowledge_length, numericality: { only_integer: true }, allow_nil: true
  validates :knowledge_slope,  numericality: { only_integer: true }, allow_nil: true
  validates :fate_slope,       numericality: { only_integer: true }, allow_nil: true

  enum status: [:unread, :read, :reread]

  private

  def picture_size
    if picture.size > 5.megabytes
      errors.add(:picture, "should be less than 5MB")
    end
  end
end<commit_msg>Add enum, feeling_length, feeling_slopek, knowledge_length, knowledge_slope, fate_slope<commit_after>class PalmInformation < ApplicationRecord
  belongs_to :user

  validates :feeling_length,   numericality: { only_integer: true }, allow_nil: true
  validates :feeling_slope,    numericality: { only_integer: true }, allow_nil: true
  validates :knowledge_length, numericality: { only_integer: true }, allow_nil: true
  validates :knowledge_slope,  numericality: { only_integer: true }, allow_nil: true
  validates :fate_slope,       numericality: { only_integer: true }, allow_nil: true

  enum status:           [:unread, :read, :reread]
  enum feeling_length:   [:feeling_length_short, :feeling_length_normal, :feeling_length_long]
  enum feeling_slope:    [:feeling_slope_middle, :feeling_slope_center, :feeling_slope_index]
  enum knowledge_length: [:knowledge_length_short, :knowledge_length_normal, :knowledge_length_long]
  enum knowledge_slope:  [:knowledge_slope_straight, :knowledge_slope_center, :knowledge_slope_down]
  enum fate_slope:       [:fate_slope_left, :fate_slope_center, :fate_right]

  private

  def picture_size
    if picture.size > 5.megabytes
      errors.add(:picture, "should be less than 5MB")
    end
  end
end
{'fraction_non_alphanumeric': 0.08832644628099173, 'fraction_numerical': 0.002066115702479339, 'mean_word_length': 5.208333333333333, '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': '7294979', 'n_tokens_mistral': 647, 'n_tokens_neox': 625, 'n_words': 150}