搜档网
当前位置:搜档网 › 单词计数

单词计数

单词计数
单词计数

文本文件单词的检索与计数(流程图)

《数据结构》课程设计报告 一、设计时间 2015年01月5日-----2015年01月11日 二、设计地点 实验楼计算机511机房 三、设计目的 1.巩固和加深对数据结构课程所学知识的理解,了解并掌握数据结构与算法的设计方法; 2.初步掌握软件开发过程的问题分析、系统设计、程序编码、测试等基本方法和技能; 3.提高综合运用所学的理论知识和方法,独立分析和解决问题的能力; 4.训练用系统的观点和软件开发一般规范进行软件开发,培养软件工作者所应具备的科学的工作方法和作风; 5.培养查阅资料,独立思考问题的能力。 四.设计小组成员 五.指导老师 六.设计课题 文本文件单词的检索与计数 七.基本思路及关键问题的解决方法(需求分析和概要设计) (一)需求分析: 1.建立文本文件 建立文本文件的实现思路: (1)定义一个串变量 (2)定义文本文件 (3)输入文件名,打开该文件 (4)循环读入文本行,写入文本文件,其过程如下: While(不是文件输入结束){ 读入一文本行至串变量; 串变量写入文件; 输入是否结束输入标志; } (5)关闭文件 2.给定单词的计数 该功能需要用到前一节中设计的模式匹配算法,逐行扫描文本文件。匹配一个,计数器加1,直到整个文件扫描结束;然后输出单词的次数。 3 .检索单词出现在文本文件中的行号、次数及其位置

4.主控菜单程序的结构 (1)头文件包含 (2)菜单选择包括: 1、建立文件 2、单词计数 3、单词定位 4、退出程序 (3)选择1~4执行相应的操作,其他字符为非法 (二)概要设计: 1.建立文本文件:定义一个串变量,定义文本文件,输入文件名,打开该文件,循环读入文本行,写入文本文件,关闭文件。 2.给定单词的计数:逐行扫描文本文件。匹配一个,计数器加1,直到整个文件扫描结束;然后输出单词的次数。 3.检索单词出现在文本文件中的行号、次数及其位置:逐行扫描文本文件。扫描一个单词,单词数加1,匹配一个,计数器加1,输出该单词数,行数到底为止,行数加1,单词数清零,直到整个文件扫描结束;然后输出单词的次数,行号,第几个单词。 八.算法及流程图(详细设计)

常见翻译词汇(专题篇)

六级翻译词汇经济篇: 宏观经济macro economy 社会主义市场经济socialist market economy 知识经济knowledge economy 网络经济Internet-based economy 经济规律law of economy 大规模生产mass production 生产力productive forces 生产关系relations of production 公有制public ownership 私有制private ownership 国有企业state-owned enterprises (SOEs) 私营企业private business 民营企业privately-run business 中小企业small and medium enterprises (SMEs) 连锁企业franchise / chain business 国民生产总值Gross National Product (GNP) 国内生产总值Gross Domestic Product (GDP)

实际增长率growth rate in real terms 年均增长率average growth rate per annum 可持续增长sustainable growth 经济效益economic returns 投资回报率rate of return on investment 衰退recession 宏观调控macro control 提高经济效益enhance economic performance 扭亏为盈turn a loss-making business into a profitable one 优化经济结构optimize economic structure 扩大内需expand domestic demand 国计民生national interest and people’s livelihood 经济特区special economic zones “十二五规划“ the 12th Five-Year Plan for National and Economic and Social Development 风险投资venture investment 经济繁荣economic boom

常用翻译词汇

一、组装、冲压、喷漆等专业词汇 Assembly line组装线 Layout布置图 Conveyer流水线物料板 Rivet table拉钉机 Rivet gun拉钉枪 Screw driver起子 Electric screw driver电动起子Pneumatic screw driver气动起子worktable 工作桌 OOBA开箱检查 fit together组装在一起 fasten锁紧(螺丝) fixture 夹具(治具) pallet栈板 barcode条码 barcode scanner条码扫描器 fuse together熔合 fuse machine热熔机 repair修理 operator作业员 QC品管 supervisor 课长 ME制造工程师 MT制造生技 cosmetic inspect外观检查 inner parts inspect内部检查 thumb screw大头螺丝 lbs. inch镑、英寸 EMI gasket导电条 front plate前板 rear plate后板 chassis 基座 bezel panel面板 power button电源按键 reset button重置键 Hi-pot test of SPS高源高压测试 V oltage switch of SPS 电源电压接拉键 sheet metal parts 冲件 plastic parts塑胶件 SOP制造作业程序 material check list物料检查表 work cell工作间 trolley台车 carton纸箱 sub-line支线 left fork叉车QC Section品管科 stamping factory冲压厂 painting factory烤漆厂 molding factory成型厂 common equipment常用设备 uncoiler and straightener整平机 punching machine 冲床 robot机械手 hydraulic machine油压机 lathe车床 planer |'plein |刨床 miller铣床 grinder磨床 driller??床 linear cutting线切割 electrical sparkle电火花 welder电焊机 staker=reviting machine铆合机 position职务 president董事长 general manager总经理 special assistant manager特助 factory director厂长 department director部长 deputy manager | =vice manager副理 section supervisor课长 deputy section supervisor =vice section superisor副课长 group leader/supervisor组长 line supervisor线长 assistant manager助理 to move, to carry, to handle搬运 be put in storage入库 pack packing包装 to apply oil擦油 to file burr 锉毛刺 final inspection终检 to connect material接料 to reverse material 翻料 wet station沾湿台 Tiana天那水 cleaning cloth抹布 to load material上料 to unload material卸料 to return material/stock to退料 scraped |'skr?pid|报废 scrape ..v.刮;削 deficient purchase来料不良 manufacture procedure制程 deficient manufacturing procedure制程 不良 oxidation |' ksi'dei n|氧化 scratch刮伤 dents压痕 defective upsiding down抽芽不良 defective to staking铆合不良 embedded lump镶块 feeding is not in place送料不到位 stamping-missing漏冲 production capacity生产力 education and training教育与训练 proposal improvement提案改善 spare parts=buffer备件 forklift叉车 trailer=long vehicle拖板车 compound die合模 die locker锁模器 pressure plate=plate pinch压板 bolt螺栓 name of a department部门名称 administration/general affairs dept总务 部 automatic screwdriver电动启子 thickness gauge厚薄规 gauge(or jig)治具 power wire电源线 buzzle蜂鸣器 defective product label不良标签 identifying sheet list标示单 screwdriver holder起子插座 pedal踩踏板 stopper阻挡器 flow board流水板 hydraulic handjack油压板车 forklift叉车 pallet栈板 glove(s)手套 glove(s) with exposed fingers割手套 thumb大拇指 forefinger食指 midfinger中指 ring finger无名指 little finger小指 band-aid创可贴 iudustrial alcohol工业酒精 alcohol container沾湿台 head of screwdriver起子头 sweeper扫把 mop拖把 vaccum cleaner吸尘器 rag 抹布 garbage container灰箕

2020年线上英语教学网络热点词汇

2020网课热点英语词句积累 2020疫情影响之下,传统教育方式得到了新的改变。从在教室学习转换为在线学习。 无论是教师还是学生都在这样的教学中力求突破、适应并提升,毕竟无论哪一种形式,目的都只有一个:那就是提高学生成绩。 渐渐适应中的我们不经要问,既然是变革,那是不是代表了网课可以代替面授教学? 对此,我们从中国日报网截取了对这一观点的所持的态度的英文原版文章,对此翻译(并未采取直译),同时对其中典型的词句做适当积累。 Online classes can't replace classrooms 在线课程不能替代课堂 and moved the classrooms online. 由于新冠病毒的爆发,中国见证了一个全新的学期:很多中国学校已经推迟了开学,并将课堂搬到线上。 ·单词积累· witness v. 见证

