简体   繁体   中英

How to extract sentence from web pages

I would like to extract sentences (not just an html-stripped text) from web pages. I wonder if such functionality is supported by popular HTML parsing libraries such as Jsoup?

Thanks,

Edit :

Sorry if the post was not clear. I need natural language sentences so not necessarily separated by a dot.

Thanks everyone. I just found this library http://alias-i.com/lingpipe/demos/tutorial/sentences/read-me.html and it seems exactly what I want.

JSoup确实提供了一个非常方便的API提取处理 data ...是的,它确实提供了此功能...

您可以使用jquery

var t = $('p').text();
var sentences = t.split('.');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM