<commit_before>import React, {Component} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import styles from './interesting-project.scss'
import {isBlank} from '../Utils'
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now'

function shorten(distance) {
  return distance
    .replace('less than a', '<1')
    .replace('about ', '')
    .replace(/ minutes?/, 'm')
    .replace(/ hours?/, 'h')
    .replace(/ days?/, 'd')
    .replace(/ months?/, 'mo')
    .replace(/ years?/, 'y')
}

class InterestingProject extends Component {
  render() {
    const classes = classNames(styles.interestingProject, styles[this.props.prognosis])
    const isSick = this.props.prognosis === 'sick'

    const trayName = this.props.showTrayName && !isBlank(this.props.trayName) ?
      <span data-locator='tray-name'>{this.props.trayName.toLowerCase()} </span> : null

    const stage = this.props.stage ? <span data-locator='project-stage'> {this.props.stage}</span> : null<commit_msg>fixes the broken build time display for 'over' and 'almost'<commit_after>import React, {Component} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import styles from './interesting-project.scss'
import {isBlank} from '../Utils'
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now'

function shorten(distance) {
  return distance
    .replace('less than a', '<1')
    .replace('about ', '~')
    .replace('almost ', '~')
    .replace('over ', '>')
    .replace(/ minutes?/, 'm')
    .replace(/ hours?/, 'h')
    .replace(/ days?/, 'd')
    .replace(/ months?/, 'mo')
    .replace(/ years?/, 'y')
}

class InterestingProject extends Component {
  render() {
    const classes = classNames(styles.interestingProject, styles[this.props.prognosis])
    const isSick = this.props.prognosis === 'sick'

    const trayName = this.props.showTrayName && !isBlank(this.props.trayName) ?
      <span data-locator='tray-name'>{this.props.trayName.toLowerCase()} </span> : null

    const stage = this.props.stage ? <span data-locator='project-stage'> {this.props.stage}</span> : null
{'fraction_non_alphanumeric': 0.1648762260625876, 'fraction_numerical': 0.0009341429238673517, 'mean_word_length': 4.05188679245283, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 12, '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': '3947041', 'n_tokens_mistral': 691, 'n_tokens_neox': 684, 'n_words': 164}