[benchmark] Benchmark for UTF-8 decoding with typical data.

This is in preparation for upcoming optimizations to the UTF-8 decoding.

The data files are extracts from Wikipedia with markup stripped. They
cover 6 representative cases of typical input data:
- English text, only ASCII
- Danish text, mostly ASCII, only Latin-1
- Slovak text, mostly ASCII, not only Latin-1
- Russian text, max 2 bytes per character
- Nepali text, max 3 bytes per character
- Chinese text, full character range

Each of the languages are benchmarked with small (average 10 bytes),
medium (10 000 bytes) and large (10 000 000 bytes) inputs.

Only allowMalformed: false is benchmarked.

Change-Id: I72e6959c49388f2aebf33da0c582b7729be6297c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140870
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Aske Simon Christensen 2020-03-27 13:02:07 +00:00 committed by commit-bot@chromium.org
parent 4ab3bda5db
commit b59217721b
7 changed files with 423 additions and 0 deletions

View file

@ -0,0 +1,139 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// Benchmark for UTF-8 decoding
import 'dart:convert';
import 'dart:typed_data';
import 'package:benchmark_harness/benchmark_harness.dart';
import 'datext_latin1_10k.dart';
import 'entext_ascii_10k.dart';
import 'netext_3_10k.dart';
import 'rutext_2_10k.dart';
import 'sktext_10k.dart';
import 'zhtext_10k.dart';
class Utf8Decode extends BenchmarkBase {
final String language;
final String text;
final int size;
final bool allowMalformed;
final Utf8Decoder decoder;
Uint8List data;
List<int> chunks;
int totalInputSize;
int totalOutputSize;
static String _makeName(String language, int size, bool allowMalformed) {
String name = "Utf8Decode.$language.";
name += size >= 1000000
? "${size ~/ 1000000}M"
: size >= 1000 ? "${size ~/ 1000}k" : "$size";
if (allowMalformed) name += ".malformed";
return name;
}
Utf8Decode(this.language, this.text, this.size, this.allowMalformed)
: decoder = Utf8Decoder(allowMalformed: allowMalformed),
super(_makeName(language, size, allowMalformed));
@override
void setup() {
data = utf8.encode(text) as Uint8List;
if (data.length != 10000) {
throw "Expected input data of exactly 10000 bytes.";
}
if (size < data.length) {
// Split into chunks.
chunks = <int>[];
chunks.add(0);
for (int pos = size; pos < data.length; pos += size) {
int chunkPos = pos;
while ((data[chunkPos] & 0xc0) == 0x80) {
chunkPos--;
}
chunks.add(chunkPos);
}
chunks.add(data.length);
totalInputSize = data.length;
totalOutputSize = text.length;
} else if (size > data.length) {
// Repeat data to the desired length.
final Uint8List expanded = Uint8List(size);
for (int i = 0; i < size; i++) {
expanded[i] = data[i % data.length];
}
chunks = <int>[0, size];
totalInputSize = size;
totalOutputSize = text.length * size ~/ data.length;
data = expanded;
} else {
// Use data as is.
chunks = <int>[0, data.length];
totalInputSize = data.length;
totalOutputSize = text.length;
}
}
@override
void run() {
int lengthSum = 0;
final int numChunks = chunks.length - 1;
for (int i = 0; i < numChunks; i++) {
final String s = decoder.convert(data, chunks[i], chunks[i + 1]);
lengthSum += s.length;
}
if (lengthSum != totalOutputSize) {
throw "Output length doesn't match expected.";
}
}
@override
void exercise() {
// Only a single run per measurement.
run();
}
@override
void warmup() {
BenchmarkBase.measureFor(run, 1000);
}
@override
double measure() {
// Report time per input byte.
return super.measure() / totalInputSize;
}
@override
void report() {
// Report time in nanoseconds.
final double score = measure() * 1000.0;
print("$name(RunTime): $score ns.");
}
}
void main(List<String> args) {
const texts = {
"en": en,
"da": da,
"sk": sk,
"ru": ru,
"ne": ne,
"zh": zh,
};
final bool testMalformed =
args != null && args.isNotEmpty && args.first == "malformed";
final benchmarks = [
// Only benchmark with allowMalformed: false unless specified otherwise.
for (bool allowMalformed in [false, if (testMalformed) true])
for (int size in [10, 10000, 10000000])
for (String language in texts.keys)
() => Utf8Decode(language, texts[language], size, allowMalformed)
];
benchmarks.forEach((bm) => bm().report());
}

View file

