<commit_before>import React from 'react'

import numberShow from 'lib/numberShower/numberShower'

const PrecisionNumber = ({value, precision, number=numberShow(value, precision)}) => (
  <span className='result-value'>
    {number.value}{number.symbol}
    {number.power && (<span>{`\u00b710`}<sup>{number.power}</sup></span>)}
  </span>
)

export const Output = ({metric: {name, simulation}}) => {
  if (!_.has(simulation, 'stats')) { return false }
  const {length, mean, adjustedConfidenceInterval: [low, high]} = simulation.stats
  return (
    <div className='output row'>
      <div className='col-md-7 name'>
        {name}
      </div>
      <div className='col-md-5 result-section'>
        {length === 1 && <PrecisionNumber value={mean} precision={6}/> }
        {length > 1 && <div><PrecisionNumber value={low}/> to <PrecisionNumber value={high}/></div> }<commit_msg>Refactoring component to work with points.<commit_after>import React from 'react'

import numberShow from 'lib/numberShower/numberShower'

const PrecisionNumber = ({value, precision, number=numberShow(value, precision)}) => (
  <span className='result-value'>
    {number.value}{number.symbol}
    {number.power && (<span>{`\u00b710`}<sup>{number.power}</sup></span>)}
  </span>
)

const RangeDisplay = ({range: [low, high]}) => (
  <div><PrecisionNumber value={low}/> to <PrecisionNumber value={high}/></div>
)

export const Output = ({metric: {name, simulation}}) => {
  if (!_.has(simulation, 'stats')) { return false }
  const {length, mean, adjustedConfidenceInterval} = simulation.stats
  return (
    <div className='output row'>
      <div className='col-md-7 name'>
        {name}
      </div>
      <div className='col-md-5 result-section'>
        {length === 1 && <PrecisionNumber value={mean} precision={6}/> }
        {length > 1 && <RangeDisplay range={adjustedConfidenceInterval}/> }
{'fraction_non_alphanumeric': 0.18007458710708577, 'fraction_numerical': 0.010655301012253596, 'mean_word_length': 4.245810055865922, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 41, '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': '5612268', 'n_tokens_mistral': 598, 'n_tokens_neox': 572, 'n_words': 134}