Skip to content

Commit

Permalink
allow upload of multi sentence, parse only 100
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammed-abuodeh committed May 1, 2024
1 parent 7a31208 commit c1b86a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3244,10 +3244,9 @@ $('#treedata2').keyup(function(){


if (sentences.split(/\s+/).length > 100) {
$('#treebtn2').attr('disabled', 'disabled');
document.getElementById('parse-limit-note').style.display = 'inline';
} else {

$('#treebtn2').removeAttr('disabled');
document.getElementById('parse-limit-note').style.display = 'none';
}
})

Expand Down
3 changes: 2 additions & 1 deletion viewtree.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,13 @@
<section class="upload">
<form id="upload2">
<div id="upload-2-row-1">
<label id="label-treedata2" for="treedata2"> Or enter text (parse limit is 100 words):</label>
<label id="label-treedata2" for="treedata2"> Or enter text</label>
<br>
<textarea id="treedata2" placeholder="Each line of text will become a seperate tree."></textarea>
</div>

<div id="upload-2-row-2">
<p id="parse-limit-note" style="display: none;">Parse limit is 100 words. The remaining sentences will not be parsed.</p>
<input type="button" id="treebtn2" value="Upload" onClick="setSentenceTreeData()" />
<label for="parser-select">or parse sentences</label>
<select name="parsers" id="select-parser">
Expand Down

0 comments on commit c1b86a8

Please sign in to comment.