@ -0,0 +1,62 @@
// This text is an extract from the Danish Wikipedia article about Donald Duck
// (Anders And): https://da.wikipedia.org/wiki/Anders_And
//
// The extract is based on the Wikipedia database dump. All markup has been
// removed using WikiExtractor: https://github.com/attardi/wikiextractor
//
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
const String da = """
Anders And
Anders Fauntleroy And er en berømt figur i Disneys tegnefilm og tegneserier. Selv om han ikke er særligt populær i USA, optræder han i mange ugeblade i Europa: I Norge, Tyskland, Sverige, Danmark, Holland, Italien med flere. Hans første optræden var i tegnefilmen "The Wise Little Hen" (Den kloge lille høne) fra 9. juni 1934. Hans karakteristiske stemme blev indtalt af radiokomikeren Clarence Nash, der siden fast lagde stemme til.
Efter Nash' død i 1985 overtog tegnefilmsdubberen Tony Anselmo. Det var i øvrigt Nash selv, der trænede Anselmo til at lyde som Anders And. I Danmark har tre lagt stemme til Anders And: Bjarne H. Hansen, Dick Kaysø og Peter Zhelder. Dick Kaysø og Peter Zhelder lægger stadigvæk stemme til ham.
Anders And var en bifigur til filmen Den lille kloge Høne, han havde et langt spidst næb og en utrolig kort lunte; der skulle ikke meget til for at udløse et raserianfald hos ham. Klassikerne er fra 1930'erne, hvor Mickey, Fedtmule og Anders er et trekløver, der er film som "Mickeys Campingvogn," "Tårnuret" og "Ensomme Spøgelser." Fred Spencer og Dick Lundy var animatorer. Efterhånden opnåede anden større popularitet, hvad der ikke rigtig huede Disney, der ikke brød sig om den krakilske and. Men Anders blev forfremmet til hovedfigur i en serie film, der begyndte med "Anders And og Strudsen" i 1938. Med den var det "ande-teamet" hos Disney født: instruktøren Jack King og assistenterne Carl Barks (den senere serieskaber), Chuck Couch, Harry Reeves og Jack Hannah. Han var stadigvæk en hidsigprop, men han blev gjort mere nuanceret, og nye figurer blev tilføjet som nevøerne Rip, Rap og Rup, kæresten Andersine And og i en enkelt film Fætter Guf.
Under 2. verdenskrig blev der lavet film om anden i militærtjeneste, som han selvfølgelig gør meget klodset. Mest kendt er "Der Fuehrers Face" fra 1943, hvor anden drømmer, at han er i diktaturstaten Nutziland. Den film blev arkiveret af Disney efter krigen, men er senere vist meget uofficielt. Desuden medvirkede han i to mindre kendte spillefilm "Saludos Amigos" 1943 og "The Three Caballeros" 1945, der gav et lystigt billede af livet i Latinamerika.
Efter krigen blev omgivelserne mere hjemlige, men næppe mere fredfyldte. I 1947 overtog Jack Hannah pladsen som instruktør. Filmene handlede ofte om klammeri med andre, det kunne være en bi, Chip og Chap eller bare ting han ikke kunne til at makke ret. Anders var her ofte plageånden, hvis egne drillerier kom tilbage som en boomerang.
Fjernsynets fremmarch i 1950'erne satte snart stopper for de korte tegnefilm, og Jack Hannah blev sat til at redigere Disneys tv-shows og kæde de korte tegnefilm sammen i et længere forløb. Her blev Anders gjort mere sympatisk, men det var eksperten i alt, Raptus von And, der gjorde mest for tv-showet. I et andet tv-show Disney Sjov medvirkede Anders i tv-serierne Rip, Rap og Rup på eventyr, Bonkers, og Rap Sjak. I Rip, Rap og Rup på eventyr, var han sjældent med, men fik et nyt tøj. I Rap Sjak var hans matrostøj skiftet ud med en hawaii-skjorte med røde og hvide blomster. I Bonkers var han også med kort tid.
Anders And gik til tegneserien allerede tidligt efter sin debut i 1934, hvor han i avisstriber optrådte med sin makker fra "The Wise Little Hen," Peter Gris. Fra den 10. februar 1935 blev han en del af Mickeys avisstribe som musens kujonagtige og drillesyge ven, men fra 1936 kaprede han hovedrollen i Silly Symphony-striben. Forfatteren Ted Osborne og tegneren Al Taliaferro, der stod bag serieudgaven af The Wise Little Hen, pressede , og da det blev en succes kunne forfatteren Bob Karp i samarbejde med Taliaferro lave andens egen avisstribe.
Det blev en populær serie. I de allertidligste serier var Anders en hidsig, ondskabsfuld og pueril and med langt spidst næb og hænder, der knap kunne skelnes fra vinger. Senere blev han mere voksen, da han fik ansvaret for sine tre nevøer Rip, Rap og Rup, og kæresten Andersine kom til sammen med Bedstemor And.
Tegneseriefiguren Anders And blev senere udviklet yderligere af Carl Barks. I de tidlige tegnefilm var han for det meste doven og hidsig; men for at gøre hans figur brugbar til en tegneserie besluttede Barks at udvide hans personlighed. Anders' mest gennemgående karaktertræk er hans notoriske uheld, som desuden har den narrative funktion at give adgang til spændende eventyr, uden at serien udvikler sig for meget. På denne måde kan Anders eksempelvis blive involveret i alverdens skattejagter, og da han altid ender med at miste den fundne gevinst, kan alle historierne starte fra samme udgangspunkt.
For at give Anders en verden at bo i, skabte Barks byen Andeby i den amerikanske stat Calisota (som er en blanding af de to amerikanske stater Californien og Minnesota) med indbyggere som den rige onkel Joakim von And, den heldige Fætter Højben og den dygtige opfinder Georg Gearløs.
Anders lægger med sit engelske navn Donald Duck i øvrigt navn til donaldismen, fankulturen omkring Disney-tegneserier og -tegnefilm, som den norske forfatter Jon Gisle udviklede med sin bog af samme navn.
Anders bor i Andeby Paradisæblevej 111 med sine tre nevøer Rip, Rap og Rup. De er stort set identiske, men de kan i nogle historier identificeres , hvilken farve kasket de har .
Ifølge Disneytegneserieforfatteren Don Rosa var Anders født et eller andet sted omkring 1920 men dette er "ikke" officielt. Ifølge Carl Barks' stamtræ (senere udviklet og genbygget af Don Rosa for den danske udgiver Egmont Serieforlaget) er Anders' forældre Hortensia von And og Rapmus And. Anders har en søster ved navn Della And, men hverken hun eller Anders' forældre optræder i tegnefilmene eller tegneserierne bortset fra særlige steder som eksempelvis i Her er dit liv, Joakim. Ifølge Don Rosa er Anders og Della tvillinger.
Fra tegnefilmen "Mr. Duck Steps Out" har Anders' kæreste været Andersine And, men han går i stadig fare for at miste hende til den heldige Fætter Højben. I nogle italienske historier er Anders også superhelt under dæknavnet "Stålanden".
Anders' onkel, Joakim von And, er den rigeste and i verden.
Sammen med onkelen og nevøerne Rip, Rap og Rup har Anders And rejst jorden rundt til mange forskellige lande og steder. Blandt disse er landet Langtbortistan, hvis navn blev opfundet af den danske oversætter Sonja Rindom og senere er gledet ind i almindeligt, dansk sprogbrug.
I de tidlige historier af Carl Barks havde Anders en hale, der stak langt bagud. Han havde langt næb og lang hals, og hans matrostrøje havde fire knapper. Hans lange hals passede godt til egenskaben nysgerrighed og det lange næb til hans hidsighed, hvilket var to egenskaber, der prægede ham mest. Disse tidlige historier var også præget af en grov komik i stil med tegnefilmene.
Siden fik han et mere strømlinet udseende og kortere næb (dog ikke kort som visse tegnere i 1960'erne gjorde det!) og kun to knapper på trøjen, et udseende de øvrige andetegnere også tager til sig. Her blev hans natur også mere sammensat, og han ligner mest af alt en tragisk helt. Komikken kommer mere og mere til at ligge i replikkerne.
Anders And optræder særligt i jumbobøgerne med en hemmelig identitet i form af superhelten Stålanden. Figuren er inspireret af Batman og er skabt af den italienske forfatter Guido Martina i samarbejde med kunstneren Giovan Battista Carpi i 1969 i hans italienske navn Paperinik. Ofte tegnet af Romano Scarpa.
I lighed med inspirationskilden er han maskeret og har et hav af tekniske opfindelser, som han bruger i kamp mod forbryderne og overvejende! i kamp for at redde sit andet jeg, Anders And, ud af kniben. Den eneste, som kender hans hemmelige identitet, er opfinderen Georg Gearløs, som har udstyret gamle 313 med moderne udstyr og finurligheder. Det er ikke tit at Stålanden optræder; næsten kun i Jumbobøger, men har dog også optrådt i Anders And-bladene med en gæstehistorie, hvor Stålanden kæmper mod en tidligere fjende, som nu havde kaldt sig Lord Hvalros.
Efter at Stålanden i starten af 1990'erne ikke var benyttet så meget af historieskriverne, forsvandt han næsten ud af Disney-universet indtil 1996, hvor en ny serie, "Stålanden på nye eventyr", startede med Stålanden i hovedrollen (umiddelbart inspireret af Marvel universet). Denne relancering af Stålanden gav karakteren det ekstra, der skulle til for at få et godt comeback.
I modsætning til størstedelen af Anders And-tegneserier har denne serie en sammenhængende forløb. I serien optræder kun sjældent de andre figurer fra de normale Anders And tegneserier; oftest er det kun en kort birolle eller en reference, men til gengæld er en mængde nye figurer kommet til.
Serien starter med, at Anders And er ansat som vicevært i Ducklair Tower, et højhus bygget af mangemilliardæren Everett Ducklair, en fremragende videnskabsmand og opfinder, som forlod Andeby og drog til et tibetansk kloster, Dhasam-Bul. Anders finder Globus, en kunstig intelligens skabt af Ducklair, samt Ducklair's arsenal af våben og opfindelser. Dette bliver starten på Anders' liv som Stålanden.
En mængde temaer var ofte i centrum for historierne, bl.a. tidsrejser og Tidspolitiets kamp med tidspiraterne fra Organisationen, invasion fra rummet af de magtsyge evronianere, Stålandens samarbejde med FBI og meget mere.
Serien fik en fornyelse i 2001, hvilket ændrede markant historierne. Everett Ducklair vender tilbage, slukker Globus, smider Stålanden ud af Ducklair Tower og genopretter sit gamle imperium. Undervejs bliver Ducklair's to døtre afsløret. De hader begge Everett af grunde, der ikke bliver afsløret til fulde, selvom det bliver antydet, at Everett skilte sig af med deres mor på en eller anden måde.
Denne fornyelse holdt 18 numre, før serien blev afsluttet, dog uden at historierne fik en slutning.
Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i """;

