首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Windows上安装Boilerpipe?

如何在Windows上安装Boilerpipe?
EN

Stack Overflow用户
提问于 2012-04-09 20:02:42
回答 1查看 640关注 0票数 0

谁能告诉我如何在windows和Netbeans上使用boilerpipe?如果你能给我一些开始的java代码,我将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2012-04-09 20:20:37

试着看看他们的WikiQuickStart。下面是示例代码...

代码语言:javascript
复制
public static void main(final String[] args) throws Exception {
    URL url;
    url = new URL("http://www.example.com/some-location/index.html");

    // NOTE We ignore HTTP-based character encoding in this demo...
    final InputStream urlStream = url.openStream();
    final InputSource is = new InputSource(urlStream);

    final BoilerpipeSAXInput in = new BoilerpipeSAXInput(is);
    final TextDocument doc = in.getTextDocument();
    urlStream.close();

    // You have the choice between different Extractors

    // System.out.println(DefaultExtractor.INSTANCE.getText(doc));
    System.out.println(ArticleExtractor.INSTANCE.getText(doc));
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10072902

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档