Skip to content
Permalink
7b768f8f0d
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
30 lines (21 sloc) 944 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);
for (Question q: allques){
System.out.println(q.toString());
}
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));
}
}