Ajuda:Página de testes/1
Lembre-se que todo usuário pode criar uma página de testes pessoal, basta fazer login com sua conta (registre-se caso não tenha conta).
Ajuda: Como se edita uma página (formatação, ligações internas , imagens, ligações entre projectos, ligações externas, listas e tabelas)
Outros: Assistente para a criação de artigos − Tutorial − Livro de estilo
Nota: Não introduza conteúdo ofensivo, calunioso ou protegido por direitos autorais.
[Ver as páginas de teste livres]Os testes que você fizer aqui serão apagados ao fim de determinado tempo para que outros possam também praticar.pt-PT
Distance of each message to its default value
The table below shows the Levenshtein distances between each pt-PT message and its default. The messages come from the list of changed MediaWiki messages in pt.
Frequency of each distance
Distance | Frequency |
---|---|
0 | 8 |
1 | 243 |
2 | 24 |
3 | 24 |
4 | 15 |
5 | 15 |
6 | 34 |
7 | 24 |
8 | 15 |
9 | 30 |
10 | 18 |
11 | 15 |
12 | 19 |
13 | 20 |
14 | 18 |
15 | 11 |
16 | 22 |
17 | 12 |
18 | 12 |
19 | 5 |
20 | 6 |
21 | 7 |
22 | 7 |
23 | 8 |
24 | 8 |
25 | 7 |
26 | 7 |
27 | 7 |
28 | 6 |
29 | 4 |
30 | 6 |
31 | 3 |
32 | 1 |
33 | 6 |
34 | 4 |
35 | 3 |
36 | 5 |
37 | 7 |
38 | 2 |
39 | 3 |
40 | 3 |
41 | 8 |
42 | 9 |
43 | 4 |
44 | 2 |
45 | 6 |
46 | 1 |
47 | 4 |
48 | 1 |
49 | 1 |
50 | 1 |
51 | 1 |
52 | 1 |
53 | 1 |
54 | 3 |
55 | 1 |
56 | 3 |
57 | 2 |
58 | 5 |
59 | 3 |
60 | 1 |
61 | 2 |
62 | 1 |
63 | 2 |
64 | 1 |
65 | 1 |
68 | 2 |
69 | 2 |
70 | 3 |
72 | 2 |
73 | 1 |
74 | 1 |
75 | 1 |
76 | 1 |
78 | 1 |
79 | 1 |
80 | 1 |
82 | 1 |
83 | 1 |
84 | 1 |
85 | 3 |
87 | 1 |
88 | 1 |
89 | 1 |
92 | 1 |
93 | 1 |
95 | 2 |
96 | 1 |
98 | 2 |
99 | 2 |
101 | 1 |
102 | 2 |
103 | 1 |
105 | 2 |
107 | 1 |
109 | 1 |
110 | 1 |
111 | 3 |
112 | 1 |
118 | 1 |
121 | 3 |
122 | 2 |
125 | 1 |
126 | 2 |
129 | 2 |
131 | 1 |
132 | 1 |
135 | 1 |
138 | 1 |
139 | 1 |
145 | 1 |
151 | 1 |
155 | 1 |
156 | 1 |
158 | 2 |
159 | 1 |
160 | 3 |
164 | 2 |
165 | 2 |
168 | 1 |
169 | 2 |
173 | 1 |
192 | 1 |
193 | 2 |
204 | 1 |
207 | 2 |
218 | 1 |
219 | 1 |
221 | 2 |
222 | 1 |
236 | 1 |
239 | 1 |
243 | 1 |
246 | 1 |
248 | 1 |
252 | 1 |
263 | 1 |
275 | 1 |
277 | 1 |
292 | 1 |
295 | 1 |
297 | 1 |
302 | 1 |
323 | 1 |
355 | 1 |
356 | 1 |
407 | 1 |
409 | 1 |
423 | 1 |
428 | 1 |
447 | 1 |
462 | 1 |
463 | 1 |
502 | 1 |
505 | 1 |
512 | 1 |
513 | 1 |
535 | 1 |
547 | 1 |
559 | 1 |
561 | 2 |
570 | 1 |
571 | 1 |
604 | 1 |
608 | 1 |
611 | 1 |
644 | 1 |
670 | 1 |
720 | 1 |
728 | 1 |
757 | 1 |
762 | 1 |
801 | 1 |
834 | 1 |
860 | 1 |
910 | 1 |
916 | 1 |
932 | 2 |
936 | 1 |
943 | 1 |
947 | 1 |
967 | 1 |
968 | 1 |
983 | 1 |
1031 | 1 |
1065 | 1 |
1086 | 1 |
1096 | 1 |
1098 | 1 |
1125 | 1 |
1208 | 2 |
1335 | 1 |
1397 | 1 |
1411 | 1 |
1568 | 1 |
1774 | 1 |
1904 | 1 |
2012 | 1 |
2023 | 1 |
2085 | 1 |
2221 | 1 |
2366 | 1 |
3544 | 1 |
3563 | 1 |
3568 | 1 |
3589 | 1 |
3917 | 1 |
3927 | 1 |
3956 | 1 |
4314 | 1 |
4464 | 1 |
4691 | 1 |
4894 | 1 |
4965 | 1 |
6617 | 1 |
12159 | 1 |
16890 | 1 |
19336 | 1 |
25476 | 1 |
60318 | 1 |
pt-BR
Distance of each message to its default value
The table below shows the Levenshtein distances between each pt-BR message and its default. The messages come from the list of changed MediaWiki messages in pt-br.
Frequency of each distance
Distance | Frequency |
---|---|
0 | 2 |
1 | 54 |
2 | 12 |
3 | 19 |
4 | 7 |
5 | 20 |
6 | 26 |
7 | 14 |
8 | 14 |
9 | 15 |
10 | 15 |
11 | 16 |
12 | 10 |
13 | 10 |
14 | 11 |
15 | 4 |
16 | 15 |
17 | 7 |
18 | 4 |
19 | 9 |
20 | 7 |
21 | 2 |
22 | 3 |
23 | 2 |
24 | 2 |
25 | 3 |
26 | 2 |
27 | 2 |
28 | 3 |
29 | 3 |
30 | 1 |
31 | 1 |
32 | 4 |
33 | 3 |
34 | 1 |
36 | 1 |
37 | 1 |
38 | 1 |
40 | 5 |
41 | 2 |
43 | 1 |
45 | 3 |
47 | 2 |
49 | 3 |
50 | 1 |
51 | 2 |
52 | 1 |
54 | 1 |
55 | 1 |
56 | 1 |
57 | 2 |
61 | 1 |
62 | 1 |
67 | 2 |
68 | 1 |
70 | 1 |
71 | 1 |
77 | 1 |
80 | 1 |
81 | 1 |
84 | 1 |
89 | 1 |
94 | 1 |
95 | 1 |
96 | 1 |
97 | 1 |
103 | 2 |
123 | 1 |
129 | 1 |
131 | 2 |
135 | 1 |
138 | 1 |
157 | 1 |
161 | 1 |
162 | 1 |
168 | 1 |
172 | 2 |
173 | 1 |
181 | 1 |
212 | 2 |
230 | 1 |
237 | 1 |
240 | 1 |
246 | 1 |
248 | 1 |
255 | 1 |
261 | 1 |
273 | 1 |
289 | 2 |
296 | 1 |
300 | 2 |
306 | 1 |
420 | 1 |
425 | 1 |
436 | 1 |
460 | 1 |
477 | 1 |
479 | 1 |
495 | 1 |
532 | 1 |
550 | 1 |
552 | 1 |
567 | 1 |
574 | 1 |
643 | 1 |
738 | 1 |
752 | 3 |
864 | 1 |
902 | 1 |
907 | 1 |
912 | 1 |
917 | 1 |
955 | 1 |
965 | 1 |
967 | 1 |
972 | 1 |
974 | 1 |
1090 | 1 |
1253 | 1 |
1310 | 1 |
1352 | 1 |
1574 | 1 |
1840 | 1 |
1924 | 1 |
2013 | 1 |
2085 | 1 |
3574 | 1 |
3945 | 1 |
6644 | 1 |
12163 | 1 |
Script
// Copy from http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript
function levenshtein(str1, str2) {
var l1 = str1.length, l2 = str2.length;
if (Math.min(l1, l2) === 0) {
return Math.max(l1, l2);
}
var i = 0, j = 0, d = [];
for (i = 0 ; i <= l1 ; i++) {
d[i] = [];
d[i][0] = i;
}
for (j = 0 ; j <= l2 ; j++) {
d[0][j] = j;
}
for (i = 1 ; i <= l1 ; i++) {
for (j = 1 ; j <= l2 ; j++) {
d[i][j] = Math.min(
d[i - 1][j] + 1,
d[i][j - 1] + 1,
d[i - 1][j - 1] + (str1.charAt(i - 1) === str2.charAt(j - 1) ? 0 : 1)
);
}
}
return d[l1][l2];
}
// End of copy
var text = '',
table,
data = {};
table = '{| class= "wikitable sortable"\n! MediaWiki message !! Distance\n';
$('.am_actual').each(function(){
var $this = $(this),
$prev = $this.parent().prev(),
msgName = $prev.find('td:first a:first').attr('title'),
defaultText = $prev.find('.am_default').text(),
customText = $this.text(),
dist = levenshtein( defaultText, customText);
if( typeof data[ dist ] === 'undefined' ){
data[ dist ] = 1;
} else {
data[ dist ]++;
}
table += '|-\n| [[' + msgName + '|]] || ' + dist + '\n';
});
table += '|}';
text += '== Table ==\n\n' + table;
table = '{| class= "wikitable sortable"\n! Distance !! Frequency\n';
$.each(data, function(a,b){
if(b) {
table += '|-\n| ' + a + ' || ' + b + '\n';
}
});
table += '|}';
text += '\n\n== Table ==\n\n' + table;
jsMsg( '<pre>' + text + '</pre>' );