!752
static S html;
static S keyword;
static new List sentences;
static S source;
p {
if (args.length != 0) {
if (isSnippetID(args[0]))
html = loadSnippet(args[0]);
else if (args[0].startsWith("http:") || args[0].startsWith("https://"))
html = loadPage(source = args[0]);
else {
keyword = join(" ", args);
html = loadPage(source = "https://en.wikipedia.org/wiki/" + keyword);
}
} else
html = loadSnippet(source = "#3000030"); // A text about Java
print();
// tokenize and clean up html
L tok = htmlcoarsetok(html);
tok = removeScripts(tok);
tok = dropTags(tok, "span");
tok = dropTags(tok, "a");
tok = dropTags(tok, "b");
tok = dropTags(tok, "small");
// tok = dropAllTags(tok); // Too much!
//print(structure(tok));
for (int i = 0; i < tok.size(); i += 2) {
S line = tok.get(i).trim();
if (line.startsWith("