outbreak v. 爆发 suspend v. 推迟、暂停 On the first day of school, DingTalk, a virtual workplace developed by Alibaba Group, held online classes for an estimated 50 million students nationwide, from primary to high school level. 开学第一天,阿里巴巴集团开发的虚拟工作平台“钉钉”,为全国范围内的大约5000万名中小学生开设了在线课程。 ·单词积累· virtual adj. 虚拟的;事实上的 estimate v. 估计;判断 nationwide adj. 全国范围的 Education on Feb 12, "postponement of school without suspension of learning" is

文本文件单词的检索与计数

软件综合课程设计 文本文件单词的检索与计数 实时监控报警系统 二〇一四年六月

文本文件单词的检索与计数 1.问题陈述 要求编程建立一个文本文件,每个单词不包含空格且不跨行,单词由字符序列构成且区分大小写;统计给定单词在文本文件中出现的总次数;检索输出某个单词出现在文本中的行号、在该行中出现的次数以及位置。该设计要求可分为三个部分实现:其一,建立文本文件,文件名由用户用键盘输入;其二,给定单词的计数,输入一个不含空格的单词,统计输出该单词在文本中的出现次数;其三,检索给定单词,输入一个单词,检索并输出该单词所在的行号、该行中出现的次数以及在该行中的相应位置。 (1).建立文本文件 (2)给定单词的计数 (3)检索单词出现在文本文件中的行号、次数及其位置 (4)主控菜单程序的结构 ①头文件包含 ②菜单选项包含 建立文件、单词定位、单词计数、退出程序 ③选择1-4执行相应的操作,其他字符为非法。 2.程序代码 #include #include #include #define MaxStrSize 256 //根据用户需要自己定义大小 using namespace std; typedef struct { char ch[MaxStrSize]; //ch是一个可容纳256个字符的字符数组 int length; } SString;//定义顺序串类型 int PartPosition (SString s1,SString s2,int k) { int i,j; i=k-1; //扫描s1的下标,因为c中数组下标是从0开始,串中序号相差1 j=0;//扫描s2的开始下标 while(i

大学英语六级翻译常用词汇

大学英语六级翻译常用词汇:经济类 中国经济 总需求 aggregate demand 总供给 aggregate supply 企业文化 corporate/entrepreneurial culture 企业形象 corporate image (Cl); enterprise image 跨国公司 cross-national corporation 创业精神 enterprising spirit; pioneering spirit 外资企业 foreign-funded enterprise 猎头公司head-hunter 假日经济 holiday economy 人力资本human capital 航空和航天工业aerospace industry 飞机制造工业aircraft industry 电子工业 electronic industry 汽车制造工业 car industry 娱乐业 entertainment industry 信息产业 information industry 知识密集型产业 knowledge-intensive industry 国有大中型企业 large and medium-sized state-owned enterprises 轻工业 light industry 博彩业 lottery industry 制造业 manufacturing industry 垄断行业 monopoly industries 市场多元化 market diversification 市场经济 market economy 市场监管 market supervision 购买力 purchasing power 熊市 bear market 牛市 bull market 城镇化 urbanization 房地产 real estate 首付 down-payment 业主 home owner 个人购房贷款 individual housing loan

两会热点词汇翻译

两会热点词汇翻译 政府注资pump priming 软环境soft environment 粮食最低收购价crops' minimum purchase prices 保八Eight Percent Protection 以人为本Put People First 农民企业家Farmer-turned-entrepreneur 窗口指导window guidance 下岗再就业Re-employment after being laid off 登记失业率registered unemployment rate 扩大内需propel/expand domestic demand 城乡差距rural-urban divide 基本医疗保险basic medical insurance 家电下乡Home appliances going to the countryside 教育公平Equal Access to Education "三农"Issues of agriculture, farmer and rural area 农村留守人口Rural Left-Behind Population 提案proposal 2008政府工作报告热词——国企篇 国有企业state owned enterprises (SOEs) 主要产业core business 税收贡献tax contributions

