53 lines
1.3 KiB
HTML
53 lines
1.3 KiB
HTML
|
<!doctype html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Security-Policy" content="script-src https: http: 'unsafe-inline' 'unsafe-eval'">
|
||
|
<title>Wordpos in the browser</title>
|
||
|
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
|
||
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/javascript.min.js"></script>
|
||
|
|
||
|
<script src="/dist/wordpos.min.js"></script>
|
||
|
<script>
|
||
|
let wordpos = window.wordpos = new WordPOS({
|
||
|
// preload: true,
|
||
|
dictPath: '/samples/self-hosted/dict',
|
||
|
profile: true,
|
||
|
// stopwords: false
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<script src="../main.js" name="main"></script>
|
||
|
<style>
|
||
|
pre {
|
||
|
padding: 2em;
|
||
|
display: block;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<h1>Self-hosted WordPOS sample</h1>
|
||
|
Open console to see results.
|
||
|
|
||
|
<pre><code> </code></pre>
|
||
|
|
||
|
<script>
|
||
|
var el = document.querySelector('code');
|
||
|
if (fetch) {
|
||
|
fetch('../main.js')
|
||
|
.then(res => res.text())
|
||
|
.then(txt => {
|
||
|
el.innerText = txt;
|
||
|
window.hljs && hljs.initHighlightingOnLoad();
|
||
|
});
|
||
|
} else {
|
||
|
el.innerHTML = 'Open <a href="../main.js">main.js</a>.';
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|