<commit_before>import React from 'react';
import R from 'ramda';
import { OverlayTrigger, Button, Popover } from 'react-bootstrap';

const Word = ({ word, keyBase, wordIndex, getValue }) => {
  // const popoverList = R.map (x => (<div key={x}><strong>{propertyNames[x]}</strong>: {wordProps[x]}</div>)) (summaryProperties);
  const popover = (
    <Popover id={'wordProperties.' + keyBase + wordIndex} title="Properties" style={{maxWidth: '100%'}}>
      <div>Insert properties here</div>
    </Popover>
  );
  return (
    <OverlayTrigger trigger="click" rootClose placement="bottom" overlay={popover}>
      <span><a href="javascript:">{getValue(word[0][0], word[0][1])}</a> </span>
    </OverlayTrigger>
  );
}

// const WordGroup = ({id, words}) => {
//   const wordElements = R.map (x => (<Word key={x.key} {...x} />)) (words);
//   return (
//     <div className="wordGroup">
//       {wordElements}
//     </div>
//   );
// }

export const Work = ({ work, workIndex, getValue }) => {
  const firstWord = work.words[0];
  const keyBase = workIndex + '.';
  const words = R.addIndex(R.map)
    ((w, i) => (<div key={keyBase + '.' + i}><Word word={w} keyBase={keyBase} wordIndex={i} getValue={getValue} /></div>))
    (work.words);
  return (
    <div className="workContainer">
      { words }
    </div>
  );
};<commit_msg>Make keyBase identifier consistent<commit_after>import React from 'react';
import R from 'ramda';
import { OverlayTrigger, Button, Popover } from 'react-bootstrap';

const Word = ({ word, keyBase, wordIndex, getValue }) => {
  // const popoverList = R.map (x => (<div key={x}><strong>{propertyNames[x]}</strong>: {wordProps[x]}</div>)) (summaryProperties);
  const popover = (
    <Popover id={'wordProperties.' + keyBase + '.' + wordIndex} title="Properties" style={{maxWidth: '100%'}}>
      <div>Insert properties here</div>
    </Popover>
  );
  return (
    <OverlayTrigger trigger="click" rootClose placement="bottom" overlay={popover}>
      <span><a href="javascript:">{getValue(word[0][0], word[0][1])}</a> </span>
    </OverlayTrigger>
  );
}

// const WordGroup = ({id, words}) => {
//   const wordElements = R.map (x => (<Word key={x.key} {...x} />)) (words);
//   return (
//     <div className="wordGroup">
//       {wordElements}
//     </div>
//   );
// }

export const Work = ({ work, workIndex, getValue }) => {
  const firstWord = work.words[0];
  const keyBase = workIndex;
  const words = R.addIndex(R.map)
    ((w, i) => (<div key={keyBase + '.' + i}><Word word={w} keyBase={keyBase} wordIndex={i} getValue={getValue} /></div>))
    (work.words);
  return (
    <div className="workContainer">
      { words }
    </div>
  );
};
{'fraction_non_alphanumeric': 0.21351250466592012, 'fraction_numerical': 0.0059723777528928705, 'mean_word_length': 3.589041095890411, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 59, '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': '2316843', 'n_tokens_mistral': 908, 'n_tokens_neox': 904, 'n_words': 203}