民航civil aviation 所有制结构ownership structure 发展大型粮食基地to develop large grain production bases 国有资产所有权转移transferring ownership of state-owned assets 完善所有制结构to improve ownership structure 实行政策性关闭破产to carry out policy-mandated closures and bankruptcies 建立国有资本经营预算制度to set up a budget system for managing state capital 国有企业资产总额the total value of assets of state owned enterprises (SOEs) 国有资产管理体制改革reform of the management system for state-owned assets 国有经济布局与结构调整adjustment of the distribution and structure of the state sector 建立和完善国有资产出资人制度to set up and improve a system for investors of state assets 引入国有企业股份制to institute a stockholding system in SOEs 邮政体制改革reform of the postal service system 振兴老工业基地战略strategy of rejuvenating the old industrial bases 国有企业改革改组改造reforming, reorganizing and upgrading SOEs 深化国有企业股份制改革to deepen the reform to convert SOEs into stockholding corporations 加强公司化管理to improve corporate governance 实行政策引导关闭和破产to carry out policy-mandated closures and bankruptcies 加快资源枯竭型城市经济转型to transform the economies of cities dependent on resource exploitation 扩大建立国有资产管理预算系统试点to expand the experiment of setting up a budget system for managing state capital

六级翻译高频词汇

六级翻译高频词汇 表示主要的:primary, major, main, chief, important, essential, significant 表示充足的enough, sufficient, plenty, abundant 表示适当的appropriate 表示提升,改善,加强enhance, improve, strengthen 表示合法valid, legal, lawful, rightful 表示卓越不凡extraordinary, excellent, uncommon, remarkable, outstanding. 表示很有名气well-known, noticeable, famous 表示义务,有责任去做compulsory, required, obligatory 表示积极,主动positive, proactive 表示合理sound, rational, correct, sensible, logical, reasonable 表示英勇brave, bold, valiant, heroic, courageous, fearless 表示巨大huge, large, giant, vast, enormous 表示牢固稳定sturdy, strong, firm, tough, stable, hardy 表示声誉reputation, fame, prestige 表示巅峰、顶点tip, top, peak, apex, climax 表示发现、探索discover, seek, search 表示增加increase, enlarge, multiply, expand, raise, accelerate, broaden, magnify 表示减少reduce, decrease, decelerate, lessen, diminish, decline, discount, subtract, deduct 表示转变convert, change, transform, switch 表示提供、提交offer, supply, provide, contribute, submit 表示构成、组成constitute, consist, organize, form, establish, compose, comprise,

翻译常用词汇

翻译常用词汇 高枕无忧resting without worries 史无前例unprecedented in the history 不可一世a conquering hero 毫不示弱equally firmly 量体裁衣to act according to actual circumstances 一刀两断to cut it clean 与虎谋皮to ask a tiger for its skin 六亲不认to disown all one’s relatives and fri ends 英雄本色the true quality of a hero 英雄所见略同Great minds think alike. 每逢佳节倍思亲On festive occasions more than ever we think of our dear ones faraway. 上有好,下必有其焉。What the superior loves, his inferiors will be found to love exceedingly.大江东去,浪淘尽,千古风流人物。The Great River flows to the east: Its waves have washed away all the men of untrammeled spirit of a thousand ages. 上兵伐谋,其次伐交。What is supremely important in war is to attack the enemy’s strategy. Next best is to disrupt his alliances. 问君能有几多愁,恰似一江春水向东流。I wonder how many sorrows you have. They are exactly like the Yangtze River unceasingly flowing eastward in spring. 千呼万唤始出来,犹抱琵琶半遮面。Only after a thousand entreaties does she appear. Her face half hidden behind the guitar (pipa) in her arms. 吃得苦中苦,方为人上人。Only if you can stand the hardest of hardships can you hope to rise in society. 是非经过不知难You never know how hard a task is almost until you have done it yourself. 满招损Pride goes before a fall. / Pride spells failure. 适可而止Bind the sack before it be full. 好汉做事好汉当A true man has the courage to accept the consequences of his own actions.知己知彼,百战不殆。To know one’s and the enemy’s situation ensures victory. 牵扯之覆,后车之鉴。The overturned car ahead is a warning to the ones behind. 山雨欲来风满楼The wind sweeping through the tower heralds a rising storm in the mountains. 是故学然后知不足,教然后之困。Therefore, to learn makes us realize our deficiency, and to teach makes us know the difficulties. 人尽其才、地尽其利、物尽其利、货畅其流。Our human, land and material resources should be used to the best advantage, and our goods should be in good circulation. 父母有抚养教育未成年子女的义务,成年子女有赡养扶助父母的义务。Parents have the duty to rear and education their children who are minors, and children who have come of age have the duty to support and assist their parents. 中华人民共和国公民有劳动的权利和义务。Citizens of the P eople’s Republic of China have the right as well as the duty of work. 各民族公民都有用本民族语言文字进行诉讼的权利。Citizens of all nationalities have the right to use the spoken and written languages of their own nationalities in court proceedings.

