-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
63 lines (61 loc) · 3.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Online language identification demo</title>
<script src="lib/LanguageIdentifier.js"></script>
<script src=lib/Lng/be.js></script>
<script src=lib/Lng/ca.js></script>
<script src=lib/Lng/cs.js></script>
<script src=lib/Lng/da.js></script>
<script src=lib/Lng/de.js></script>
<script src=lib/Lng/el.js></script>
<script src=lib/Lng/en.js></script>
<script src=lib/Lng/eo.js></script>
<script src=lib/Lng/es.js></script>
<script src=lib/Lng/et.js></script>
<script src=lib/Lng/fi.js></script>
<script src=lib/Lng/fr.js></script>
<script src=lib/Lng/ga.js></script>
<script src=lib/Lng/gl.js></script>
<script src=lib/Lng/hu.js></script>
<script src=lib/Lng/hy.js></script>
<script src=lib/Lng/is.js></script>
<script src=lib/Lng/it.js></script>
<script src=lib/Lng/lt.js></script>
<script src=lib/Lng/nl.js></script>
<script src=lib/Lng/no.js></script>
<script src=lib/Lng/pl.js></script>
<script src=lib/Lng/pt.js></script>
<script src=lib/Lng/ro.js></script>
<script src=lib/Lng/ru.js></script>
<script src=lib/Lng/sk.js></script>
<script src=lib/Lng/sl.js></script>
<script src=lib/Lng/sv.js></script>
<script src=lib/Lng/th.js></script>
<script src=lib/Lng/tr.js></script>
<script src=lib/Lng/uk.js></script>
<script>
function printlngiso(text){var lng = LanguageIdentifier.identify(text); var res = []; for (var sKey in lng) res.push(sKey + ": " + "<i>" + (!isNaN(parseFloat(lng[sKey])) ? Math.round(lng[sKey] * 1000) / 1000 : lng[sKey]) + "</i>"); document.getElementById("result").innerHTML = res.join(" | ");}
</script>
</head>
<body>
<p>Type something and press <button type="button" onclick="printlngiso(document.getElementById('intext').value);"><noscript> <span style="color:red;">Enable JavaScript ! </span></noscript><span style="color:darkgreen;">Language!</span></button> button.</p>
<p><textarea rows="10" cols="55" id="intext">The quick brown fox jumps over the lazy dog</textarea></p>
<p id="result"></p>
<fieldset>
<legend>Links</legend>
<a href="https://github.com/mazko/jsli" target="_blank" rel="nofollow">Sources</a> |
<a href="test/composite.html" target="_blank" rel="nofollow">Unit Tests</a> |
<a href="http://tika.apache.org/1.2/api/org/apache/tika/language/LanguageIdentifier.html" target="_blank" rel="nofollow">Apache Tika LanguageIdentifier</a> |
<a href="http://mazko.github.com/jssnowball/" target="_blank">jsSnowball</a> |
<a href="http://mazko.github.io/jstaggregator/" target="_blank">Urim</a> |
<a href="mailto:[email protected]?subject=Javascript%20language%20identifier" rel="nofollow" onmouseover="var split = this.href.split('?'); split[0] = split[0].replace('%20%5Bat%5D%20','@'); this.href = split.join('?');">Feedback</a>
</fieldset>
<p></p>
<fieldset id="support_lng">
<legend>Languages Supported <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php" target="_blank" rel="nofollow">ISO 639</a>
</legend>
<script>document.getElementById("support_lng").innerHTML += LanguageIdentifier.getSupportedLanguages().sort().join(", ");</script>
</fieldset>
</body></html>