Skip to content
Permalink
Browse files

Normalizing articles

  • Loading branch information
cxchu
cxchu committed May 10, 2017
1 parent 7b768f8 commit 0de9dc5ac94564589befbd61ca8e76cffd487fbf
@@ -50,7 +50,7 @@ public class WikiHowArticleReader {
Object obj = parser.parse(sCurrentLine);
JSONObject jsonObject = (JSONObject) obj;
Question newQuestion = jsonToQuestion(jsonObject);
allQuestions.add(newQuestion);
allQuestions.add(newQuestion.setNormalized());
}
}
return allQuestions;
@@ -14,8 +14,10 @@ public class WikiHowArticleReaderTest {
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());

0 comments on commit 0de9dc5

Please sign in to comment.
You can’t perform that action at this time.