edu.stanford.nlp.ling.tokensregex
Class SequenceMatchRules.SequencePatternExtractRule<T,O>

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.SequenceMatchRules.SequencePatternExtractRule<T,O>
All Implemented Interfaces:
SequenceMatchRules.ExtractRule<java.util.List<? extends T>,O>, Function<java.util.List<? extends T>,O>
Enclosing class:
SequenceMatchRules

public static class SequenceMatchRules.SequencePatternExtractRule<T,O>
extends java.lang.Object
implements SequenceMatchRules.ExtractRule<java.util.List<? extends T>,O>, Function<java.util.List<? extends T>,O>


Constructor Summary
SequenceMatchRules.SequencePatternExtractRule(Env env, java.lang.String regex, Function<SequenceMatchResult<T>,O> extractor)
           
SequenceMatchRules.SequencePatternExtractRule(SequencePattern<T> p, Function<SequenceMatchResult<T>,O> extractor)
           
SequenceMatchRules.SequencePatternExtractRule(SequencePattern<T> p, Function<SequenceMatchResult<T>,O> extractor, SequenceMatcher.FindType findType, boolean matchWithResult)
           
 
Method Summary
 O apply(java.util.List<? extends T> seq)
          Converts a T1 to a different T2.
 boolean extract(java.util.List<? extends T> seq, java.util.List<O> out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceMatchRules.SequencePatternExtractRule

public SequenceMatchRules.SequencePatternExtractRule(Env env,
                                                     java.lang.String regex,
                                                     Function<SequenceMatchResult<T>,O> extractor)

SequenceMatchRules.SequencePatternExtractRule

public SequenceMatchRules.SequencePatternExtractRule(SequencePattern<T> p,
                                                     Function<SequenceMatchResult<T>,O> extractor)

SequenceMatchRules.SequencePatternExtractRule

public SequenceMatchRules.SequencePatternExtractRule(SequencePattern<T> p,
                                                     Function<SequenceMatchResult<T>,O> extractor,
                                                     SequenceMatcher.FindType findType,
                                                     boolean matchWithResult)
Method Detail

extract

public boolean extract(java.util.List<? extends T> seq,
                       java.util.List<O> out)
Specified by:
extract in interface SequenceMatchRules.ExtractRule<java.util.List<? extends T>,O>

apply

public O apply(java.util.List<? extends T> seq)
Description copied from interface: Function
Converts a T1 to a different T2. For example, a Parser will convert a Sentence to a Tree. A Tagger will convert a Sentence to a TaggedSentence.

Specified by:
apply in interface Function<java.util.List<? extends T>,O>
Parameters:
seq - The function's argument
Returns:
The function's evaluated value


Stanford NLP Group