Permalink
Browse files

Added support for ArticleSentencesExtractor

  • Loading branch information...
1 parent 6a7118d commit 4543754746c29762f1cdd5e73dcd0cec4b887c2b @tomazk committed Jul 25, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −1 README.rst
  2. +4 −1 TextExtrApi/app/controllers/BoilerpipeController.java
View
@@ -28,7 +28,7 @@ Boilerpipe API
**params:**
-* ``extractorType`` : ``(article|default)``
+* ``extractorType`` : ``(article|default|sentence)``
* ``rawHtml`` : html content
**JSON response format:**
@@ -8,6 +8,7 @@
import de.l3s.boilerpipe.extractors.ExtractorBase;
import de.l3s.boilerpipe.extractors.DefaultExtractor;
import de.l3s.boilerpipe.extractors.ArticleExtractor;
+import de.l3s.boilerpipe.extractors.ArticleSentencesExtractor;
import de.l3s.boilerpipe.BoilerpipeProcessingException;
import utils.BoilerpipeResponseData;
@@ -25,7 +26,7 @@ public static void extract(
String rawHtml,
@Required(message = "extractorType is required")
- @Match(value = "default|article", message = "unknown extractor type")
+ @Match(value = "default|article|sentence", message = "unknown extractor type")
String extractorType
){
@@ -52,6 +53,8 @@ public static void extract(
extractor = DefaultExtractor.getInstance();
if(extractorType.equals("article"))
extractor = ArticleExtractor.getInstance();
+ if(extractorType.equals("sentence"))
+ extractor = ArticleSentencesExtractor.getInstance();
// extract
try {

0 comments on commit 4543754

Please sign in to comment.