热点新闻词汇

台风纳沙 Typoon Nesat 中央气象台透露,今年第17号台风“纳沙”于29日7时在海南东部海面加强为强台风,中央气象台于29日9时发布了今年首个台风红色预警。14时30分,强台风“纳沙”在海南省文昌市翁田镇一带登陆,登陆时中心附近最大风力为14级,风速达42米/秒。台风经过地区一片狂风暴雨,四处可见被风刮下的树枝和落叶。 我们来看一段英文报道: A powerful typhoon slammed into China's Hainan Island yesterday after skirting Hong Kong.Typhoon Nesat made landfall on the eastern tip of the island at 2:30pm and was packing winds up to 150 kilometers an hour. Hainan authorities closed schools, suspended ferry services and recalled fishing boats as the storm made its way across the South China Sea from the Philippines, where it killed 35 people and left another 45 missing. 强台风纳沙在掠过香港后于9月29日14时30分在海南岛东端强势登陆,风速达到每小时150公里。 台风纳沙此前在菲律宾造成了35人死亡,45人失踪;此后途经南中国海来袭,海南省政府已经要求学校停课,渡船停航,渔船回港。

常见的检索技术

常见检索技术 作者:陈亚萍学号:1101212925 手工检索(manual retrieval)是一种传统的检索方法,即以手工翻检的方式,利用工具书(包括图书、期刊、目录卡片等)来检索信息的一种检索手段。 与之对应的计算机检索(computer-based retrieval)简称机检,是指利用计算机通过各种数据库查找所需文献信息的方法,检索过程是由人操纵计算机完成的,其匹配是由计算机进行的。在检索过程中,人是整个检索方案的计设者和操纵者。利用机器及计算机,配合以相应的搜索语言和逻辑对相关课题进行检索是检索技术的发展趋势。 检索表达式,又称检索式、检索提问式,是机检中用来表达检索提问的一种逻辑运算 式。构建检索表达式需要用到相关逻辑检索及检索技术。 (一)常用检索方法概述 1.布尔逻辑运算检索——是指利用布尔运算符连接各个检索词,然后由计算机进行相应逻辑 运算,以找出所需信息的方法。它使用面最广、使用频率最高。 2.位置运算检索——位置算符检索是用一些特定的算符(位置算符)来表达检索词与检索词 之间的临近关系,并且可以不依赖主题词表而直接使用自由词进行检索的技术方法。 3.截词检索与词根检索——截词检索是预防漏检提高查全率的一种常用检索技术,大多数系 统都提供截词检索的功能。截词是指在检索词的合适位置进行截断,然后使用截词符进行处理,这样既可节省输入的字符数目,又可达到较高的查全率。词根检索是指输入某一单词,系统会自动匹配与该词具有相同词根的其他词。 4.字段检索——限定如主题、关键词等某个字段进行检索。 5.全文检索——将文件中所有文本与检索项匹配的文字资料检索方法。 6.精确检索——指检索词与结果完全匹配的检索技术。与之对应的模糊检索,则是指检索词 的基础上进行相应的扩展。 7.其他检索技术(禁用词、嵌套、限制词、大小写敏感词等) (二)分述 1.布尔逻辑检索(Boolean retrieval) 乔治·布尔(George Boole,1815年11月-1864年),爱尔兰数学家,哲学家。1848年,布尔出版了T he Mathematical Analysis of Logic,这是他对符号逻辑诸多贡献中的第一次。1854年,他出版了《The Laws of Thought》,这是他最著名的著作。在这本书中布尔介绍了现在以他的名字命名的布尔代数。由于其在符号逻辑运算中的特殊贡献,很多计算机语言中将逻辑运算称为布尔运算,将其结果称为布尔值。布尔逻辑在检索中主要分为与、逻辑或、逻辑非。 (1)逻辑与 示例数据库:CNKI 检索式:智能机器人*控制

