Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Normalizing articles
  • Loading branch information
cxchu committed May 10, 2017
1 parent 7b768f8 commit 0de9dc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/kb/howtokb/reader/WikiHowArticleReader.java
Expand Up @@ -50,7 +50,7 @@ public static ArrayList<Question> WikiHowArticleReaderFromJSONFile(String direct
Object obj = parser.parse(sCurrentLine);
JSONObject jsonObject = (JSONObject) obj;
Question newQuestion = jsonToQuestion(jsonObject);
allQuestions.add(newQuestion);
allQuestions.add(newQuestion.setNormalized());
}
}
return allQuestions;
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/kb/howtokb/WikiHowArticleReaderTest.java
Expand Up @@ -14,8 +14,10 @@ public static void main(String[] args) throws ClassNotFoundException, IOExceptio
String input = "/var/tmp/cxchu/articles_test.json";
ArrayList<Question> allques = WikiHowArticleReader.WikiHowArticleReaderFromJSONFile(input);

int i=0;
for (Question q: allques){
System.out.println(q.toString());
if (i++ == 5) break;
}

System.out.println("Total of questions: " + allques.size());
Expand Down

0 comments on commit 0de9dc5

Please sign in to comment.