Skip to content
Permalink
0de9dc5ac9
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
32 lines (23 sloc) 979 Bytes
package kb.howtokb;
import java.io.IOException;
import java.util.ArrayList;
import org.json.simple.parser.ParseException;
import kb.howtokb.reader.WikiHowArticleReader;
import kb.howtokb.taskframe.extractor.TextToWikiHowTaskFrame;
import kb.howtokb.wkhobject.Question;
public class WikiHowArticleReaderTest {
public static void main(String[] args) throws ClassNotFoundException, IOException, ParseException {
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());
// //Test activity extraction
// String sent = "You have to buy a new pass for the following day.";
// TextToWikiHowTaskFrame test = new TextToWikiHowTaskFrame();
// System.out.println(test.sentToListWikiHowTaskFrame(sent));
}
}