-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved from Ant to Maven. Automatic code formatting (mvn java-formatter:format) Automatic license headers (mvn license:format) Move NekoHTML into private package to prevent dependency collisions. Some cosmetic changes (javadocs). New package name.
- Loading branch information
1 parent
8db67cf
commit c10c4e0
Showing
661 changed files
with
6,925 additions
and
120,355 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.project | ||
.settings | ||
.classpath | ||
target | ||
.DS_Store | ||
dependency-reduced-pom.xml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
boilerpipe | ||
|
||
Copyright (c) 2009, 2014 Christian Kohlschütter | ||
|
||
The author licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
boilerpipe | ||
|
||
Copyright (c) 2009, 2014 Christian Kohlschütter | ||
|
||
The author licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>boilerpipe-common</artifactId> | ||
<packaging>jar</packaging> | ||
<parent> | ||
<groupId>com.kohlschutter.boilerpipe</groupId> | ||
<artifactId>boilerpipe-parent</artifactId> | ||
<version>2.0-SNAPSHOT</version> | ||
</parent> | ||
<name>boilerpipe-common</name> | ||
<properties> | ||
<boilerpipe.parent.base.directory>${project.parent.basedir}</boilerpipe.parent.base.directory> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>xerces</groupId> | ||
<artifactId>xercesImpl</artifactId> | ||
<version>2.9.1</version> | ||
</dependency> | ||
<!-- | ||
<dependency> | ||
<groupId>net.sourceforge.nekohtml</groupId> | ||
<artifactId>nekohtml</artifactId> | ||
<version>1.9.13</version> | ||
</dependency> | ||
--> | ||
<dependency> | ||
<groupId>com.kohlschutter.boilerpipe</groupId> | ||
<artifactId>nekohtml-relocated</artifactId> | ||
<version>1.9.13</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
27 changes: 27 additions & 0 deletions
27
boilerpipe-common/src/main/java/com/kohlschutter/boilerpipe/BoilerpipeDocumentSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* boilerpipe | ||
* | ||
* Copyright (c) 2009, 2014 Christian Kohlschütter | ||
* | ||
* The author licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.kohlschutter.boilerpipe; | ||
|
||
import com.kohlschutter.boilerpipe.document.TextDocument; | ||
|
||
/** | ||
* Something that can be represented as a {@link TextDocument}. | ||
*/ | ||
public interface BoilerpipeDocumentSource { | ||
TextDocument toTextDocument() throws BoilerpipeProcessingException; | ||
} |
65 changes: 65 additions & 0 deletions
65
boilerpipe-common/src/main/java/com/kohlschutter/boilerpipe/BoilerpipeExtractor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* boilerpipe | ||
* | ||
* Copyright (c) 2009, 2014 Christian Kohlschütter | ||
* | ||
* The author licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.kohlschutter.boilerpipe; | ||
|
||
import java.io.Reader; | ||
|
||
import org.xml.sax.InputSource; | ||
|
||
import com.kohlschutter.boilerpipe.document.TextDocument; | ||
|
||
/** | ||
* Describes a complete filter pipeline. | ||
*/ | ||
public interface BoilerpipeExtractor extends BoilerpipeFilter { | ||
/** | ||
* Extracts text from the HTML code given as a String. | ||
* | ||
* @param html The HTML code as a String. | ||
* @return The extracted text. | ||
* @throws BoilerpipeProcessingException | ||
*/ | ||
public String getText(final String html) throws BoilerpipeProcessingException; | ||
|
||
/** | ||
* Extracts text from the HTML code available from the given {@link InputSource}. | ||
* | ||
* @param is The InputSource containing the HTML | ||
* @return The extracted text. | ||
* @throws BoilerpipeProcessingException | ||
*/ | ||
public String getText(final InputSource is) throws BoilerpipeProcessingException; | ||
|
||
/** | ||
* Extracts text from the HTML code available from the given {@link Reader}. | ||
* | ||
* @param r The Reader containing the HTML | ||
* @return The extracted text. | ||
* @throws BoilerpipeProcessingException | ||
*/ | ||
public String getText(final Reader r) throws BoilerpipeProcessingException; | ||
|
||
/** | ||
* Extracts text from the given {@link TextDocument} object. | ||
* | ||
* @param doc The {@link TextDocument}. | ||
* @return The extracted text. | ||
* @throws BoilerpipeProcessingException | ||
*/ | ||
public String getText(TextDocument doc) throws BoilerpipeProcessingException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.