View file

@ -0,0 +1,35 @@
// This text is an extract from the English Wikipedia article about Anarchism:
// https://en.wikipedia.org/wiki/Anarchism
//
// The extract is based on the Wikipedia database dump. All markup has been
// removed using WikiExtractor: https://github.com/attardi/wikiextractor
//
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
const String en = """
Anarchism
Anarchism is a radical political movement that is highly skeptical towards authority and rejects all forms of unjust hierarchy. It calls for the abolition of the state which it holds to be undesirable, unnecessary, and harmful. Anarchism advocates for the replacement of the state with stateless societies or other forms of free associations.
Anarchism's timeline stretches back to prehistory when people lived in anarchistic societies long before the establishment of formal states, kingdoms or empires. With the rise of organised hierarchical bodies, skepticism towards authority also rose, but it was not until the 19th century a self-conscious political movement was formed. During the latest half of 19th and the first decades of 20th century, the anarchist movement flourished to most parts of the world, and had a significant role in worker's struggles for emancipation. Various branches of anarchism were espoused during those times. Anarchists took part in several revolutions, most notably in the Spanish Civil War, where they were crushed by the fascists forces in 1939, marking the end of the classical era of anarchism. In the latest decades of the 20th century, the anarchist movement nonetheless became relevant and vivid once more.
Anarchism employ various tactics in order to meet their ideal ends; these can be broadly separated in revolutionary and evolutionary tactics. There is significant overlap between the two legs which are merely descriptive. Revolutionary tactics aim to bring down authority and state, and have taken a violent turn in the past. Evolutionary tactics aim to prefigure what an anarchist society would be like. Anarchism's thought, criticism and praxis has played a part in diverse fields of human society.
The etymological origin of the word "anarchism" is from the ancient Greek word "anarkhia", meaning "without a ruler", composed of the prefix "an-" (i.e. "without") and the word "arkhos" (i.e. "leader" or "ruler"). The suffix -ism denotes the ideological current that favours anarchy. The word "anarchism" appears in English from 1642 as "anarchisme" and the word "anarchy" from 1539. Various factions within the French Revolution labelled their opponents as "anarchists", although few such accused shared many views with later anarchists. Many revolutionaries of the 19th century such as William Godwin (17561836) and Wilhelm Weitling (18081871) would contribute to the anarchist doctrines of the next generation, but they did not use the word "anarchist" or "anarchism" in describing themselves or their beliefs.
The first political philosopher to call himself an "anarchist" () was Pierre-Joseph Proudhon (18091865), marking the formal birth of anarchism in the mid-19th century. Since the 1890s and beginning in France, the term "libertarianism" has often been used as a synonym for anarchism and its use as a synonym is still common outside the United States. On the other hand, some use "libertarianism" to refer to individualistic free-market philosophy only, referring to free-market anarchism as libertarian anarchism.
While opposition to the state is central to anarchist thought, defining anarchism is not an easy task as there is a lot of talk among scholars and anarchists on the matter and various currents perceive anarchism slightly differently. Hence, it might be true to say that anarchism is a cluster of political philosophies opposing authority and hierarchical organization (including the state, capitalism, nationalism and all associated institutions) in the conduct of all human relations in favour of a society based on voluntary association, on freedom and on decentralisation, but this definition has the same shortcomings as the definition based on etymology (which is simply a negation of a ruler), or based on anti-statism (anarchism is much more than that) or even the anti-authoritarian (which is an "a posteriori" conclusion). Nonetheless, major elements of the definition of anarchism include the following:
During the prehistoric era of mankind, an established authority did not exist. It was after the creation of towns and cities that institutions of authority were established and anarchistic ideas espoused as a reaction. Most notable precursors to anarchism in the ancient world were in China and Greece. In China, philosophical anarchism (i.e the discussion on the legitimacy of the state) was delineated by Taoist philosophers Zhuangzi and Lao Tzu. Likewise, anarchic attitudes were articulated by tragedians and philosophers in Greece. Aeschylus and Sophocles used the myth of Antigone to illustrate the conflict between rules set by the state and personal autonomy. Socrates questioned Athenian authorities constantly and insisted to the right of individual freedom of consciousness. Cynics dismissed human law ("nomos") and associated authorities while trying to live according to nature ("physis"). Stoics were supportive of a society based on unofficial and friendly relations among its citizens without the presence of a state.
During the Middle Ages, there was no anarchistic activity except some ascetic religious movements in the Islamic world or in Christian Europe. This kind of tradition later gave birth to religious anarchism. In Persia, Mazdak called for an egalitarian society and the abolition of monarchy, only to be soon executed by the king. In Basra, religious sects preached against the state. In Europe, various sects developed anti-state and libertarian tendencies. Libertarian ideas further emerged during the Renaissance with the spread of reasoning and humanism through Europe. Novelists fictionalised ideal societies that were based not on coercion but voluntarism. The Enlightenment further pushed towards anarchism with the optimism for social progress.
During the French Revolution, the partisan groups of Enrags and saw a turning point in the fermentation of anti-state and federalist sentiments. The first anarchist currents developed throughout the 18th centuryWilliam Godwin espoused philosophical anarchism in England, morally delegitimizing the state, Max Stirner's thinking paved the way to individualism, and Pierre-Joseph Proudhon's theory of mutualism found fertile soil in France. This era of classical anarchism lasted until the end of the Spanish Civil War of 1936 and is considered the golden age of anarchism.
Drawing from mutualism, Mikhail Bakunin founded collectivist anarchism and entered the International Workingmen's Association, a class worker union later known as the First International that formed in 1864 to unite diverse revolutionary currents. The International became a significant political force, and Karl Marx a leading figure and a member of its General Council. Bakunin's faction, the Jura Federation and Proudhon's followers, the mutualists, opposed Marxist state socialism, advocating political abstentionism and small property holdings. After bitter disputes the Bakuninists were expelled from the International by the Marxists at the 1872 Hague Congress. Bakunin famously predicted that if revolutionaries gained power by Marxist's terms, they would end up the new tyrants of workers. After being expelled, anarchists formed the St. Imier International. Under the influence of Peter Kropotkin, a Russian philosopher and scientist, anarcho-communism overlapped with collectivism. Anarcho-communists, who drew inspiration from the 1871 Paris Commune, advocated for free federation and distribution of goods according to one's needs.
At the turning of the century, anarchism had spread all over the world. In China, small groups of students imported the humanistic pro-science version of anarcho-communism. Tokyo was a hotspot for rebellious youth from countries of the far east, pouring into the Japanese capital to study. In Latin America, So Paulo was a stronghold for anarcho-syndicalism where it became the most prominent left-wing ideology. During this time, a minority of anarchists adopted tactics of revolutionary political violence. This strategy became known as propaganda of the deed. The dismemberment of the French socialist movement into many groups and the execution and exile of many Communards to penal colonies following the suppression of the Paris Commune favoured individualist political expression and acts. Even though many anarchists distanced themselves from these terrorist acts, infamy came upon the movement. Illegalism was another strategy which some anarchists adopted these same years.
Anarchists enthusiastically participated in the Russian Revolutiondespite concernsin opposition to the Whites. However, they met harsh suppression after the Bolshevik government was stabilized. Several anarchists from Petrograd and Moscow fled to Ukraine, notably leading to the Kronstadt rebellion and Nestor Makhno's struggle in the Free Territory. With the anarchists being crushed in Russia, two new antithetical currents emerged, namely platformism and synthesis anarchism. The former sought to create a coherent group that would push for the revolution while the latter were against anything that would resemble a political party. Seeing the victories of the Bolsheviks in the October Revolution and the resulting Russian Civil War, many workers and activists turned to communist parties which grew at the expense of anarchism and other socialist movements. In France and the United States, members of major syndicalist movements, the General Confederation of Labour and Industrial Workers of the World, left their organisations and joined the Communist International.
In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised """;

