登录
首页 » 算法 » java统计单词

java统计单词

于 2022-05-10 发布 文件大小:1.88 kB
0 172
下载积分: 2 下载次数: 1

代码说明:

资源描述 本java程序实现:统计文章中单词出现的次数,并显示出现过的行号。 程序功能实现方式如下: 1.输入一行,对行号计数(也可一次输入全部文本,对行号计数) 2.为一行里的单词建立一个临时的数组,遍历每一个单词:若在单词表中没有,添加进入单词表(word + count +line); 若存在,个数加一(对应word的count++,line加上当前行号)。 3.输出单词表。 属性列名,word:单词;  count:出现次数;   line:出现行数

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • ColorStatistics
    ColorStatistics 可以统计图像中的颜色数和百分比,对于图像统计分析很有意义。而且计算速度非常快,700多的图像几个毫秒吧。
    2022-03-07 14:08:29下载
    积分:1
  • Numerical experiments dichotomy of personal computers Number experimental report...
    数值分析实验二分法的个人编写的实验报告号电脑促进吸收大跨度-Numerical experiments dichotomy of personal computers Number experimental report prepared for absorption of large-span
    2022-02-27 04:27:40下载
    积分:1
  • massive mimo THP algrorithm
    应用背景On the Design of ZF and MMSE Tomlinson-Harashima Precoding in Multiuser MIMO Amplify-and-Forward Relay System,it is main described the mimo system in the multi-user  scenario.the main precoding algrithm is combined the zf precoding and the MMSE precoding.关键技术we design a zero-forcing (ZF) Tomlinson-Harashima precoding (THP) and a minimum mean square error (MMSE) THP for multiuser MIMO relay system with direct link. Based on these precoding structures, we propose the optimal combining weights of the ZF THP and the MMSE THP in half duplex relay system, and the sub-optimal weights of MMSE THP to reduce feedback channel state information(CSI). Through the Monte Carlo simulation, we verify that the optimal weights combining method outperforms the constant weights combining method. In addition, we confirm that the performance of the sub-optimal weights combining method is&
    2023-02-25 18:10:03下载
    积分:1
  • 经典之换位和工作安排
    经典算法之换位和工作安排-classic algorithms transposition and organization of work
    2022-07-26 11:58:56下载
    积分:1
  • 二进制搜索 java 代码
    导入 java.util.* ;类 BinarySearch{int [] ;无效的 get){扫描仪 sc = 新的 Scanner(System.in) ;System.out.println ("输入 no。元素") ;= 新 int[sc.nextInt()] ;System.out.println ("输入元素") ;为 (int 我 = 0 ; 我 < a.length;i++)a[i]=sc.nextInt() ;}int binarySearch (int n){int 低 = 0 ;int high=a.length-1 ;虽然 (低 < = 高){int 中期 =(low+high)/2 ;if(a[mid]==n)返回 (中期) ;if(n = 1 & & a [j-1] > t; j — —)[j] = [j-1] ;[j] = t ;}}空 display(){System.out.println ("给定的列表是") ;为 (int 我 = 0 ; 我 < a.length;i++)System.out.print ([i] +"") ;System.out.println() ;
    2023-01-30 23:10:03下载
    积分:1
  • 压缩感知源程序
    压缩感知,非常有用的源程序,想学压缩感知的同学们需要注意了,此程序非常具有实用和研究的价值。此程序是用小波基进行稀疏,用OMP算法进行重构,效果好,对刚入门研究压缩感知的同学价值比较大。
    2022-02-11 10:34:08下载
    积分:1
  • 内部排序性能分析
    在本系统中,通过编码用C语言实现测试程序对常见的六种排序算法性能从比较次数、移动次数和消耗时间方面进行了对比,分析数据得出结论,为在实际应用中选择合适排序算法提供了实验依据。实现功能:排序演示模块:直接排序算法、起泡排序算法、选择排序算法、快速排序算法、希尔排序算法、堆排序算法排序对比模块:直接排序算法、起泡排序算法、选择排序算法、快速排序算法、希尔排序算法、堆排序算法
    2022-03-17 12:03:49下载
    积分:1
  • Fortran:四种方求积分
    这个是Fortran求积分的源代码,包括高斯五点法,高斯三点法,抛物线法,梯形法。希望能对大家有帮助。
    2023-05-07 06:10:02下载
    积分:1
  • GA-PSO 混合解决TSP问题
    资源描述TSP问题是一个NP难题,因PSO算法具有算法相对简单等特性借用BPSO来解决TSP问题,因此借鉴遗传算法的交叉运算,用基本粒子群算法中的学习因子来限制速度,依据选取当前速度值的概率(在算法中借用惯性系数w来实现)与rand(0,1)进行比较得到离散速度变量
    2023-03-31 07:45:04下载
    积分:1
  • 多模式匹配
    通信基础应用中的关键字过滤,多模式匹配算法整理。该算法为精确匹配,如匹配字段为用户的uri,对于用户数据中的uri内容,对其进行多模式匹配算法,可以很快找到该uri的特征(是什么类型的网站,网站名称,所属位置等)
    2022-02-01 20:03:27下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载