Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/393.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在Windows上安装Boilerpipe?_Java_Netbeans_Web Scraping_Web Mining_Boilerpipe - Fatal编程技术网

Java 如何在Windows上安装Boilerpipe?

Java 如何在Windows上安装Boilerpipe?,java,netbeans,web-scraping,web-mining,boilerpipe,Java,Netbeans,Web Scraping,Web Mining,Boilerpipe,有人能告诉我如何在带有Netbeans的windows上使用boilerpipe吗?如果您能给我一些java代码作为开始,我将不胜感激。试着看看他们和他们的。下面的示例代码 public static void main(final String[] args) throws Exception { URL url; url = new URL("http://www.example.com/some-location/index.html"); // NOTE We

有人能告诉我如何在带有Netbeans的windows上使用boilerpipe吗?如果您能给我一些java代码作为开始,我将不胜感激。

试着看看他们和他们的。下面的示例代码

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));
}