<commit_before>'use strict';

const User = require('./user');
const Photo = require('./photo');

class Status {
  constructor(status) {
    this.created_at = status.created_at;
    this.id = status.id;
    this.rawid = status.rawid;
    this.text = status.text;
    this.source = status.source;
    this.truncated = status.truncated;
    this.in_reply_to_status_id = status.in_reply_to_status_id;
    this.in_reply_to_user_id = status.in_reply_to_user_id;
    this.favorited = status.favorited;
    this.in_reply_to_screen_name = status.in_reply_to_screen_name;
    this.is_self = status.is_self;
    this.location = status.location;
    if (status.hasOwnProperty('repost_status_id')) {
      this.repost_status_id = status.repost_status_id;
    }
    if (status.hasOwnProperty('repost_user_id')) {
      this.repost_user_id = status.repost_user_id;
    }
    if (status.hasOwnProperty('repost_screen_name')) {
      this.repost_screen_name = status.repost_screen_name;
    }
    if (status.hasOwnProperty('repost_status')) {
      this.repost_status = new Status(status.repost_status);
    }
    this.user = new User(status.user);
    if (status.hasOwnProperty('photo')) {
      this.photo = new Photo(status.photo);
    }
    this.type = this.getType();
  }

  isReply() {
    return this.in_reply_to_status_id !== '' || this.in_reply_to_user_id !== '';
  }

  isRepost() {
    return this.hasOwnProperty('repost_status_id') && this.repost_status_id !== '';
  }

  isOrigin() {
    return !(this.isReply() || this.isRepost());
  }

  isOriginRt() {
    return this.isOrigin() && this.text.match(/转@/g);
  }

  getType() {
    if (this.isReply()) return 'reply';
    if (this.isRepost()) return 'repost';
    if (this.isOrigin()) return 'origin';
    return 'unknown';
  }
}

module.exports = Status;<commit_msg>rename isOriginRt() to isOriginRepost()<commit_after>'use strict';

const User = require('./user');
const Photo = require('./photo');

class Status {
  constructor(status) {
    this.created_at = status.created_at;
    this.id = status.id;
    this.rawid = status.rawid;
    this.text = status.text;
    this.source = status.source;
    this.truncated = status.truncated;
    this.in_reply_to_status_id = status.in_reply_to_status_id;
    this.in_reply_to_user_id = status.in_reply_to_user_id;
    this.favorited = status.favorited;
    this.in_reply_to_screen_name = status.in_reply_to_screen_name;
    this.is_self = status.is_self;
    this.location = status.location;
    if (status.hasOwnProperty('repost_status_id')) {
      this.repost_status_id = status.repost_status_id;
    }
    if (status.hasOwnProperty('repost_user_id')) {
      this.repost_user_id = status.repost_user_id;
    }
    if (status.hasOwnProperty('repost_screen_name')) {
      this.repost_screen_name = status.repost_screen_name;
    }
    if (status.hasOwnProperty('repost_status')) {
      this.repost_status = new Status(status.repost_status);
    }
    this.user = new User(status.user);
    if (status.hasOwnProperty('photo')) {
      this.photo = new Photo(status.photo);
    }
    this.type = this.getType();
  }

  isReply() {
    return this.in_reply_to_status_id !== '' || this.in_reply_to_user_id !== '';
  }

  isRepost() {
    return this.hasOwnProperty('repost_status_id') && this.repost_status_id !== '';
  }

  isOrigin() {
    return !(this.isReply() || this.isRepost());
  }

  isOriginRepost() {
    return this.isOrigin() && this.text.match(/转@/g);
  }

  getType() {
    if (this.isReply()) return 'reply';
    if (this.isRepost()) return 'repost';
    if (this.isOrigin()) return 'origin';
    return 'unknown';
  }
}

module.exports = Status;
{'fraction_non_alphanumeric': 0.14387308533916848, 'fraction_numerical': 0.0, 'mean_word_length': 3.525990099009901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1917110', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1293, 'n_words': 192}