<commit_before>import { LangId } from '../../definitions/auxiliary/MultiLang'
import { clone } from '../../client/utils/clone'
import {
    EducationQuality,
    EducationStage,
    educationStageProfiles
} from '../../definitions/Qualities/EducationExperience'
import { stripIndents } from 'common-tags'
import { text } from '../../client/utils/text'
import { data } from '../../data/index'
import { WechatChatbotUser } from '../middlewares/wechat'
import { Pathway } from '../../client/utils/definitions'
import { calcSuitablePaths } from '../../client/utils/calcSuitablePaths'
import Transition from '../../definitions/Transition'
import { PATHWAY_KW_SIMPLE } from '../../data/constants'

type Response = string

interface Reducer<T> {
    (state: T, input: string): T
}

interface Template<T> {
    (state: T): string
}

interface Dialogue<T> {
    reduce: Reducer<T>
    text: Template<T>
}

const restartKeywords = ['重来', 'reset']

export function shouldReset(answer: string): boolean {
    return restartKeywords.includes(answer.toLowerCase())
}

const wrap = (markStart: string, markEnd: string) => (content: string) => markStart + content + markEnd
<commit_msg>Fix imports<commit_after>import { LangId } from '../../definitions/auxiliary/MultiLang'
import { clone } from '../../client/utils/clone'
import {
    EducationQuality,
    EducationStage,
    educationStageProfiles
} from '../../definitions/Qualities/EducationExperience'
import { stripIndents } from 'common-tags'
import { text } from '../../client/utils/text'
import { data } from '../../data'
import { WechatChatbotUser } from '../middlewares/wechat'
import { Pathway } from '../../client/utils/definitions'
import { calcSuitablePaths } from '../../calculators/calcSuitablePaths'
import Transition from '../../definitions/Transition'
import { PATHWAY_KW_SIMPLE } from '../../data/constants'

type Response = string

interface Reducer<T> {
    (state: T, input: string): T
}

interface Template<T> {
    (state: T): string
}

interface Dialogue<T> {
    reduce: Reducer<T>
    text: Template<T>
}

const restartKeywords = ['重来', 'reset']

export function shouldReset(answer: string): boolean {
    return restartKeywords.includes(answer.toLowerCase())
}

const wrap = (markStart: string, markEnd: string) => (content: string) => markStart + content + markEnd

{'fraction_non_alphanumeric': 0.15787215787215786, 'fraction_numerical': 0.0, 'mean_word_length': 3.8786610878661087, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '3922186', 'n_tokens_mistral': 690, 'n_tokens_neox': 695, 'n_words': 179}