|
|
<!doctype html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<title>{{ title }}</title>
|
|
|
<link href="/static/css/w3.css" type="text/css" rel="stylesheet">
|
|
|
<link href="/static/css/main.css" type="text/css" rel="stylesheet">
|
|
|
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+TC&display=swap" rel="stylesheet" />
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<div id="nodeTitle" class="nodeTitle hidden">
|
|
|
<div id="nodeTitleContent">test</div>
|
|
|
</div>
|
|
|
<div id="stopWordEditorLayer" class="info hidden">
|
|
|
<div id="stopWordEditor">
|
|
|
<h4 id="sweTitle" style="margin:10px; display: inline;">編輯停用詞</h4>
|
|
|
<ul id="sweContainer" class="w3-ul w3-hoverable" style="margin-bottom: 10px;"></ul>
|
|
|
<div>
|
|
|
<input class="w3-input w3-border" style="width: 85%; display: inline;" type="text" id="newStopWord"
|
|
|
placeholder="新增停用詞(以空白隔開)">
|
|
|
<button class="general-button w3-right" type="button" id="confirm"
|
|
|
style="background-color: #379; margin-left: 8px;" onclick="addStopWord()">新增</button>
|
|
|
</div>
|
|
|
<div id="sweButtons" style="margin: 20px 0px;">
|
|
|
<button class="general-button" type="button" id="confirm"
|
|
|
style="background-color: #379; margin: 0px 10px"
|
|
|
onclick="hideStopWordEditor(); submit()">確認</button>
|
|
|
<button class="general-button" type="button" id="confirm"
|
|
|
style="background-color: #379; margin: 0px 10px" onclick="downloadStopWord()">匯出停用詞</button>
|
|
|
<button class="general-button" type="button" id="confirm"
|
|
|
style="background-color: #379; margin: 0px 10px" onclick="clearStopWord()">全部清除</button>
|
|
|
<button class="general-button w3-right" type="button" id="confirm"
|
|
|
style="background-color: #379; margin: 0px 20px" onclick="hideStopWordEditor()">返回</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class='w3-bar w3-teal'>
|
|
|
<button class="w3-button w3-teal" type="button" onclick="location.href='/generalTxt'"
|
|
|
style="color: darkseagreen;">泛用文字視覺化工具</button>
|
|
|
</div>
|
|
|
<div id='heading'>
|
|
|
<h2>泛用文字視覺化工具</h2>
|
|
|
<p>SentenTree <a href="https://github.com/twitter/SentenTree">https://github.com/twitter/SentenTree</a></p>
|
|
|
<p id='comment'>這是泛用文字視覺化工具,能夠簡單處理文字檔的視覺化。</p>
|
|
|
<p id='comment'>支援的語言:繁體中文、英文以及所有使用空格分詞的語言。</p>
|
|
|
<p id='comment'>使用繁體中文Jieba斷詞器,不保證簡體中文能夠正常使用。</p>
|
|
|
</div>
|
|
|
<div style="margin:10px;">
|
|
|
<button class="general-button" type="button" id="editSWButton" style="margin:10px 0px;"
|
|
|
onclick="showStopwordEditor()">編輯停用詞</button>
|
|
|
<label>Min Ratio</label>
|
|
|
<input type="number" step="0.0001" id="minRatio" value="0.001" min="0.0001" max="1">
|
|
|
<label>Max Ratio</label>
|
|
|
<input type="number" step="0.0001" id="maxRatio" value="1" min="0.0001" max="1">
|
|
|
</div>
|
|
|
<div id='rawText' class=''>
|
|
|
<div id="wordcount">字數:0</div>
|
|
|
<textarea id='rawTextBox' rows=25 placeholder="輸入要視覺化的文字
|
|
|
換行為斷句" onchange="countWords()"></textarea>
|
|
|
<button class='general-button' style='margin: 10px 0px' onclick="submit()">提交</button>
|
|
|
</div>
|
|
|
<div>
|
|
|
<button id='toggleTextBox' class='general-button' style='margin: 0px 10px'
|
|
|
onclick="switchMessageBox()">隱藏文字視窗</button>
|
|
|
<div id='graph' class='hidden'>
|
|
|
<div id='vis'></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</body>
|
|
|
<script src="/static/node_modules/jquery/dist/jquery.js"></script>
|
|
|
<script src="/static/node_modules/jquery-ui-dist/jquery-ui.js"></script>
|
|
|
<script src="/static/node_modules/css-element-queries/src/ResizeSensor.js"></script>
|
|
|
<script src="/static/node_modules/sententree/dist/sententree-standalone.js"></script>
|
|
|
<script src='/static/node_modules/d3/build/d3.js'></script>
|
|
|
<script src="/static/js/loadIdfTable.js"></script>
|
|
|
<script src='/static/js/generalText.js'></script>
|
|
|
|
|
|
</html> |