<commit_before>import { BBox } from '@antv/g';
import * as _ from '@antv/util';
import { Coordinate, getCoordinate } from '../../dependents';
import { CoordinateOption } from '../interface';

/**
 * 是否存在 action
 * @param actions
 * @param actionName
 */
function hasAction(actions, actionName) {
  return _.some(actions, (action) => action[0] === actionName);
}

function isTheta(type: string): boolean {
  return type === 'theta';
}
/**
 * 创建坐标系
 * @param coordinateOption
 * @param coordinateBBpx
 */
export function createCoordinate(coordinateOption: CoordinateOption = {}, coordinateBBpx: BBox): Coordinate {
  const { type = 'rect', cfg, actions = [] } = coordinateOption;

  // 1. 起始位置
  const start = coordinateBBpx.bl;
  const end = coordinateBBpx.tr;

  const props = {
    start,
    end,
    ...cfg,
  };<commit_msg>fix(view): var name typo<commit_after>import { BBox } from '@antv/g';
import * as _ from '@antv/util';
import { Coordinate, getCoordinate } from '../../dependents';
import { CoordinateOption } from '../interface';

/**
 * 是否存在 action
 * @param actions
 * @param actionName
 */
function hasAction(actions, actionName) {
  return _.some(actions, (action) => action[0] === actionName);
}

function isTheta(type: string): boolean {
  return type === 'theta';
}
/**
 * 创建坐标系
 * @param coordinateOption
 * @param coordinateBBox
 */
export function createCoordinate(coordinateOption: CoordinateOption = {}, coordinateBBox: BBox): Coordinate {
  const { type = 'rect', cfg, actions = [] } = coordinateOption;

  // 1. 起始位置
  const start = coordinateBBox.bl;
  const end = coordinateBBox.tr;

  const props = {
    start,
    end,
    ...cfg,
  };
{'fraction_non_alphanumeric': 0.15555555555555556, 'fraction_numerical': 0.0024024024024024023, 'mean_word_length': 3.7873563218390807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5917916', 'n_tokens_mistral': 536, 'n_tokens_neox': 535, 'n_words': 141}