Topic: 问两个文件处理问题

  Print this page

1.问两个文件处理问题 Copy to clipboard
Posted by: mj117
Posted on: 2005-05-04 11:01

工作任务:编程String getfile( string filename)、Arraylist extractsentence(arraylist sentencecontent)
String getfile( string filename);
//功能:文本预处理:处理为只包含文字的文本,去掉html的标记语言。
//1打开网页文本文件,加载进内存;
//2 对文本进行替换,将非文字的部分处理:将”<…>”全部替换为”%”, “ ”替换为空格。
Arraylist getsentence(string filecontent);
//功能:将处理后的文本断句。
//1 将“。 ; ? ! 空格”等作为句子的终结点,从文本文件中截取句子。
//2 把截取的句子放入动态数组。
请问这两个功能用java怎么实现,谁有源代码

2.Re:问两个文件处理问题 [Re: mj117] Copy to clipboard
Posted by: ftang
Posted on: 2005-05-04 23:21

don't even ask source code...even I have I won't give to you...give u some hint: the "Regular Expression" --- If you are using JAVA 1.5 you will have in the package, otherwise, Apache have one....again...as a beginner...
"Ask for Help, Don't ask for answer!"

3.Re:问两个文件处理问题 [Re: ftang] Copy to clipboard
Posted by: why
Posted on: 2005-05-05 01:16

ftang wrote:
he "Regular Expression" --- If you are using JAVA 1.5 you will have in the package, otherwise, Apache have one....again...as a beginner...
"Ask for Help, Don't ask for answer!"

It is available since JDK 1.4.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/package-summary.html

Java Tutorial - Lesson: Regular Expressions
http://java.sun.com/docs/books/tutorial/extra/regex/

"Ask for Help, Don't ask for answer!" Thumbs up

4.Re:问两个文件处理问题 [Re: mj117] Copy to clipboard
Posted by: ftang
Posted on: 2005-05-05 01:22

right....hehe...I forgot....my mistake....alway use apache one...


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923