edu.stanford.nlp.classify
Class FirstNFilter
java.lang.Object
|
+--edu.stanford.nlp.classify.FirstNFilter
- All Implemented Interfaces:
- Filter
- public class FirstNFilter
- extends Object
- implements Filter
This filter is used if you only want to use the first n sentences
in a document.
Constructor Summary |
FirstNFilter(int my_n)
Constructor: my_n is the number of sentences to use. |
Method Summary |
String |
filter(String s)
The filter method takes an unfiltered string and returns
the filtered string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FirstNFilter
public FirstNFilter(int my_n)
- Constructor: my_n is the number of sentences to use.
filter
public String filter(String s)
- The filter method takes an unfiltered string and returns
the filtered string. The commented section can be used to return
only the last n sentences instead of only the first n.
- Specified by:
filter
in interface Filter
Stanford NLP Group