<commit_before><commit_msg>begin to add in triple selectors for version 2<commit_after>import curry from 'lodash/curry'
import get from 'lodash/get'
import map from 'lodash/map'
import zipObject from 'lodash/zipObject'

import { tripleSelector } from './select'

export function buildGetSelector(indexId) {
  return state => tripleSelector(state)[indexId]
}
export const indexIds = [ 'spo', 'sop', 'osp', 'ops', 'pos', 'pso' ]
const getFuncs = map(indexIds, buildGetSelector)
export const getIndex = zipObject(indexIds, getFuncs)

export const buildPathSelector = curry(
  (indexId, path, state) => get(getIndex[indexId](state), path)
)
const pathFuncs = map(indexIds, indexId => buildPathSelector(indexId))
export const getIndexPath = zipObject(indexIds, pathFuncs)
{'fraction_non_alphanumeric': 0.1174934725848564, 'fraction_numerical': 0.0013054830287206266, 'mean_word_length': 6.67, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '7285103', 'n_tokens_mistral': 245, 'n_tokens_neox': 237, 'n_words': 71}