View file

@ -0,0 +1,24 @@
// This text is an extract from the Nepali Wikipedia article about Nepal
// (): https://ne.wikipedia.org/wiki/
//
// The extract is based on the Wikipedia database dump. All markup has been
// removed using WikiExtractor: https://github.com/attardi/wikiextractor
//
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
const String ne = """
(िि : ि ) ि ि िि ि ि २६ ि २२ िि ३० ि २७ ि ८० ि िि ८८ ि १२ ि ि ,४७,१८१ ि.ि .०३% ि .३% ि "ग्रीनवीच मिनटाइम" ि ि ८६ ि १५ ि ि ४५ ि ि ि
ि ि ८८५ ि.ि. ि ि ि ि ि २४१ ि.ि. १४५ ि.ि. १९३ ि.ि. ि ि ि, ि ८०% ि ि ि ि ि ि , , ि ि ि ि ि ि िि ि ि ि ि ि १४ ि , ि ( ) ि , ि िि , ि, , , , , ,
ि , ि ि ि ि 'ने' ि ि - ि , ि िि ि. . २०४६ ि ि ि िि ि ि ि िि १९९६ ि ...() ि िि ि
ि ि ि ि ि ि , १३, ि ि ि २००२ ि िि ि २००५ ि २००६ ि (-) ि २४, २००६ ि ि १८, २००६ ििि ि ि ि ि ि ि "सङ्घीय लोकतान्त्रिक गणराज्य, संविधानसभा" ि २८, २००८ िि
ि ि ि ि , ि : - ि ,५०० ि
१५०० ि - ि १००० ि - ि ( ५६३४८३) , ि, ि ि
२५० , """;