翻译高频词汇

大学英语六级翻译高频词汇 小康社会a well-to-do society 人民生活people’s livelihood 生活水平living standards 生活质量quality of life 住房条件housing conditions 文化程度educational level 就业率employment rate 人均收入average income per capita 年平均工资average annual pay 奖金bonus 生活费用cost of living 消费价格指数consumer price index 环境污染指数environment pollution index 衣食住行food, clothing, sheltering and means of traveling 购买力purchasing power 贫困家庭the needy family 贫困地区poverty-stricken region 下岗be laid off 小康relative affluence 安居乐业live a good life 共同富裕shared prosperity 社会保险social insurance 助学金grant-in-aid 赈灾救济金disaster relief funds 人口population 人口分布population distribution 流动人口transient population 城市人口urban population 农业人口agriculture population 出生率birth rate 自然增长率natural growth rate 负增长率negative growth rate 普查census 户口册household register 计划生育family planning/planned parenthood 优生优育ensure good prenatal and postnatal care 自治区autonomous region 民族ethnic groups 少数民族ethnic minorities/ minority peoples 中国共产党Communist Party of China 京剧Peking opera 昆曲Kunqu opera 中国画traditional Chinese painting 人物portrait 山水landscape 花鸟flower and bird 草虫grass and insect 泼墨paint-splashing style 写意impressionistic style 工笔elaborate style 毛笔writing brush 书法calligraphic art 书法家calligraphic artist 楷体formal script/regular script 行书running script 宋体Song-dynasty script 工艺品handwork/handicrafts 手工艺品articles of handcraft art 文物cultural relics/antiques 国宝national treasure 人民大会堂Great Hall of the People 故宫博物馆Imperial Palace Museum 长城Great Wall 外滩the Bund 华山Huashan Mountain 黄山Yellow Mountain 滇池Dianchi Lake 洱海Erhai lake 孔庙Temple of Confucius 故居Former Residence 庐山Lushan Mountain 少林寺Shaolin Temple 长江三峡Three Gorges along the Changjiang 黄果树瀑布Huangguoshu Waterfalls 敦煌莫高窟Dunhuang Mogao Grottoes 大兴安岭Greater Xing’an Mountains 小兴安岭Lesser Xing’an Mountains 天池Heaven’s Pool 布达拉宫Potala Palace

英语新词汇与常用词汇的翻译-N篇

英语新词汇与常用词汇的翻译-N篇 2010年9月 N.Y. 纽约 nab 逮捕 nabe 电影院 nabi 伊斯兰教先知 nabob 印度长官 nabobery 财主去处 nabobess 女财主 nabobism 巨富 Naboth 拿伯 Naboth's vineyard 为别人所垂涎之物 nabs 家伙 nacarat 桔红色 nacelle 引擎机舱 nacre 珠母贝 nacred 真珠质的 nacreous 真珠质的 Naderism 纳德运动 nadir 最低点 nae 不的 naevi 痣 naevus 痔 nag at 唠叨 nag 敦促 nag 老马 nagana 那加那病 nagger 爱唠叨 nagging 唠叨的 naggish 爱唠叨的 nagual 守护神 Nahum 那鸿 naiad 水中仙女 naif 像孩子的 nail a lie to the counter 拆穿西洋镜 nail clippers 指甲钳 nail down to 束缚 nail down 用钉钉住 nail file 指甲锉 nail one's colors to the mast 明确且坚持自己的要求 nail polish 指甲油 nail puller 起钉钳 nail scissors 修甲小剪刀 nail up 钉牢

