--- src/plugin/summary-basic/src/java/org/apache/nutch/summary/basic/BasicSummarizer.java.orig	2006-05-20 02:20:51.000000000 +0200
+++ src/plugin/summary-basic/src/java/org/apache/nutch/summary/basic/BasicSummarizer.java	2006-06-02 17:47:26.000000000 +0200
@@ -285,7 +285,9 @@
    * </implementation:Summarizer> *
    * ---------------------------- */
   
-  
+  /** Maximun number of tokens inspect in a summary . */
+  private static final int token_deep = 2000;
+
   /**
    * Class Excerpt represents a single passage found in the document, with some
    * appropriate regions highlit.
@@ -354,7 +356,7 @@
     ArrayList result = new ArrayList();
     TokenStream ts = analyzer.tokenStream("content", new StringReader(text));
     Token token = null;
-    while (true) {
+    while (result.size()<token_deep) {
       try {
         token = ts.next();
       } catch (IOException e) {
