字计数器 [英] word counter

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

问题描述

我是java和编程的新手,需要一些程序的帮助。我正在尝试编写一个计算文档中单词和音节的程序。我正在浏览API,但无法找到任何名为Word counter的内容。我还需要一些可以计算句子的东西。任何想法或建议将不胜感激。非常感谢!


Eben

Hi, I''m pretty new to java and programming and need some help with a program. I am trying to write a program that counts the words and syllables in a document. I was browsing through the API, but was unable to find anything caled "Word counter." I also need something that can count the sentences. Any ideas or suggestions would be greatly appreciated. Thanks so much!

Eben

推荐答案

您需要自己动手。你需要逐行读取文件并确定该行中有多少单词。
You will need to do this yourself. You need to read in the file line by line and determine how many words are in that line.



我很漂亮java和编程新手,需要一些程序帮助。我正在尝试编写一个计算文档中单词和音节的程序。我正在浏览API,但无法找到任何名为Word counter的内容。我还需要一些可以计算句子的东西。任何想法或建议将不胜感激。非常感谢!


Eben
Hi, I''m pretty new to java and programming and need some help with a program. I am trying to write a program that counts the words and syllables in a document. I was browsing through the API, but was unable to find anything caled "Word counter." I also need something that can count the sentences. Any ideas or suggestions would be greatly appreciated. Thanks so much!

Eben



查看此代码。


< snip>


不要用勺子代码。


Jos

Have a look at this code.

<snip>

Don''t spoonfeed code.

Jos


@ OP:对于大多数西欧语言来说,音节部分非常难以实现。你确定要的吗?


亲切的问候,


Jos
@OP: For most West European languages the syllables part is extremely difficult
to implement. Are you sure you want that?

kind regards,

Jos


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

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