<commit_before>require 'google_places'

class Perspective
  MAX_LENGTH = 130
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Paranoia
  include Twitter::Extractor

  field :memo, :type => String, :default => ""
  field :tags, :type => Array, :default => []
  field :url, :type => String
  field :flag_count, :type => Integer, :default => 0
  field :modified_at, :type => DateTime

  #these are meant for internal use, not immediately visible to user -iMack
  field :loc, :as => :location, :type => Array
  field :ploc, :as => :place_location, :type => Array
  field :flaggers, :type => Array
  field :accuracy, :type => Float
  field :empty, :type => Boolean, :default => true

  #contains starred perspectives this user has of on the place
  field :fp, :as => :favourite_perspective_ids, :type => Array, :default => []
  field :su, :as => :starring_users, :type => Array, :default => []

  belongs_to :place, :foreign_key => 'plid', :index => true
  belongs_to :user, :foreign_key => 'uid', :index => true
  belongs_to :client_application

  embeds_many :pictures<commit_msg>take paranoid back out<commit_after>require 'google_places'

class Perspective
  MAX_LENGTH = 130
  include Mongoid::Document
  include Mongoid::Timestamps
  include Twitter::Extractor

  field :memo, :type => String, :default => ""
  field :tags, :type => Array, :default => []
  field :url, :type => String
  field :flag_count, :type => Integer, :default => 0
  field :modified_at, :type => DateTime

  #these are meant for internal use, not immediately visible to user -iMack
  field :loc, :as => :location, :type => Array
  field :ploc, :as => :place_location, :type => Array
  field :flaggers, :type => Array
  field :accuracy, :type => Float
  field :empty, :type => Boolean, :default => true

  #contains starred perspectives this user has of on the place
  field :fp, :as => :favourite_perspective_ids, :type => Array, :default => []
  field :su, :as => :starring_users, :type => Array, :default => []

  belongs_to :place, :foreign_key => 'plid', :index => true
  belongs_to :user, :foreign_key => 'uid', :index => true
  belongs_to :client_application

  embeds_many :pictures
{'fraction_non_alphanumeric': 0.13966225467822913, 'fraction_numerical': 0.003651300775901415, 'mean_word_length': 4.507537688442211, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 55, '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': '207058', 'n_tokens_mistral': 719, 'n_tokens_neox': 686, 'n_words': 232}