nail 指甲 nail-biting 束手无策 nail-clippers 指甲刀nailbrush 指甲刷 nailer 敲打工人 nailery 制钉工厂nailhead 钉头 nailhole 钉眼 nailing 敲钉的 nailless 没有指甲的naillike 像指甲的 nailsick 不结实的nainsook 薄棉织物 naira 奈拉 Nairobi 奈洛比naissance 诞生 naive 天真的 naively 天真烂漫地naivete 纯真 naivety 天真烂漫 naked call 无担保承购期权naked eye 肉眼 naked 裸体的 nakedize 成为裸体nakedly 赤裸裸nakedness 裸 naker 定音鼓 Nakhodka 不冻港 naled 二溴磷 namable 可定名的namaste 合十礼namaycush 湖红点鲑namby-pamby 感伤的name after 按...命名name brand 名牌 name it 讲出来 name plate 名牌 name sb for 把...命名为name 名字 name-calling 骂人 name-child 起名 name-drop 抬高身价name-dropping 提高身份nameable 可命名的

英语四级翻译-----热点词汇翻译

专题一中国节日及相关表达 1.春节the Spring Festival / Chinese lunar Near Year 农历正月初一the first day of the first lunar month 农历lunar calendar 年终大扫除year-end household cleaning 春联Spring Festival couplets 年画New Year pictures 剪纸paper-cuts 团圆饭family reunion dinner 饺子dumplings 春晚Spring Festival Gala 守岁stay up late on the New Year’s Eve 除夕Eve of Chinese New Year 辞旧迎新ring out the old year and ring in the new 拜年pay a New Year visit 红包red packets 压岁钱lucky money 放爆竹let off firecrackers 庙会temple fair 禁忌taboo 2.元宵节Lantern Festival 农历正月十五15th day of the first lunar month元宵rice dumplings 花灯festival lantern 灯谜lantern riddle 灯会exhibit of lanterns 烟花fireworks 3.端午节Dragon Boat Festival 农历五月初五5th of the fifth lunar month 粽子traditional Chinese rice-pudding 糯米sticky rice 粽叶bamboo leaves 舞龙dragon dance 舞狮lion dance 踩高跷stilt walking 赛龙舟dragon-boat racing 纪念in memory of 屈原Qu Yuan 诗人poet 忠臣loyal minister 4.清明节Tomb-sweeping Day 寒食节Cold Food Festival 祭拜祖先offer sacrifices to one’s ancestors 踏青go for a spring outing 5.中秋节Mid-Autumn Day / Moon Festival 农历八月十五15th of the eighth lunar month 月饼moon cake

建立文本的检索与计数

1 引言 本程序主要实现文本文件单词的检索与计数,正文包括:对文本文件单词的检索与计数程序的详细要求,对程序的分析,勾画程序思路及内容的流程图,程序代码,程序运行相关的截图,以及我们在本次程序中的详细分工和收获。 1.1课程设计目的 在本程序设计中,主要通过给定位置的串匹配算法,实现文本文件单词的查找,计数和记录单词的位置和行号。在C程序设计中我们对于算法的具体实现过程有一个深刻的理解,除了算法本身外,须借助一些辅助数据结构,在本程序中借用字符串对数据进行存储和输出操作。通过循环比较的方法,查找出单词的个数和位置。同时培养自己的算法设计和算法分析能力,提高综合运用所学的理论知识和方法独立分析和解决问题的能力。训练用系统的观点和软件开发一般规范进行软件开发,培养软件工作者所应具备的工作方法、作风和相互合作的精神。 1.2课程设计内容及要求 要求编程建立一个文本文件,每个单词不包含空格且不跨行,单词由字符序列构成且区分大小写;统计给定单词在文本文件中出现的总次数;检索输出某个单词出现在文本中的行号、在该行中出现的次数以及位置。该设计要求可分为三个部分实现:其一,建立文本文件,文件名由用户用键盘输入;其二,给定单词的计数,输入一个不含空格的单词,统计输出该单词在文本中的出现次数;其三,检索给定单词,输入一个单词,检索并输出该单词所在的行号、该行中出现的次数以及在该行中的相应位置。 (1)建立文本文件。 (2)给定单词的计数。 (3)检索单词出现在文本文件中的行号、次数及其位置。 (4)主控菜单程序的结构。 ①头文件包含。 ②菜单选项包含:建立文件、单词定位、单词计数、退出程序。 ③选择1-4执行相应的操作,其他字符为非法。

相关主题