Loading CheckerCorrector/Checker.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ public class Checker { public static void main(String[] args) { //DirectedGraph<State> graph = new DirectedGraph<>(); ArgumentParser argPars = ArgumentParser.of(args); ArgumentParser argPars = ArgumentParser.of(args, "Checker"); BasicGraph basicGraphClass = new BasicGraph(); DBinterface dbInterface; if(!argPars.isDutch()){ Loading CheckerCorrector/Corrector.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ public class Corrector implements GUIListener { public static void main(String[] args) { //DirectedGraph<State> graph = new DirectedGraph<>(); ArgumentParser argPars = ArgumentParser.of(args); ArgumentParser argPars = ArgumentParser.of(args, "Corrector"); BasicGraph basicGraphClass = new BasicGraph(); DBinterface dbInterface; WordPairDatabase wordPairDatabase; Loading CheckerCorrector/HashTableMaker/HashTableMaker.java +3 −2 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class HashTableMaker { } public void updateDatabase(String phrase) throws SQLException, NoSuchAlgorithmException { phrase = phrase.replaceAll("[,.]", ""); String hash = generateHash(phrase); PreparedStatement selectStatement = connection.prepareStatement("SELECT count FROM hashes WHERE hash = ?"); Loading @@ -53,10 +54,9 @@ public class HashTableMaker { updateStatement.setString(2, hash); updateStatement.executeUpdate(); } else { PreparedStatement insertStatement = connection.prepareStatement("INSERT INTO hashes (hash, count, phrase) VALUES (?, ?, ?)"); PreparedStatement insertStatement = connection.prepareStatement("INSERT INTO hashes (hash, count) VALUES (?, ?)"); insertStatement.setString(1, hash); insertStatement.setInt(2, 1); insertStatement.setString(3, phrase); insertStatement.executeUpdate(); } } Loading Loading @@ -95,6 +95,7 @@ public class HashTableMaker { } public int getCountForSentence(String sentence) throws SQLException, NoSuchAlgorithmException { sentence = sentence.replaceAll("[,.]", ""); String hash = generateHash(sentence); PreparedStatement selectStatement = connection.prepareStatement("SELECT count FROM hashes WHERE hash = ?"); Loading CheckerCorrector/SQLite/hash_database_dutch.db +2.21 MiB (2.31 MiB) File changed.No diff preview for this file type. View original file View changed file CheckerCorrector/SQLite/hash_database_english.db +896 KiB (2.54 MiB) File changed.No diff preview for this file type. View original file View changed file Loading
CheckerCorrector/Checker.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ public class Checker { public static void main(String[] args) { //DirectedGraph<State> graph = new DirectedGraph<>(); ArgumentParser argPars = ArgumentParser.of(args); ArgumentParser argPars = ArgumentParser.of(args, "Checker"); BasicGraph basicGraphClass = new BasicGraph(); DBinterface dbInterface; if(!argPars.isDutch()){ Loading
CheckerCorrector/Corrector.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ public class Corrector implements GUIListener { public static void main(String[] args) { //DirectedGraph<State> graph = new DirectedGraph<>(); ArgumentParser argPars = ArgumentParser.of(args); ArgumentParser argPars = ArgumentParser.of(args, "Corrector"); BasicGraph basicGraphClass = new BasicGraph(); DBinterface dbInterface; WordPairDatabase wordPairDatabase; Loading
CheckerCorrector/HashTableMaker/HashTableMaker.java +3 −2 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class HashTableMaker { } public void updateDatabase(String phrase) throws SQLException, NoSuchAlgorithmException { phrase = phrase.replaceAll("[,.]", ""); String hash = generateHash(phrase); PreparedStatement selectStatement = connection.prepareStatement("SELECT count FROM hashes WHERE hash = ?"); Loading @@ -53,10 +54,9 @@ public class HashTableMaker { updateStatement.setString(2, hash); updateStatement.executeUpdate(); } else { PreparedStatement insertStatement = connection.prepareStatement("INSERT INTO hashes (hash, count, phrase) VALUES (?, ?, ?)"); PreparedStatement insertStatement = connection.prepareStatement("INSERT INTO hashes (hash, count) VALUES (?, ?)"); insertStatement.setString(1, hash); insertStatement.setInt(2, 1); insertStatement.setString(3, phrase); insertStatement.executeUpdate(); } } Loading Loading @@ -95,6 +95,7 @@ public class HashTableMaker { } public int getCountForSentence(String sentence) throws SQLException, NoSuchAlgorithmException { sentence = sentence.replaceAll("[,.]", ""); String hash = generateHash(sentence); PreparedStatement selectStatement = connection.prepareStatement("SELECT count FROM hashes WHERE hash = ?"); Loading
CheckerCorrector/SQLite/hash_database_dutch.db +2.21 MiB (2.31 MiB) File changed.No diff preview for this file type. View original file View changed file
CheckerCorrector/SQLite/hash_database_english.db +896 KiB (2.54 MiB) File changed.No diff preview for this file type. View original file View changed file