|
<html> |
|
|
|
<head> |
|
<title>Chunky | Sentence Segmentation Service</title> |
|
<meta name="description" content="Chunky is a sentence segmentation service."> |
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
<style> |
|
body { |
|
margin: 0; |
|
font-family: ui-monospace, |
|
Menlo, Monaco, |
|
"Cascadia Mono", "Segoe UI Mono", |
|
"Roboto Mono", |
|
"Oxygen Mono", |
|
"Ubuntu Mono", |
|
"Source Code Pro", |
|
"Fira Mono", |
|
"Droid Sans Mono", |
|
"Consolas", "Courier New", monospace; |
|
} |
|
|
|
main { |
|
margin: 0 auto; |
|
padding: 1rem; |
|
max-width: 73ch; |
|
} |
|
|
|
ul { |
|
list-style: square; |
|
} |
|
|
|
div[data-autogrow]:has(textarea) { |
|
display: grid; |
|
} |
|
|
|
div[data-autogrow]:has(textarea)::after { |
|
content: attr(data-autogrow) ' '; |
|
white-space: pre-wrap; |
|
visibility: hidden; |
|
} |
|
|
|
div[data-autogrow]:has(textarea)>textarea { |
|
resize: none; |
|
overflow: hidden; |
|
} |
|
|
|
div[data-autogrow]:has(textarea)>textarea, |
|
div[data-autogrow]:has(textarea)::after { |
|
grid-area: 1 / 1 / 2 / 2; |
|
border: 1px solid currentColor; |
|
padding: 0.5rem; |
|
font: inherit; |
|
text-wrap: stable; |
|
} |
|
</style> |
|
</head> |
|
|
|
<body> |
|
<main> |
|
|
|
<h1>chunky</h1> |
|
<p>Sentence Segmentation Service</p> |
|
<form action="/split" method="post" enctype="multipart/form-data"> |
|
|
|
|
|
<label for="text">Text:</label><br> |
|
<div data-autogrow=""> |
|
<textarea name="text" id="text" rows="1" maxlength="16000"></textarea> |
|
</div> |
|
|
|
<input type="submit" value="Split Sentences"> |
|
</form> |
|
{% if sentences %} |
|
<button id="copy" type="button">copy</button> |
|
{%endif %} |
|
<ul> |
|
{% for sentence in sentences %} |
|
<li>{{ sentence }}</li> |
|
{% endfor %} |
|
</ul> |
|
|
|
<section> |
|
<h2>References</h2> |
|
<article> |
|
<header> |
|
<h3>Segment Any Text: A Universal Approach for Robust, Efficient and Adaptable Sentence Segmentation</h3> |
|
<p>by Markus Frohmann, Igor Sterner, Ivan Vulić, Benjamin Minixhofer, and Markus Schedl</p> |
|
</header> |
|
<p> |
|
<cite> |
|
Frohmann, M., Sterner, I., Vulić, I., Minixhofer, B., & Schedl, M. (2024). Segment Any Text: A Universal |
|
Approach for Robust, Efficient and Adaptable Sentence Segmentation. |
|
<em>arXiv preprint arXiv:2406.16678</em>. |
|
<a href="https://doi.org/10.48550/arXiv.2406.16678">https://doi.org/10.48550/arXiv.2406.16678</a> |
|
</cite> |
|
</p> |
|
</article> |
|
</section> |
|
</main> |
|
|
|
<noscript> |
|
{{sentences|safe|trim}} |
|
</noscript> |
|
<script> |
|
const textarea = document.querySelector("textarea"); |
|
if (textarea) { |
|
textarea.addEventListener("input", (e) => { |
|
textarea.parentElement.dataset["autogrow"] = textarea.value; |
|
}) |
|
} |
|
document.querySelector("button#copy").addEventListener("click", (e) => { |
|
navigator.clipboard.writeText(document.querySelector("noscript").textContent.trim() ?? "[]") |
|
}) |
|
</script> |
|
</body> |
|
|
|
</html> |