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 | 6 |
1 | 58 |
2 | 12 |
3 | 17 |
4 | 12 |
5 | 12 |
6 | 21 |
7 | 25 |
8 | 21 |
9 | 19 |
10 | 13 |
11 | 17 |
12 | 12 |
13 | 21 |
14 | 17 |
15 | 11 |
16 | 47 |
17 | 21 |
24952 | 1 |
34 | 8 |
142 | 1 |
27 | 9 |
99 | 2 |
306 | 1 |
289 | 1 |
165 | 2 |
22 | 8 |
37 | 6 |
47 | 6 |
19 | 9 |
18 | 11 |
795 | 1 |
58 | 7 |
728 | 1 |
45 | 3 |
115 | 2 |
90 | 1 |
169 | 1 |
885 | 1 |
943 | 1 |
276 | 1 |
257 | 1 |
421 | 1 |
100 | 1 |
80 | 1 |
82 | 1 |
72 | 3 |
547 | 1 |
31 | 2 |
89 | 2 |
95 | 1 |
23 | 10 |
102 | 3 |
105 | 2 |
1906 | 1 |
50 | 1 |
1447 | 1 |
894 | 1 |
24 | 4 |
26 | 9 |
42 | 7 |
198 | 1 |
109 | 1 |
218 | 1 |
222 | 2 |
129 | 1 |
44 | 3 |
30 | 9 |
41 | 6 |
63 | 3 |
67 | 4 |
57 | 3 |
33 | 3 |
277 | 2 |
59 | 3 |
2700 | 1 |
2232 | 1 |
1051 | 1 |
43 | 2 |
49 | 2 |
19469 | 1 |
3098 | 1 |
138 | 2 |
161 | 1 |
56 | 2 |
156 | 1 |
46 | 5 |
812 | 1 |
934 | 1 |
97 | 2 |
71 | 1 |
36 | 5 |
974 | 1 |
4703 | 1 |
151 | 1 |
25 | 7 |
239 | 1 |
153 | 1 |
60 | 3 |
91 | 1 |
916 | 1 |
160 | 2 |
3537 | 1 |
55 | 5 |
925 | 1 |
118 | 1 |
338 | 1 |
236 | 2 |
407 | 1 |
21 | 4 |
126 | 1 |
98 | 3 |
522 | 1 |
860 | 1 |
69 | 1 |
221 | 1 |
79 | 1 |
6708 | 1 |
720 | 1 |
40 | 5 |
1416 | 1 |
39 | 3 |
29 | 3 |
793 | 1 |
7885 | 1 |
513 | 1 |
32 | 5 |
83 | 1 |
1180 | 1 |
88 | 1 |
1096 | 1 |
1261 | 1 |
121 | 2 |
147 | 1 |
168 | 1 |
54 | 3 |
1774 | 1 |
28 | 4 |
475 | 1 |
1102 | 1 |
672 | 1 |
20 | 6 |
110 | 1 |
192 | 1 |
130 | 1 |
4965 | 1 |
1991 | 1 |
1567 | 1 |
965 | 1 |
125 | 1 |
61 | 1 |
12182 | 1 |
2221 | 1 |
5641 | 1 |
4422 | 1 |
238 | 2 |
251 | 1 |
4894 | 1 |
103 | 1 |
111 | 1 |
114 | 1 |
131 | 1 |
92 | 2 |
132 | 1 |
48 | 3 |
213 | 1 |
96 | 1 |
708 | 1 |
786 | 1 |
66 | 2 |
4961 | 1 |
119 | 1 |
107 | 1 |
38 | 2 |
561 | 2 |
554 | 1 |
158 | 2 |
5122 | 1 |
302 | 1 |
120 | 2 |
644 | 1 |
423 | 1 |
35 | 2 |
64 | 1 |
68 | 1 |
1208 | 1 |
93 | 1 |
122 | 1 |
447 | 1 |
548 | 1 |
736 | 1 |
419 | 1 |
51 | 2 |
52 | 1 |
4312 | 1 |
688 | 1 |
92777 | 1 |
22099 | 1 |
193 | 2 |
762 | 1 |
262 | 1 |
2145 | 1 |
248 | 1 |
85 | 1 |
3215 | 1 |
292 | 1 |
297 | 1 |
967 | 1 |
463 | 1 |
123 | 1 |
77 | 2 |
157 | 1 |
70 | 1 |
505 | 1 |
571 | 1 |
135 | 1 |
75 | 1 |
801 | 1 |
1389 | 1 |
1890 | 1 |
486 | 1 |
512 | 1 |
220 | 1 |
2058 | 1 |
673 | 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 | 12 |
1 | 25 |
2 | 11 |
3 | 16 |
4 | 5 |
5 | 15 |
6 | 26 |
7 | 8 |
8 | 7 |
9 | 15 |
10 | 9 |
11 | 13 |
12 | 9 |
13 | 4 |
14 | 11 |
15 | 3 |
16 | 17 |
17 | 12 |
18 | 3 |
19 | 6 |
20 | 5 |
21 | 3 |
22 | 3 |
23 | 2 |
24 | 2 |
25 | 4 |
26 | 2 |
28 | 5 |
29 | 6 |
30 | 2 |
31 | 3 |
32 | 9 |
33 | 3 |
34 | 1 |
35 | 2 |
36 | 4 |
37 | 1 |
38 | 1 |
39 | 2 |
40 | 3 |
41 | 1 |
42 | 1 |
44 | 3 |
45 | 1 |
47 | 1 |
49 | 1 |
50 | 1 |
51 | 3 |
52 | 2 |
53 | 1 |
54 | 1 |
55 | 1 |
56 | 1 |
57 | 2 |
60 | 1 |
61 | 1 |
62 | 1 |
64 | 1 |
70 | 2 |
71 | 1 |
75 | 1 |
76 | 1 |
77 | 1 |
84 | 1 |
89 | 2 |
94 | 1 |
95 | 1 |
96 | 1 |
103 | 3 |
118 | 1 |
121 | 1 |
123 | 2 |
127 | 1 |
129 | 1 |
130 | 1 |
136 | 1 |
153 | 1 |
157 | 1 |
161 | 1 |
162 | 1 |
172 | 1 |
181 | 1 |
189 | 1 |
199 | 2 |
206 | 1 |
227 | 1 |
230 | 1 |
236 | 1 |
240 | 1 |
241 | 1 |
248 | 1 |
250 | 1 |
255 | 1 |
263 | 1 |
274 | 1 |
280 | 1 |
289 | 1 |
292 | 1 |
296 | 1 |
300 | 1 |
301 | 1 |
305 | 1 |
414 | 1 |
425 | 1 |
436 | 1 |
460 | 1 |
479 | 1 |
495 | 1 |
535 | 1 |
543 | 1 |
552 | 1 |
561 | 1 |
574 | 1 |
643 | 1 |
677 | 1 |
738 | 1 |
752 | 2 |
1924 | 1 |
1090 | 1 |
890 | 1 |
955 | 2 |
864 | 1 |
902 | 1 |
7945 | 1 |
1840 | 1 |
1085 | 1 |
823 | 1 |
2003 | 1 |
1449 | 1 |
965 | 1 |
12186 | 1 |
967 | 1 |
4930 | 1 |
974 | 1 |
3945 | 1 |
972 | 1 |
1350 | 1 |
1589 | 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 += '=== Distance of each message to its default value ===\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=== Frequency of each distance ===\n\n' + table;
$( '#mw-content-text' ).prepend( '<pre>' + text + '</pre>' );