<commit_before>import Duration from 'duration'
import shortid from 'shortid'
import moment from 'moment'
import parser from './parser'

export const hashPattern = /(#\w+[\w-]*)/g
export const version = 4
export default class Entry {
  constructor(user, message, opts = {}) {
    let {
      date = new Date(), 
    } = opts

    if (typeof message === 'object')
      return this._fromJSON(message)

    this.version = version
    this.user = user
    this._id = shortid.generate()<commit_msg>save in current version. Resolves #12<commit_after>import Duration from 'duration'
import shortid from 'shortid'
import moment from 'moment'
import parser from './parser'

export const hashPattern = /(#\w+[\w-]*)/g
export const version = 5
export default class Entry {
  constructor(user, message, opts = {}) {
    let {
      date = new Date(), 
    } = opts

    if (typeof message === 'object')
      return this._fromJSON(message)

    this.version = version
    this.user = user
    this._id = shortid.generate()
{'fraction_non_alphanumeric': 0.12475247524752475, 'fraction_numerical': 0.0039603960396039604, 'mean_word_length': 3.2658227848101267, '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': '1010502', 'n_tokens_mistral': 304, 'n_tokens_neox': 290, 'n_words': 100}