View file

@ -0,0 +1,44 @@
// This text is an extract from the Russian Wikipedia article about Lithuania
// (Литва): https://ru.wikipedia.org/wiki/Литва
//
// The extract is based on the Wikipedia database dump. All markup has been
// removed using WikiExtractor: https://github.com/attardi/wikiextractor
//
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
const String ru = """
Литва
Литва́ (), официальное название Лито́вская Респу́блика () государство, расположенное в северной части Европы. Столица страны Вильнюс.
Площадь км². Протяжённость с севера на юг 280 км, а с запада на восток 370 км. Население составляет человек (сентябрь, 2019). Занимает 140-е место место в мире по численности населения и 121-е по территории. Имеет выход к Балтийскому морю, расположена на его восточном побережье. Береговая линия составляет всего 99 км (наименьший показатель среди государств Балтии). На севере граничит с Латвией, на юго-востоке с Белоруссией, на юго-западе с Польшей и Калининградской областью России.
Член ООН с 1991 года, ЕС и НАТО с 2004 года, ОЭСР с мая 2018 года. Входит в Шенгенскую зону и Еврозону.
Независимость страны провозглашена 11 марта 1990 года, а юридически оформлена 6 сентября 1991 года. .
Этимология слова «Литва» точно не известна, при этом существует множество версий, ни одна из которых не получила всеобщего признания. Корень «лит» и его варианты «лет»/«лют» допускают различные толкования как в балтских и славянских, так и в других индоевропейских языках. Так, например, существуют созвучные топонимы на территории Словакии «"Lytva"» и Румынии «"Litua"», известные с XIXII веков. По мнению Е. Поспелова, топоним образован от древнего названия реки Летава (Lietavà от «лить», русское «Летаука»). Феодальное княжество, по землям которого протекала эта река, со временем заняло ведущее положение и название было распространено на всё государство. В «Повести временных лет» (XII век) упоминается этноним «литва», полностью совпадающий с названием местности «Литва» и по смыслу (территория, где живёт литва), и по форме.
Поверхность  равнинная со следами древнего оледенения. Поля и луга занимают 57 % территории, леса и кустарники  30 %, болота  6 %, внутренние воды  1 %.
Высшая точка  293,84 м над уровнем моря  холм Аукштояс (или Аукштасис калнас) в юго-восточной части страны, в 23,5 км от Вильнюса.
Крупнейшие реки  Неман и Вилия.
Более 3 тыс. озёр (1,5 % территории): крупнейшее из них  Друкшяй на границе Латвии, Литвы и Белоруссии (площадь 44,8 км²), самое глубокое  Таурагнас, 61 м), самое длинное  Асвея длинной в 30 км у местечка Дубингяй.
Климат переходный от морского к континентальному. Средняя температура зимой 5 °C, летом +17 °C. Выпадает 748 мм осадков в год.
Полезные ископаемые: торф, минеральные материалы, строительные материалы.
Территория современной Литвы была заселена людьми с конца XIX тысячелетия до н. э. Жители занимались охотой и рыболовством, использовали лук и стрелы с кремнёвыми наконечниками, скребки для обработки кожи, удочки и сети. В конце неолита (IIIII тысячелетия до н. э.) на территорию современной Литвы проникли индоевропейские племена. Они занимались земледелием и скотоводством, при этом охота и рыболовство оставались основными занятиями местных жителей вплоть до широкого распространения железных орудий труда. Индоевропейцы, заселившие земли между устьями Вислы и Западной Двины, выделились в отдельную группу, названную учёными балтами.
Традиционно считается, что этническая основа Литвы сформирована носителями археологической культуры восточнолитовских курганов, сложившейся в V веке н. э. на территории современных Восточной Литвы и Северо-Западной Белоруссии. Около VII века литовский язык отделился от латышского.
Становление государственности на территории современной Литвы относят к XIII веку, при этом само название «Литва» впервые упомянуто в Кведлинбургских анналах под 1009 годом в сообщении об убийстве язычниками миссионера Бруно на границе Руси и Литвы. По наиболее распространённой версии, топоним возник от названия небольшой реки Летаука, притока Няриса. Согласно более современной гипотезе, название страны могло произойти от этнонима «леты» или «лейти», которым жители окрестных земель называли дружинников литовских князей.
В начале XIII века в земли балтов-язычников с запада началось вторжение немецких рыцарей-крестоносцев. Они покорили Пруссию и Ливонию. В это же время с юга началась экспансия Галицко-Волынского княжества. К середине XIII века многие литовские земли были объединены под властью князя Миндовга, принявшего в 1251 году католическое крещение и коронованного в 1253 году. Через несколько лет Миндовг отрёкся от христианства и до начала XIV века литовские земли оставались языческими. Несмотря на то, что уже в 1263 году Миндовг был свергнут, его правление положило начало более чем пятисотлетнему существованию Великого княжества Литовского.
В XIV  начале XV веках территория Великого княжества Литовского стремительно росла, в основном за счёт присоединения земель Западной Руси. Включение в состав государства славянских земель, многократно превышающих по площади и количеству населения собственно литовские земли, привело к перениманию литовскими князьями, получившими во владение русские земли, православной культуры и западнорусского языка. Со временем западнорусский язык стал официальным языком канцелярии великих князей. Собственно литовский язык до XVI века оставался бесписьменным, хотя и продолжал использоваться на этнически литовских землях.
В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.""";

View file

@ -0,0 +1,46 @@
// This text is an extract from the Slovak Wikipedia article about Esperanto:
// https://sk.wikipedia.org/wiki/Esperanto
//
// The extract is based on the Wikipedia database dump. All markup has been
// removed using WikiExtractor: https://github.com/attardi/wikiextractor
//
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
const String sk = """
Esperanto (pôvodne Lingvo Internacia medzinárodný jazyk) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.
Hoci žiaden štát neprijal esperanto ako úradný jazyk, používa ho komunita s odhadovaným počtom hovoriacich 100 000 2 000 000, z čoho približne 2 000 tvoria rodení hovoriaci. V Poľsku je na zozname nemateriálneho kultúrneho dedičstva. Získalo aj isté medzinárodné uznania, napríklad dve rezolúcie UNESCO či podporu známych osobností verejného života. V súčasnosti sa esperanto využíva pri cestovaní, korešpondencii, medzinárodných stretnutiach a kultúrnych výmenách, kongresoch, vedeckých diskusiách, v pôvodnej aj prekladovej literatúre, divadle a kine, hudbe, tlačenom aj internetovom spravodajstve, rozhlasovom a televíznom vysielaní.
Slovná zásoba esperanta pochádza predovšetkým zo západoeurópskych jazykov, zatiaľ čo jeho skladba a tvaroslovie ukazujú na silný slovanský vplyv. Morfémy nemenné a je možné ich kombinovať takmer bez obmedzení do rozmanitých slov; esperanto teda mnoho spoločného s analytickými jazykmi, ako je čínština, zatiaľ čo vnútorná stavba jeho slov pripomína jazyky aglutinačné, ako je japončina, swahilčina alebo turečtina.
Pri zrode esperanta stál Ludwik Lejzer Zamenhof. Vyrastal v mnohojazyčnom, vtedy ruskom, teraz poľskom meste Białystok, kde bol svedkom častých sporov medzi jednotlivými národnosťami (Rusi, Poliaci, Nemci, Židia). Pretože za jednu z hlavných príčin týchto sporov považoval neexistenciu spoločného jazyka, začal ako školák pracovať na projekte reči, ktorá by túto funkciu mohla plniť. Mala byť, na rozdiel od národných jazykov, neutrálna a ľahko naučiteľná, teda prijateľná ako druhý jazyk pre všetkých, jazyk vyučovaný spoločne s národnými jazykmi a používaný v situáciách vyžadujúcich dorozumenie medzi národmi.
Zamenhof najskôr uvažoval o oživení latinčiny, ktorú sa učil v škole, ale usúdil, že je pre bežné dorozumievanie zbytočne zložitá. Keď študoval angličtinu, všimol si, že časovanie slovies podľa osoby a čísla nie je nutné; že gramatický systém jazyka môže byť oveľa jednoduchší, než sa dovtedy nazdával. Stále však zostávala prekážka v memorovaní sa veľkého množstva slov. Raz Zamenhofa zaujali dva ruské nápisy: "швейцарская" [švejcarskaja] (vrátnica, odvodené od "швейцар" [švejcar] vrátnik) a "кондитерская" [konditerskaja] (cukráreň, odvodené od "кондитер" [konditér] cukrár). Tieto slová rovnakého zakončenia mu vnukli myšlienku, že používanie pravidelných predpôn a prípon by mohlo významne znížiť množstvo slovných koreňov nutných na dorozumenie sa. Aby boli korene čo najmedzinárodnejšie, rozhodol sa prevziať slovnú zásobu predovšetkým z románskych a germánskych jazykov, teda tých, ktoré boli vtedy v školách po celom svete vyučované najčastejšie.
Prvý Zamenhofov projekt, nazvaný "Lingwe uniwersala," bol viac-menej hotový v roku 1878, ale autorov otec, učiteľ jazykov, považoval túto prácu za márnu a utopistickú, a zrejme preto rukopis, ktorý mu bol zverený, zničil. V rokoch 1879  1885 Zamenhof študoval medicínu v Moskve a vo Varšave. V tej dobe začal znova pracovať na medzinárodnom jazyku. Prvú obnovenú verziu vyučoval v roku 1879 pre svojich priateľov. Po niekoľkých rokoch prekladal poéziu, aby jazyk čo najviac zdokonalil. V roku 1885 autor napísal:
Zamenhofovi prichádzalo veľa nadšených listov, ktoré často prinášali najrôznejšie návrhy úprav jazyka. Všetky podnety zaznamenával a neskoršie ich začal uverejňovať v časopise "Esperantisto", vychádzajúcom v Norimbergu. V tom istom časopise aj dal o úpravách dvakrát hlasovať, väčšina čitateľov však so zmenami nesúhlasila. Po týchto hlasovaniach na určitý čas utíchli hlasy volajúce po reforme a jazyk sa začal rozširovať. Najviac odberateľov mal časopis vo vtedajšom Rusku. Veľkou ranou preň bolo, keď ruská cenzúra jeho šírenie zakázala kvôli článku Leva Nikolajeviča Tolstého. Časopis kvôli tomu musel byť zrušený, krátko na to bol však vystriedaný novým, nazvaným "Lingvo Internacia." Najskôr ho redigovali vo švédskej Uppsale, neskôr v Maďarsku a nakoniec v Paríži, kde jeho vydávanie zastavila prvá svetová vojna.
Nový medzinárodný jazyk začali jeho používatelia skoro používať aj na organizáciu odbornej a záujmovej činnosti na medzinárodnej úrovni. V prvých desaťročiach prebiehala komunikácia v esperante takmer výhradne písomnou formou. Ale po nečakane úspešnom prvom Svetovom kongrese esperanta, usporiadanom v roku 1905 vo francúzskom meste Boulogne-sur-Mer, na ktorom sa overili možnosti používania tejto reči v hovorenej forme, začali naberať na intenzite aj osobné kontakty.
Esperanto začali pre svoju činnosť používať aj rôzne organizácie a hnutia. na svetovom kongrese v Barcelone roku 1909 sa uskutočnilo niekoľko stretnutí prítomných katolíkov, ktorí sa nakoniec rozhodli usporiadať v nadchádzajúcom roku, 1910, samostatný kongres katolíckych esperantistov. Počas neho bolo založené Medzinárodné združenie katolíckych esperantistov (IKUE Internacia Katolika Unuiĝo Esperantista). Časopis "Espero Katolika" ("Katolícka nádej") vychádzal od roku 1903 a s viac ako 100 rokmi svojej existencie je dnes najdlhšie vychádzajúcim esperantským periodikom.
V roku 1912 sa Zamenhof pri slávnostnom prejave ôsmeho Svetového kongresu esperanta v Krakove vzdal svojej oficiálnej úlohy v hnutí. Desiaty kongres sa mal konať v roku 1914 v Paríži, prihlásilo sa naň takmer 4 000 ľudí, ale nakoniec ho zrušili pre začínajúcu vojnu, Zamenhof sa vtedy musel vrátiť domov cez škandinávske štáty.
Po vojne túžba po harmónii a mieri vzbudila nové nádeje, vďaka čomu sa esperanto veľmi rýchlo šírilo. Prvý povojnový kongres sa konal v roku 1920 v Haagu, 13. svetový kongres v 1921 v Prahe. V roku 1927 bolo vo viedenskom Hofburgu otvorené Medzinárodné esperantské múzeum, v roku 1929 bolo pripojené k Rakúskej národnej knižnici a dnes sídli v samostatnej budove.
Snahy o presadenie esperanta ako univerzálneho jazyka sa stretávali s pozitívnou odozvou: Petíciu v jeho prospech adresovanú Organizácii Spojených národov podpísalo vyše 80 miliónov ľudí, v Česko-Slovensku napríklad prof. Jaroslav Heyrovský, nositeľ Nobelovej ceny.
Valné zhromaždenie UNESCO prijalo podobné rezolúcie v Montevideu 10. decembra 1954 a v Sofii 8. novembra 1985. Vzalo v nich na vedomie "výsledky dosiahnuté esperantom na poli medzinárodnej duchovnej výmeny aj zblíženia národov sveta" a vyzvalo členské štáty, "aby sa chopili iniciatívy pri zavádzaní študijných programov o jazykovom probléme a esperante na svojich školách a inštitúciách vyššieho vzdelávania".
K esperantu sa hlásila aj rada predsedov Poľskej akadémie vied. Jubilejného 72. Svetového kongresu esperanta roku 1987 (100. výročie uverejnenia prvej učebnice jazyka) sa vo Varšave zúčastnilo takmer 6 000 ľudí zo 60 národov.
Pokroky dosiahli aj katolícki esperantisti roku 1990 bol vydaný dokument "Norme per la celebrazione della Messa in esperanto", ktorým Svätá stolica povoľuje vysluhovať sväté omše v tomto jazyku bez zvláštneho povolenia. Esperanto sa tak stalo jediným schváleným umelým liturgickým jazykom katolíckej cirkvi.
Skutočnosť, že mnohé z cieľov esperantského hnutia sa doteraz nepodarilo naplniť, je často prisudzovaná okrem iného technologickej a kultúrnej dominancii Spojeného kráľovstva a Spojených štátov amerických, predovšetkým v období po druhej svetovej vojne, vďaka čomu je v súčasnosti dorozumievacím jazykom väčšiny medzinárodných činností angličtina.
na začiatku 20. storočia bolo na území dnešného Slovenska (vtedy severná časť Uhorska) činné esperantské hnutie. Esperantistov a kluby zastrešovala Uhorská esperantská spoločnosť a Verda Standardo. V Prahe boli činné spolky "Bohema Unio Esperantista", ktorý prijímal len organizácie a kluby, a "Bohema Asocio Esperantista", ktorý prijímal jednotlivcov. Oba spolky vydávali svoje časopisy. V roku 1907, 20 rokov po zverejnení jazyka Zamenhofom, vydal tolstojovec Albert Škarvan spolu s Rusom N. P. Evstifejevom prvú učebnicu esperanta v slovenčine, Základy medzinárodnej reči ESPERANTO.
Po prvej svetovej vojne sa oba pražské spolky zlúčili do "Československej Esperantskej Asociácie". bola v roku 1936 premenovaná na "Esperantskú Asociáciu v Československej republike". V tomto období bolo hnutie veľmi aktívne, fungovalo mnoho klubov, konalo sa veľa prednášok a kurzov. Esperanto bolo vyučované na školách rôznych stupňov, rádio Bratislava od 1930 vysielalo kurzy a od 1932 aj kultúrny program v esperante. Bola vydaná "Československá antológia" predstavujúca diela 20 slovenských autorov. V rámci protifašistickej aktivity vychádzali aj preklady protifašistických článkov z esperantských časopisov z obdobia Španielskej občianskej vojny.
Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.""";

View file

@ -0,0 +1,73 @@
// This text is an extract from the Chinese Wikipedia article about Kanji
// (): https://zh.wikipedia.org/wiki/
//
// The extract is based on the Wikipedia database dump. All markup has been
// removed using WikiExtractor: https://github.com/attardi/wikiextractor
//
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
const String zh = """
丿𠄌𠃋𠃉𠃊
5471-{}-6464-{}-𠔻52
TRON计划中使3-{}-3-{}-84C区JMK66147C区的时间原因被安排到了扩展D区G区并被接受
西Unicode中它們都是獨立區塊編碼的
Unicode中與漢字一道編入漢字區
Unicode中作為獨立區塊編碼
滿
使
滿
使使使使使使
3使使-{}--{}--{}--{}--{}--{}-
3使-l
1443使使2011使1948
1便使便
1945使
使
西
使
-{}--{}-
使-{}--{}--{}--{}--{}--{}-
1956-{}--{}-1988-{}--{}--{}--{}--{}--{}-
26
OCR广
GB 2312B""";