Skip to content

Instantly share code, notes, and snippets.

@damianoporta
Created December 18, 2015 15:00
Show Gist options
  • Save damianoporta/64940416085bbb507e0b to your computer and use it in GitHub Desktop.
Save damianoporta/64940416085bbb507e0b to your computer and use it in GitHub Desktop.
private HashMap<String, List<String>> finderRegex;
public void loadRegexExtractor() throws SQLException {
Connection conn = this.connectionPool.getConnection();
ResultSet rs = conn.createStatement().executeQuery("select * from regex where ner='extractor'");
while (rs.next()) {
List<String>> listaNuova = finderRegex.get(rs.getString("model"));
listaNuova.add(rs.getString("pattern"));
finderRegex.put(rs.getString("model"), listaNuova);
}
conn.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment