From a056cfbf128caddf01547d0a4e0c530632fc85d2 Mon Sep 17 00:00:00 2001 From: Cary__Xx Date: Wed, 30 Oct 2019 23:32:15 +0800 Subject: [PATCH] Fix release --- .../seedu/address/logic/search/AutoComplete.java | 8 ++------ src/main/resources/data/vocabulary.txt | 13 +++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/java/seedu/address/logic/search/AutoComplete.java b/src/main/java/seedu/address/logic/search/AutoComplete.java index 6a32556be3a..d3f045a70dc 100644 --- a/src/main/java/seedu/address/logic/search/AutoComplete.java +++ b/src/main/java/seedu/address/logic/search/AutoComplete.java @@ -36,13 +36,9 @@ public AutoComplete() { private static Word[] importDictionary(InputStream is) { Word[] queries = null; try { - is.mark(0); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); - int lines = 0; - while (reader.readLine() != null) { - lines++; - } - is.reset(); + int lines = Integer.parseInt(reader.readLine()); + queries = new Word[lines]; for (int i = 0; i < lines; i++) { String line = reader.readLine(); diff --git a/src/main/resources/data/vocabulary.txt b/src/main/resources/data/vocabulary.txt index 5a37472c07e..26faf7a5304 100644 --- a/src/main/resources/data/vocabulary.txt +++ b/src/main/resources/data/vocabulary.txt @@ -1,3 +1,4 @@ +97 1000 add 1000 clear 1000 delete @@ -10,6 +11,8 @@ 1000 view 1000 undo 1000 redo +1000 listbudgets +1000 editBudget 100 n/ 100 a/ 100 d/ @@ -83,3 +86,13 @@ 100 ILS 100 KRW 100 PLN +100 coffee +100 textbook +100 food +100 education +100 school +100 breakfast +100 lunch +100 dinner +100 travel +100 hangout