<commit_before>class Annotation < ActiveRecord::Base
  belongs_to :paper
  belongs_to :user

  has_many :responses, :class_name => "Annotation", :foreign_key => "parent_id"
  belongs_to :parent, :class_name => "Annotation", :foreign_key => "parent_id"

  validates_presence_of :body, :paper_id

  state_machine :initial => :new do<commit_msg>adding a scope for route annotations, i.e. those that start an issue list on the paper<commit_after>class Annotation < ActiveRecord::Base
  belongs_to :paper
  belongs_to :user

  has_many :responses, :class_name => "Annotation", :foreign_key => "parent_id"
  belongs_to :parent, :class_name => "Annotation", :foreign_key => "parent_id"

  scope :root_annotations , -> {where(:parent_id => nil)}

  validates_presence_of :body, :paper_id

  state_machine :initial => :new do
{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.0, 'mean_word_length': 5.75206611570248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '7214180', 'n_tokens_mistral': 270, 'n_tokens_neox': 263, 'n_words': 70}