Files
match/review_edu_strict.js

201 lines
8.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const fs = require('fs');
const h = fs.readFileSync(__dirname + '\\index.html', 'utf8');
const m = h.match(/<script>([\s\S]*?)<\/script>/);
const js = m[1];
// Extract chapter data
const chapters = [
{ id: 1, name: '有理数', standard: '正负数·有理数分类·数轴·相反数·绝对值·加减法·乘除法·乘方·科学记数法·近似数·运算律' },
{ id: 2, name: '整式的加减', standard: '单项式·多项式·同类项·去括号·添括号·整式加减·降幂升幂' },
{ id: 3, name: '一元一次方程', standard: '等式性质·解方程·去分母·配套·工程·行程·销售·方案·比赛积分·利率' },
{ id: 4, name: '几何图形初步', standard: '立体图形·展开图·三视图·线段·射线·直线·中点·角·余角补角·角平分线·方位角·钟面角' }
];
console.log('╔══════════════════════════════════════════════╗');
console.log('║ 教育专家 · 严格内容审核报告 ║');
console.log('╚══════════════════════════════════════════════╝\n');
chapters.forEach(ch => {
const chStart = js.indexOf("{ id:" + ch.id + ", title:'" + ch.name + "'");
const chEnd = ch.id < 4 ? js.indexOf("{ id:" + (ch.id+1) + ", title:'") : js.indexOf("];", chStart);
const chContent = js.substring(chStart, chEnd);
console.log('▬'.repeat(50));
console.log('【' + ch.name + '】');
// Check KPs
const kps = chContent.match(/type:'kp', icon:'[^']+', title:'[^']+'/g);
if (kps) {
console.log('\n 知识点(KP):');
kps.forEach(kp => {
const title = kp.match(/title:'([^']+)'/)[1];
const icon = kp.match(/icon:'([^']+)'/)[1];
console.log(' ' + icon + ' ' + title);
});
}
// Check for explanatory content quality
const kjCount = (chContent.match(/class="kj"/g) || []).length;
const qjCount = (chContent.match(/class="qj"/g) || []).length;
const vidCount = (chContent.match(/<a href="https:\/\/www\.bilibili/g) || []).length;
console.log(' 口诀数: ' + kjCount + ' 巧解数: ' + qjCount + ' 视频数: ' + vidCount);
// Check question count and distribution
const ssQ = chContent.match(/type:'ss'/g);
const rvQ = chContent.match(/type:'review'/g);
const egQ = chContent.match(/type:'eg'/g);
console.log(' SS题:' + (ssQ ? ssQ.length : 0) + ' Review:' + (rvQ ? rvQ.length : 0) + ' EG:' + (egQ ? egQ.length : 0));
// Check for common explanation pitfalls
const hasMistake = chContent.includes('错误') || chContent.includes('易错');
const hasLifeExample = chContent.includes('温度计') || chContent.includes('银行卡') || chContent.includes('天平') || chContent.includes('快递');
const hasComparison = chContent.includes('对比') || chContent.includes('区别') || chContent.includes('vs');
console.log(' 易错提示:' + (hasMistake ? '✅' : '❌') + ' 生活例子:' + (hasLifeExample ? '✅' : '❌') + ' 对比说明:' + (hasComparison ? '✅' : '❌'));
});
// Check overall structure
console.log('\n\n▬'.repeat(50));
console.log('【总体审核】');
// 1. 内容完整性检查
console.log('\n 1. 知识点覆盖(课标要求 vs 实际覆盖):');
const allContent = js;
const standardTopics = [
['正负数', '正数', '基本概念'],
['有理数分类', '整数', '分类标准'],
['数轴', '原点', '数轴三要素'],
['相反数', '相反数', '符号相反'],
['绝对值', '绝对值', '距离'],
['加法法则', '同号相加', '运算规则'],
['减法法则', '减法', '减法法则'],
['乘法法则', '同号得正', '乘法'],
['除法法则', '除法', '除以'],
['乘方', '乘方', '幂运算'],
['科学记数法', '科学记数法', '大数表示'],
['近似数', '近似数', '精确度'],
['运算律', '交换律', '运算律'],
['有效数字', '有效数字', '精确位'],
['单项式', '单项式', '整式基础'],
['多项式', '多项式', '整式'],
['同类项', '同类项', '合并'],
['去括号', '去括号', '括号法则'],
['添括号', '添括号', '括号'],
['降幂排列', '降幂', '排列'],
['升幂排列', '升幂', '排列'],
['方程', '方程', '等式'],
['等式性质', '等式性质', '性质'],
['移项', '移项', '过桥'],
['去分母', '去分母', '公分母'],
['配套问题', '配套', '应用题'],
['工程问题', '工程', '效率'],
['行程问题', '行程', '路程'],
['销售问题', '进价', '利润'],
['方案选择', '方案', '比较'],
['比赛积分', '积分', '比赛'],
['存款利率', '利率', '利息'],
['立体图形', '棱柱', '立体'],
['展开图', '展开', '展开图'],
['线段', '线段', '端点'],
['射线', '射线', '端点'],
['直线', '直线', '无限'],
['中点', '中点', '中点'],
['角', '角', '角度'],
['余角', '余角', '90°'],
['补角', '补角', '180°'],
['角平分线', '平分', '角平分线'],
['方位角', '北偏', '方位'],
['钟面角', '时针', '钟面'],
];
let covered = 0, missing = [];
standardTopics.forEach(t => {
if (allContent.includes(t[1])) { covered++; }
else { missing.push(t[0]); }
});
console.log(' 覆盖: ' + covered + '/' + standardTopics.length);
if (missing.length > 0) console.log(' 缺失: ' + missing.join(', '));
// 2. 讲解生动性
console.log('\n 2. 讲解生动性:');
const metaphors = [
['照镜子', '相反数'],
['天平', '方程'],
['快递', '去括号'],
['双胞胎', '同类项'],
['单词/句子', '整式'],
['公路', '数轴'],
['温度计', '正负数'],
['手电筒', '射线'],
['土豆/土豆片', '立体vs平面'],
];
let metaphorCount = 0;
metaphors.forEach(m => {
if (allContent.includes(m[0])) { metaphorCount++; console.log(' ✅ ' + m[0] + ' → ' + m[1]); }
else { console.log(' ❌ ' + m[0] + '(未使用)'); }
});
// 3. 易错点提示
console.log('\n 3. 易错点/常见错误提示:');
const tips = [
['π是常数', 'π是数字'],
['-1⁴≠(-1)⁴', '1⁴'],
['平均速度误区', '平均速度'],
['去分母漏乘', '漏乘'],
['过桥要变号', '过桥'],
['负数比较大小', '绝对值大的反而小'],
];
tips.forEach(t => {
if (allContent.includes(t[1])) console.log(' ✅ ' + t[0]);
else console.log(' ❌ ' + t[0] + '(未提示)');
});
// 4. 练习多样性
console.log('\n 4. 练习多样性:');
const calcQ = (allContent.match(/计算/g) || []).length;
const conceptQ = (allContent.match(/说法正确的是/g) || []).length;
const wordQ = (allContent.match(/km|元|小时|分钟|天/g) || []).length;
const graphQ = (allContent.match(/Geo\./g) || []).length;
console.log(' 计算题引用:' + calcQ + '次 概念判断题:' + conceptQ + '次');
console.log(' 应用题情境:' + wordQ + '次 Geo图形题:' + graphQ + '个');
// 5. 难度梯度
console.log('\n 5. 难度梯度(重点→核心→高频→综合):');
const tags = {};
const allTags = js.match(/tag:'[^']+'/g);
if (allTags) {
allTags.forEach(t => {
const tag = t.split("'")[1];
tags[tag] = (tags[tag] || 0) + 1;
});
Object.keys(tags).forEach(t => console.log(' ' + t + ': ' + tags[t] + '题'));
}
// 6. 口诀有效性
console.log('\n 6. 口诀可记忆性:');
const rhymes = [
'零上为正零下为负',
'数轴一条线原点在中间',
'相反数是照镜子',
'同号相加符号不变',
'奇次方符号不变',
'去括号等于拆快递',
'移项过桥要变号',
'线段两个点射线一个点',
'一四一、二三一、二二二、三三',
'方位角互看',
];
rhymes.forEach(r => {
if (allContent.includes(r.substring(0, 6))) console.log(' ✅ ' + r.substring(0, 20) + '...');
else console.log(' ❌ ' + r.substring(0, 20) + '...(未找到)');
});
console.log('\n' + '═'.repeat(50));
console.log('审核结论:');
if (covered === standardTopics.length && metaphorCount >= 7) {
console.log('✅ 知识点完整,讲解生动,符合教学标准');
} else {
console.log('⚠️ 存在以下问题:');
if (missing.length > 0) console.log(' - 知识点缺失: ' + missing.join(', '));
if (metaphorCount < 7) console.log(' - 比喻/类比不足(仅' + metaphorCount + '/9');
}