public abstract class SentenceIndex<E extends Pattern> extends Object
| Constructor and Description |
|---|
SentenceIndex(Set<String> stopWords,
java.util.function.Function<CoreLabel,Map<String,String>> transformCoreLabeltoString) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
add(List<CoreLabel> value,
String sentId,
boolean addProcessedText) |
abstract void |
add(Map<String,DataInstance> sents,
boolean addProcessedText)
addProcessedText is true when inserting sentences for the first time
|
static SentenceIndex |
createIndex(Class<? extends SentenceIndex> indexClass,
Map<String,List<CoreLabel>> sents,
Properties props,
Set<String> stopWords,
String indexDirectory,
java.util.function.Function<CoreLabel,Map<String,String>> transformCoreLabeltoString) |
abstract void |
finishUpdating() |
static SentenceIndex |
loadIndex(Class<? extends SentenceIndex> indexClass,
Properties props,
Set<String> stopWords,
String indexDirectory,
java.util.function.Function<CoreLabel,Map<String,String>> transformCoreLabeltoString) |
abstract Map<E,Set<String>> |
queryIndex(Collection<E> Es) |
abstract void |
saveIndex(String dir) |
void |
setUp(Properties props) |
int |
size() |
abstract void |
update(List<CoreLabel> value,
String key) |
public int size()
public abstract void add(Map<String,DataInstance> sents, boolean addProcessedText)
sents - addProcessedText - public static SentenceIndex createIndex(Class<? extends SentenceIndex> indexClass, Map<String,List<CoreLabel>> sents, Properties props, Set<String> stopWords, String indexDirectory, java.util.function.Function<CoreLabel,Map<String,String>> transformCoreLabeltoString)
public void setUp(Properties props)
public abstract void finishUpdating()
public abstract void saveIndex(String dir)
public static SentenceIndex loadIndex(Class<? extends SentenceIndex> indexClass, Properties props, Set<String> stopWords, String indexDirectory, java.util.function.Function<CoreLabel,Map<String,String>> transformCoreLabeltoString)