Reading the first sentence
I have a program that reads news from yahoo. what I want to do is just read the first sentence from each paragraph. I dont want to store it in a file but do it at the same time that I read it from the internet. How do I do this? Any help.
[238 byte] By [
Game] at [2007-11-11 7:55:03]

# 3 Re: Reading the first sentence
after you have the paragraph parsed from the html, just use the String commands.
String paragraph;
//parse HTML
String sentence = paragraph.substring(0,paragraph.indexOf("."));
# 4 Re: Reading the first sentence
after you have the paragraph parsed from the html, just use the String commands.
String paragraph;
//parse HTML
String sentence = paragraph.substring(0,paragraph.indexOf("."));
What if paragraph is "I walked over to Mr. Smith."? Also, that will leave out the period. substring is inclusive of the first argument, exclusive of the second.
destin at 2007-11-11 22:39:59 >

# 5 Re: Reading the first sentence
I just used BreakIterator class and it works fine giving sentences separately.
But how can I identify when a new paragraph comes. breakiterator class still has some disadvantage when there is a country name such as U.S. comes in between. it identifies it as a new sentence.
Any ideas to overcome these problems.
Game at 2007-11-11 22:41:09 >

# 7 Re: Reading the first sentence
Hehe,It's really a hard stuff.We don't know the rule of the news.
Maybe you can ask the Supportor of the yahoo for a help,I think they should have API for java.
JAVA EMAIL VERIFY
http://www.wisesoft.biz/