org.cogroo.tools.sentdetect
Class PortugueseSDContextGenerator
java.lang.Object
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.
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
-
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.