!7 static new L data; p { S text = loadSnippet(#1008407); data.clear(); new HashSet paragraphSet; for (S line : toLinesFullTrim(text)) { if (line.startsWith("#")) continue; if (!paragraphSet.add(line)) continue; //print(line); L split = splitIntoSentences_v1(line); printWithRisingIndent(split); S sp; if (l(split) == 1 && eq(first(split), line)) sp = "-"; else //sp = htmlEncode_nlToBr(lines(split)); sp = ul(htmlEncodeAll(split)); data.add(litorderedmap( "Original Paragraph" := htmlencode(line), "Split" := sp, "OK" := hcheckbox(lstr(data), false, "class" := "chkbox"))); } data = sortByCalculatedField(data, func(Map m) { comparableList( neq(m.get("Split"), "-"), m.get("Original Paragraph")) }); serveHttpOpenBrowser(4000); } static NanoHTTPD.Response serve(S uri, NanoHTTPD.Method method, Map header, Map parms, Map files) { S title = "Splitting paragraphs into sentences"; ret serveHTML(hhtml( hhead(htitle(title) + loadJQuery() + hCheckBoxMultiSelect()) + hbody(h3(title) + hform(htable_noEncode(data) + p(hsubmit()))))); }