-
Notifications
You must be signed in to change notification settings - Fork 16
/
sample.html
55 lines (55 loc) · 1.95 KB
/
sample.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
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Snowball Sample</title>
<script src="stemmer/lib/Snowball.min.js" type="text/javascript"></script>
<script type="text/javascript">
var Stem = function(lng) {
var testStemmer = new Snowball(lng);
return function(word) {
testStemmer.setCurrent(word);
testStemmer.stem();
return testStemmer.getCurrent();
}
};
function println(lng, word){
document.getElementById(lng).innerHTML = "<b>" + lng + "</b>: '" + word + "' -> '" + new Stem(lng)(word) + "'";
}
function fillStems(){
println("danish", "aabenbaringen");
println("dutch", "aanbiddelijke");
println("english", "abbreviation");
println("finnish", "aachenista");
println("french", "abandonn\u00e9e");
println("german", "aash\u00f6llen");
println("hungarian", "abbahagyn\u00e1m");
println("italian", "abbacinati");
println("norwegian", "ableg\u00f8yer");
println("portuguese", "abastecimento");
println("russian", "\u0430\u0432\u0442\u043e\u0440\u043e\u043c");
println("spanish", "abarcar\u00e1n");
println("swedish", "ackompanjerade");
println("romanian", "ab\u0103tut\u0103");
println("turkish", "abart\u0131ld\u0131\u011f\u0131n\u0131");
}
</script>
</head>
<body onload="fillStems();">
<div id="danish"></div>
<div id="dutch"></div>
<div id="english"></div>
<div id="finnish"></div>
<div id="french"></div>
<div id="german"></div>
<div id="hungarian"></div>
<div id="italian"></div>
<div id="norwegian"></div>
<div id="portuguese"></div>
<div id="russian"></div>
<div id="spanish"></div>
<div id="swedish"></div>
<div id="romanian"></div>
<div id="turkish"></div>
</body>
</html>