org.cogroo.tools.sentdetect
Class PortugueseSDContextGenerator

java.lang.Object
  extended by org.cogroo.tools.sentdetect.PortugueseSDContextGenerator
All Implemented Interfaces:
opennlp.tools.sentdetect.SDContextGenerator

public class PortugueseSDContextGenerator
extends Object
implements opennlp.tools.sentdetect.SDContextGenerator

Generate event contexts for maxent decisions for sentence detection.


Constructor Summary
PortugueseSDContextGenerator(char[] eosCharacters)
          Creates a new SDContextGenerator instance with no induced abbreviations.
PortugueseSDContextGenerator(Set<String> inducedAbbreviations, char[] eosCharacters)
          Creates a new SDContextGenerator instance which uses the set of induced abbreviations.
 
Method Summary
 String[] getContext(CharSequence sb, int position)
           
 List<String> getSentenceContext(String sentence, int index)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortugueseSDContextGenerator

public PortugueseSDContextGenerator(char[] eosCharacters)
Creates a new SDContextGenerator instance with no induced abbreviations.

Parameters:
eosCharacters -

PortugueseSDContextGenerator

public PortugueseSDContextGenerator(Set<String> inducedAbbreviations,
                                    char[] eosCharacters)
Creates a new SDContextGenerator instance which uses the set of induced abbreviations.

Parameters:
inducedAbbreviations - a Set of Strings representing induced abbreviations in the training data. Example: "Mr."
eosCharacters -
Method Detail

getContext

public String[] getContext(CharSequence sb,
                           int position)
Specified by:
getContext in interface opennlp.tools.sentdetect.SDContextGenerator

getSentenceContext

public List<String> getSentenceContext(String sentence,
                                       int index)


Copyright © 2012-2013 CoGrOO. All Rights Reserved.