计算双字母的数量 [英] to count the number of bigrams

查看:81
本文介绍了计算双字母的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我已经完成了一个计算bigrams数量的程序。

i使用@ARGV [0]获取输入文件,然后使用文件中的行数,使用分裂函数我将句子分割并将其推入一个数组中。并计算该单词重复的次数。同样,这是单个单词,同样我已经从数组中配对两个单词,现在我想计算数字发生这种情况,请帮我解决这个问题..........代码就在这里。


展开 | 选择 | Wrap | 行号

解方案
胡迈德,


正是在这个网站上常见的做法是,当你发布代码到代码标记应围绕你的代码的论坛。我已将它们添加到此帖中。这是我第二次为你做这件事。我想在此之后,请您努力将代码标签应用到帖子中的代码中。


如果您不知道如何使用它们,请参阅REPLY GUIDELINES"发布窗口右侧。


问候,


杰夫


humaid,


这个学校或课程是否有某种功能?


好吧,考虑到他的上一篇文章,他说他被告知要做。该计划,我会说他正在做的所有事情都与学校有关。


问候,


Jeff


hi,guys i have done a program to count the number of bigrams.
i have taken a input file by using @ARGV[0],then icounted the number of lines in the file,using the split function i splited the sentence and pushed it in an array.and counted how many times the word is repeated.similarly,this is for single word,similarly i have paired two words from the array,and now i want to count the number of occurence of this,please help me out of this..........the code is here.


Expand|Select|Wrap|Line Numbers

解决方案

Humaid,

It is common practice on this site that when you post code to the forums that code tags should surround your code. I have added them to this post for you. This is the second time I have done this for you. I ask that after this, you please diligently apply the code tags to the code in your posts.

If you do not know how to use them, please refer to the "REPLY GUIDELINES" to the right of the posting window.

Regards,

Jeff


humaid,

Is this school or course work of some kind?


Well, considering in his last post that he said he was "told to do" the program, I would say that all the stuff he is doing is school related.

Regards,

Jeff


这篇关于计算双字母的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