File System Essay

File System Essay
Thanks to your help on the vocabulary management system, your tutor Jueqing can now mark assignment essays automatically based on word usage. In this writing assignment, students are required to submit a short essay of at least 300 words and up to 500 words on a given topic. Essays are marked on relevance to the topic and writing style. By looking at which words a student chooses, we can gain insight into the nature of their writing. Rare and diverse words often suggest richer expression, while overusing of filler words may suggest weaker style. You are required to implement EssayScorer class, such that Its constructor receives TextProcessor object as input (see the scaffold). It has a method score_essay(self, prob_statement, file_path) that receives a short problem statement as input, reads an essay from a .txt file and returns a dictionary containing 4 component scores, penalty and the total score (rounded to 2 decimal places). { 'length': 0.0, 'relevance': 26.67, 'rarity': 23.75, 'variety': 13.33, 'penalty': -10.0, 'total_score': 53.75 } The essay file should be preprocessed using the same text processing rules from Task 3B and 4 (except for removing the stopwords): all words have been converted to lowercase processing punctuation and contractions filtering out numbers and words composed entirely of digits discarding words with a length less than 2 You may write additional helper functions or methods as needed. Note that the essay must be processed prior to counting the words. Scoring criteria The essay is scored out of 100 marks, split into 4 components plus a possible penalty. All the component score cannot go below 0. 1. Length check (max 10 marks) Essays between 300 and 500 words (inclusive) get the full 10 marks. If the essay is shorter than 300 words or longer than 500 words: Apply a 10% deduction of the length mark (1 point) for every 20 words of under- or overshoot. 2. Relevance (max 40 marks) The set of all non-stopwords from the problem statement is also referred as topic words. The appearance frequency of topic words in the essay is a good indicator about the relevance of the essay to the given topic. If all topic words appear at least 3 times, award the full 40 marks. If some appear fewer than 3 times, give partial credit: We cap the max appearance of each topic word to 3 and compute the total frequency of all topic words. The relevance score is computed as follow relevance = 40 × ∑ topic words ( min ( 3 , topic word appearance ) ) total topic words × 3 relevance=40× total topic words×3 ∑ topic words ​ (min(3,topic word appearance)) ​ If no topic words appear, award 0 marks. 3. Word rarity (max 30 marks) Score each unique word in the essay (excluding stopwords) based on its frequency in the words_freq: word frequency Points 0 -1 penalty due to the use of unknown word 1-3 5 (rare word) 4-20 4 21-50 3 51-100 2 > 100 1 word frequency 0 1-3 4-20 21-50 51-100 > 100 ​ Points -1 penalty due to the use of unknown word 5 (rare word) 4 3 2 1 ​ ​ Let U be the number of unique words (exclude stopwords). The rarity score is computed by normalizing the sum of total rarity score over unique word to the scale [0, 30] rarity = min ( 30 , 30 × sum of word rarity points 3 × U ) rarity=min(30,30× 3×U sum of word rarity points ​ ) Students are encouraged to use academic words (with rarity level 3) and awarded bonus for rare words (level 4-5). 4. Variety score (max 20 marks) Encourage students to use many different words. Let U be number of unique words (excluding stopwords) and L be total words (excluding stopwords). The variety score is computed as follow variety = 20 × U L variety=20× L U ​ ​ 5. Filler penalty (up to -10 marks) If more than 50% of the essay words are stopwords, subtract 10 points from the total. Total score are the sum of all 4 score components and the penalty (if applicable), rounded to 2 decimal places. If the total score is negative, it is capped at zero instead. Example Problem statement: "The impact of technology on education." Topic words after stopword removal: "impact", "technology", "education" Essay: "Technology is rapidly changing education. The impact of technology can be seen in online education technology. However, not all impacts of technology are positive." Length check: 24 words -> falls short of 276 words until 300 word target. Penalty 10% for each 20 words missing: -13.8 Final length mark: 10 - 13.8 = -3.8 -> 0 mark Relevance: Frequency of topic words in the essay: "technology":4, "education":2, "impact":1 Not all topic words appear at least 3 times in the essay. Total word topic appearance: 3 + 2 + 1 = 6 (We cap the appearance of technology to 3). Relevance score: 40 * 6 / (3 * 3) = 26.67 Rarity: Suppose the essay has 8 unique non-stopword words, and the total rarity points are 19. Rarity score: min(30, 30 * 19 / (8*3)) = 23.75 Variety: Suppose the essay has 8 unique non-stopword words, and the total non-stopword words is 12. Variety score: variety = 20 × 8 12 = 16.33 variety=20× 12 8 ​ ​ =16.33 Filler penalty: Suppose the essay has 12 stopwords ~ 50% Penalty: -10 The final score is: 0 + 26.67 + 23.75 + 16.33 - 10 = 56.75
09-25
内容概要:本文是一份针对2025年中国企业品牌传播环境撰写的《全网媒体发稿白皮书》,聚焦企业媒体发稿的策略制定、渠道选择与效果评估难题。通过分析当前企业面临的资源分散、内容同质、效果难量化等核心痛点,系统性地介绍了新闻媒体、央媒、地方官媒和自媒体四大渠道的特点与适用场景,并深度融合“传声港”AI驱动的新媒体平台能力,提出“策略+工具+落地”的一体化解决方案。白皮书详细阐述了传声港在资源整合、AI智能匹配、舆情监测、合规审核及全链路效果追踪方面的技术优势,构建了涵盖曝光、互动、转化与品牌影响力的多维评估体系,并通过快消、科技、零售等行业的实战案例验证其有效性。最后,提出了按企业发展阶段和营销节点定制的媒体组合策略,强调本土化传播与政府关系协同的重要性,助力企业实现品牌声量与实际转化的双重增长。; 适合人群:企业市场部负责人、品牌方管理者、公关传播从业者及从事数字营销的相关人员,尤其适用于初创期至成熟期不同发展阶段的企业决策者。; 使用场景及目标:①帮助企业科学制定媒体发稿策略,优化预算分配;②解决渠道对接繁琐、投放不精准、效果不可衡量等问题;③指导企业在重大营销节点(如春节、双11)开展高效传播;④提升品牌权威性、区域渗透力与危机应对能力; 阅读建议:建议结合自身企业所处阶段和发展目标,参考文中提供的“传声港服务组合”与“预算分配建议”进行策略匹配,同时重视AI工具在投放、监测与优化中的实际应用,定期复盘数据以实现持续迭代。
先展示下效果 https://pan.quark.cn/s/987bb7a43dd9 VeighNa - By Traders, For Traders, AI-Powered. Want to read this in english ? Go here VeighNa是一套基于Python的开源量化交易系统开发框架,在开源社区持续不断的贡献下一步步成长为多功能量化交易平台,自发布以来已经积累了众多来自金融机构或相关领域的用户,包括私募基金、证券公司、期货公司等。 在使用VeighNa进行二次开发(策略、模块等)的过程中有任何疑问,请查看VeighNa项目文档,如果无法解决请前往官方社区论坛的【提问求助】板块寻求帮助,也欢迎在【经验分享】板块分享你的使用心得! 想要获取更多关于VeighNa的资讯信息? 请扫描下方二维码添加小助手加入【VeighNa社区交流微信群】: AI-Powered VeighNa发布十周年之际正式推出4.0版本,重磅新增面向AI量化策略的vnpy.alpha模块,为专业量化交易员提供一站式多因子机器学习(ML)策略开发、投研和实盘交易解决方案: :bar_chart: dataset:因子特征工程 * 专为ML算法训练优化设计,支持高效批量特征计算与处理 * 内置丰富的因子特征表达式计算引擎,实现快速一键生成训练数据 * Alpha 158:源于微软Qlib项目的股票市场特征集合,涵盖K线形态、价格趋势、时序波动等多维度量化因子 :bulb: model:预测模型训练 * 提供标准化的ML模型开发模板,大幅简化模型构建与训练流程 * 统一API接口设计,支持无缝切换不同算法进行性能对比测试 * 集成多种主流机器学习算法: * Lass...
【顶级EI完整复现】【DRCC】考虑N-1准则的分布鲁棒机会约束低碳经济调度(Matlab代码实现)内容概要:本文介绍了名为《【顶级EI完整复现】【DRCC】考虑N-1准则的分布鲁棒机会约束低碳经济调度(Matlab代码实现)》的技术文档,重点围绕电力系统中低碳经济调度问题展开,结合分布鲁棒优化(Distributionally Robust Optimization, DRO)与机会约束规划(Chance-Constrained Programming, CCP),引入N-1安全准则以提升系统在元件故障情况下的可靠性。该方法在不确定性环境下(如风电出力波动)保障调度方案的可行性与经济性,同时降低碳排放。文档提供了完整的Matlab代码实现,便于科研人员复现实验结果,适用于高水平学术研究与工程应用验证。; 适合人群:具备电力系统优化、运筹学及不确定性建模背景的研究生、科研人员及电力行业工程师,熟悉Matlab编程与优化工具箱(如YALMIP、CPLEX/Gurobi)者更佳;适合从事智能电网、低碳调度、鲁棒优化方向的研究者; 使用场景及目标:①复现顶级EI期刊论文中的分布鲁棒机会约束模型;②研究N-1安全准则在低碳经济调度中的集成方法;③掌握分布鲁棒优化在电力系统不确定性处理中的建模技巧;④为微电网、综合能源系统等场景下的可靠、低碳调度提供算法支撑; 阅读建议:建议结合文档中提供的网盘资源(含YALMIP-develop等工具包)进行代码调试与实验验证,重点关注不确定性建模、机会约束转化、鲁棒优化求解流程,并可进一步扩展至多能源协同、需求响应等复杂场景。
【23年新算法】基于鱼鹰算法OOA-Transformer-BiLSTM多特征分类预测附Matlab代码 (多输入单输出)(Matlab代码实现)内容概要:本文介绍了一种基于鱼鹰优化算法(OOA)优化Transformer-BiLSTM模型的多特征分类预测方法,适用于多输入单输出的预测场景,并提供了完整的Matlab代码实现。该方法融合了新型元启发式优化算法OOA与深度学习结构Transformer和BiLSTM,旨在提升分类与预测精度,尤其在处理复杂非线性时序数据方面表现出较强能力。文档还列举了大量相关科研方向与技术应用案例,涵盖机器学习、深度学习、路径规划、电力系统优化等多个领域,突出其在科研仿真与工程实践中的广泛应用价值。; 适合人群:具备一定Matlab编程基础,从事科研或工程应用的研究生、科研人员及算法开发工程师,尤其是关注智能优化算法与深度学习融合应用的技术人员。; 使用场景及目标:①应用于时间序列分类与预测任务,如能源负荷预测、设备故障诊断、信号识别等;②为科研人员提供新算法复现与模型优化的技术参考,推动智能算法在实际系统中的落地;③促进OOA等新兴优化算法与主流神经网络架构的结合研究。; 阅读建议:建议读者结合提供的Matlab代码进行实践操作,重点关注OOA算法对模型超参数的优化过程以及Transformer-BiLSTM的特征提取机制,同时可参照文中其他案例拓展应用场景,提升综合建模能力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值