public class PatternsForEachTokenDB<E extends Pattern> extends PatternsForEachToken<E>
| Modifier and Type | Field and Description |
|---|---|
static int |
LARGE_BATCH |
static int |
MEDIUM_BATCH |
static int |
SINGLE_BATCH |
static int |
SMALL_BATCH |
| Constructor and Description |
|---|
PatternsForEachTokenDB(Properties props) |
PatternsForEachTokenDB(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 id,
Map<Integer,Set<E>> p) |
void |
close() |
boolean |
containsSentId(String sentId) |
void |
createIndexIfUsingDBAndNotExists() |
void |
createUpsertFunction() |
void |
createUpsertFunctionPatternIndex() |
boolean |
DBTableExists() |
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 static final int SINGLE_BATCH
public static final int SMALL_BATCH
public static final int MEDIUM_BATCH
public static final int LARGE_BATCH
public PatternsForEachTokenDB(Properties props, Map<String,Map<Integer,Set<E>>> pats)
public PatternsForEachTokenDB(Properties props)
public void addPatterns(Map<String,Map<Integer,Set<E>>> pats)
addPatterns in class PatternsForEachToken<E extends Pattern>public void addPatterns(String id, Map<Integer,Set<E>> p)
addPatterns in class PatternsForEachToken<E extends Pattern>public void createUpsertFunction()
public void createUpsertFunctionPatternIndex()
throws SQLException
SQLExceptionpublic Map<Integer,Set<E>> getPatternsForAllTokens(String sentId)
getPatternsForAllTokens in class PatternsForEachToken<E extends Pattern>public boolean save(String dir)
save in class PatternsForEachToken<E extends Pattern>public void setupSearch()
setupSearch in class PatternsForEachToken<E extends Pattern>public boolean containsSentId(String sentId)
public void createIndexIfUsingDBAndNotExists()
createIndexIfUsingDBAndNotExists in class PatternsForEachToken<E extends Pattern>public boolean DBTableExists()
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 int size()