Skip to content

Commit

Permalink
Merge a056cfb into d2c7b95
Browse files Browse the repository at this point in the history
  • Loading branch information
Cary-Xx committed Oct 30, 2019
2 parents d2c7b95 + a056cfb commit 3ac375b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/seedu/address/logic/search/AutoComplete.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/data/vocabulary.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
97
1000 add
1000 clear
1000 delete
Expand All @@ -10,6 +11,8 @@
1000 view
1000 undo
1000 redo
1000 listbudgets
1000 editBudget
100 n/
100 a/
100 d/
Expand Down Expand Up @@ -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

0 comments on commit 3ac375b

Please sign in to comment.