public class PatternsForEachTokenInMemory<E extends Pattern> extends PatternsForEachToken<E>
| Modifier and Type | Field and Description |
|---|---|
static ConcurrentHashMap<String,Map<Integer,Set<? extends Pattern>>> |
patternsForEachToken |
| Constructor and Description |
|---|
PatternsForEachTokenInMemory(Properties props) |
PatternsForEachTokenInMemory(Properties props,
Map<String,Map<Integer,Set<E>>> pats) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPatterns(Map<String,Map<Integer,Set<E>>> pats) |
void |
addPatterns(String sentId,
Map<Integer,Set<E>> patterns) |
void |
close() |
boolean |
containsSentId(String sentId) |
void |
createIndexIfUsingDBAndNotExists() |
Map<String,Map<Integer,Set<E>>> |
getPatternsForAllTokens(Collection<String> sampledSentIds) |
Map<Integer,Set<E>> |
getPatternsForAllTokens(String sentId) |
void |
load(String allPatternsDir) |
boolean |
save(String dir) |
void |
setupSearch() |
int |
size() |
getPatternsInstance, getStoreWay, updatePatternspublic PatternsForEachTokenInMemory(Properties props, Map<String,Map<Integer,Set<E>>> pats)
public PatternsForEachTokenInMemory(Properties props)
public void addPatterns(String sentId, Map<Integer,Set<E>> patterns)
addPatterns in class PatternsForEachToken<E extends Pattern>public void addPatterns(Map<String,Map<Integer,Set<E>>> pats)
addPatterns in class PatternsForEachToken<E extends Pattern>public Map<Integer,Set<E>> getPatternsForAllTokens(String sentId)
getPatternsForAllTokens in class PatternsForEachToken<E extends Pattern>public void setupSearch()
setupSearch in class PatternsForEachToken<E extends Pattern>public Map<String,Map<Integer,Set<E>>> getPatternsForAllTokens(Collection<String> sampledSentIds)
getPatternsForAllTokens in class PatternsForEachToken<E extends Pattern>public void close()
close in class PatternsForEachToken<E extends Pattern>public void load(String allPatternsDir)
load in class PatternsForEachToken<E extends Pattern>public boolean save(String dir)
save in class PatternsForEachToken<E extends Pattern>public void createIndexIfUsingDBAndNotExists()
createIndexIfUsingDBAndNotExists in class PatternsForEachToken<E extends Pattern>public boolean containsSentId(String sentId)
public int size()