Skip to content

Instantly share code, notes, and snippets.

@karmi
Created April 22, 2011 09:35
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save karmi/936346 to your computer and use it in GitHub Desktop.
Save karmi/936346 to your computer and use it in GitHub Desktop.
Playing with Language Classification with N-Grams in Ruby
# encoding: utf-8
require './ngram'
# >>> Read example texts
cz_text = File.read('X-cz.txt')
en_text = File.read('X-en.txt')
# >>> Compute n-gram hashtables from example text
cz = table( ngrams(cz_text) )
en = table( ngrams(en_text) )
# p cz.keys & text.keys
# p en.keys & text.keys
SENTENCES = [
'The quick brown fox jumps over the lazy dog.',
'Příliš žluťoučký kůň úpěl ďábelské ódy.',
'nekdy to proste funguje tak, jak by melo, i bez diakritiky',
'těžko říct, kdy se to chytne a kdy ne, to nikdo neví',
'This sentence is not missing a the and a this. It is a correct english sentence. Rather long one.',
'This shorter sentence is ...',
'Chtěl bych vás všechny nyní ujistit, že vše v našem státě je v nejlepším pořádku.',
'God, guns, and taxes!',
'God save the Queen!',
'tak myslim ze jim ta godzila da dobre na prdel',
'wtf, dude?',
'ses posral ne? LOL',
'Myslím, že jsi prostě a jednoduše udělal chybu v úsudku.',
'to jsou ale blbci',
'Earth is the third planet from the Sun and the densest and fifth-largest of the eight planets in the Solar System. It is also the largest of the Solar System\'s four terrestrial planets.',
'Země je třetí planeta sluneční soustavy, zároveň největší terestrická planeta v soustavě a jediné planetární těleso, na němž je dle současných vědeckých poznatků potvrzen život.'
]
puts '='*80
cz_distance = 0
en_distance = 0
SENTENCES.each do |sentence|
puts "Sentence: #{sentence}"
# >>> Compute n-gram hastable for text
document_ngrams = table( ngrams sentence )
document_ngrams.each do |n|
# p ["cz:#{n}", cz.index(n), document_ngrams.index(n)]
# p ["en:#{n}", en.index(n), document_ngrams.index(n)]
# >>> Compute distance for languages
cz_distance += ( (position = cz.index n) ? position - document_ngrams.index(n) : cz.size ).abs
en_distance += ( (position = en.index n) ? position - document_ngrams.index(n) : en.size ).abs
end
puts "CZ distance: #{cz_distance}",
"EN distance: #{en_distance}",
"Likely: #{ cz_distance < en_distance ? 'CZ' : 'EN' } " +
"; difference: #{ ([ cz_distance, en_distance ].max - [ cz_distance, en_distance ].min) }",
'-'*80
end
# encoding: utf-8
#
# = N-Grams in Ruby
#
# See:
# http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.21.3248&rep=rep1&type=pdf
# http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.720&rep=rep1&type=pdf
#
# == Example
#
# 'TEXT'
# tri-grams: _TE, TEX, EXT, XT_, T__
#
def unigrams(string)
tokenize(string).map { |token| ngram(token, 1) }.flatten
end
def bigrams(string)
tokenize(string).map { |token| ngram(token, 2) }.flatten
end
def trigrams(string)
tokenize(string).map { |token| ngram(token, 3) }.flatten
end
def tetragrams(string)
tokenize(string).map { |token| ngram(token, 4) }.flatten
end
def pentagrams(string)
tokenize(string).map { |token| ngram(token, 5) }.flatten
end
def ngrams(string)
unigrams(string) + bigrams(string) + trigrams(string) + tetragrams(string) + pentagrams(string)
end
def tokenize(string)
string.
# >>> Split text into tokens (words)
split(/\W/).
# >>> Downcase tokens
map(&:downcase).
# >>> Ignore numeric tokens
reject { |t| t =~ /\d/ }
end
def ngram(token, n)
ngrams = []
# >>> Add initial n-gram
ngrams << '_' + token.slice(0...(n-1))
# >>> Compute n-grams from remaining characters of token
i=0; while i < token.size do
# >>> Slice text into n-sized chunks
ngrams << slice = token.slice(i..i+(n-1)).ljust((n), '_')
i += 1
end
return ngrams
end
def table(ngrams)
# >>> Compute a hashtable of n-gram with occurences
ngrams.inject({}) do |hash,t|
exists = hash[t] ? hash[t] += 1 : hash[t] = 0
hash
end.
# >>> Sort n-grams by occurence
sort { |a,b| b[1] <=> a[1] }.
# >>> Add n-gram into result
map { |a| a[0] }.
# >>> Limit result to top n n-grams
slice(0..300)
end
if __FILE__ == $0
text = 'TEXT IS GOOD AND GROOVY'
# p unigrams(text)
# p bigrams(text)
# p trigrams(text)
p table( ngrams(text) )
end
Tento článek pojednává o hlavním městě České republiky. Další významy jsou uvedeny v článku Praha (rozcestník).
Hlavní město Praha
Interaktivní mapa Městské části
Praha je hlavní a současně největší město České republiky. Leží mírně na sever od středu Čech na řece Vltavě, uvnitř Středočeského kraje, jehož je správním centrem, ale jako samostatný kraj není jeho součástí. Je sídlem velké části státních institucí a množství dalších organizací a firem. Sídlí zde prezident republiky, vláda, ústřední státní orgány a vrchní soud. Mimoto je Praha sídlem řady dalších úřadů, jak ústředních, tak i územních samosprávných celků; sídlí zde též ústředí většiny politických stran a centrály téměř všech církví, náboženských a dalších sdružení s celorepublikovou působností registrovaných v ČR.
Do dnešní podoby se Praha vyvíjela jedenáct století. Coby historická metropole Čech byla v minulosti sídelním městem českých knížat a králů, římsko-německých císařů a hlavním městem Československa. V současnosti se rozkládá na území 496 čtverečních kilometrů a má zhruba 1,3 milionu obyvatel.[3] Pražská metropolitní oblast měla v roce 2004 (podle Eurostatu) zhruba 2 miliony obyvatel.[4]
Zároveň je Praha také vysoce ekonomicky vyspělým a bohatým regionem s výjimečně vysokou životní úrovní, přičemž tímto vyniká nejen nad české, ale i nad evropské standardy. Podle statistik Eurostatu je šestým nejbohatším regionem v Evropě a HDP na obyvatele V Praze dosahuje 172 % průměru celé EU (HDP na obyvatele ČR dosahuje pouze 80 %).[5][6]
Praha je všeobecně považována za jedno z nejkrásnějších měst v Evropě.[7] Historické centrum města s jedinečným panoramatem Pražského hradu, největšího hradního komplexu na světě,[8] je památkovou rezervací UNESCO. Právě historické jádro města a mnohé památky přilákají ročně miliony turistů ze zemí celého světa, v roce 2007 navštívilo Prahu 4 009 000 turistů, což ji činí jedním z nejnavštěvovanějších měst Evropy. V roce 2006 byla na 8. místě nejnavštěvovanějších měst Evropy. Pak v roce 2007 na 7. místě. A v téhož roku na 19. místě nejnavštěvovanějších měst světa.
Obsah
1 Název a přívlastky
2 Historie
2.1 Počátky hradu a města Prahy
2.2 Středověk
2.3 Sjednocení pražských měst
2.4 Velká Praha
2.5 Druhá světová válka
2.6 Praha jako hlavní město socialistického Československa
2.7 Praha po sametové revoluci
3 Geografie
3.1 Podnebí
3.2 Kvalita ovzduší
4 Ekonomika
4.1 Ekonomická aktivita obyvatel[18]
4.2 Zpracovatelský průmysl
5 Obyvatelstvo
6 Kultura
6.1 Pamětihodnosti
6.1.1 Památky Pražské památkové rezervace
6.1.2 Památky mimo území Pražské památkové rezervace
6.2 Muzea
6.3 Divadlo
6.4 Hudba
6.5 Restaurace a kluby
7 Správa
7.1 Postavení Prahy v rámci České republiky
7.2 Členění Prahy
7.2.1 Katastrální členění
7.2.2 Významné čtvrti
7.2.3 Územní členění
7.3 Správní a samosprávné členění
8 Doprava
9 Partnerská města
10 Poznámky
11 Odkazy
11.1 Literatura
11.2 Reference
11.3 Související články
11.4 Externí odkazy
Název a přívlastky
Od roku 1920 je oficiálním názvem města Hlavní město Praha, předtím od roku 1784 Královské hlavní město Praha. V jiných jazycích jméno obvykle zní Praga (latina, většina románských a slovanských jazyků), Prag (němčina) nebo Prague (angličtina a francouzština); vizte také rámeček „v jiných jazycích“.
Jméno Praha se tradičně odvozuje od slova práh. Historici obvykle tvrdí, že Praha je pojmenována po říčním prahu či jezu, který se nacházel někde na místě dnešního Karlova mostu. Přes tento brod přecházeli lidé přes řeku. Protože se město začalo rozrůstat právě nad tímto brodem, tedy prahem v řece, bylo nazváno Praha. Pověst o založení Prahy název vysvětluje tím, že kněžna Libuše nechala založit město tam, kde osadník uprostřed lesa tesal práh ke svému srubu.
Přívlastek Praga Caput Regni (Praha hlava království) byl používán od středověku, v roce 1518 byl vyznačen na Staroměstské radnici. Od roku 1927 byl součástí znaku Prahy přívlastek Praha matka měst (latinsky Praga mater urbium), od roku 1991 je pak součástí znaku přívlastek Praga Caput Rei publicae (Praha hlava republiky).[9] Přívlastek Praha stověžatá zřejmě poprvé použil historik Josef Hormayer počátkem 19. století, tou dobou tyto věže spočítal matematik a filozof Bernard Bolzano a dospěl k číslu 103 (bez vodáren a soukromých domů).
Panorama Prahy z vrchu Petřína
Historie
Související informace lze nalézt také v článku Dějiny Prahy.
Kněžna Libuše věští slávu Prahy, obraz Josefa Mathausera
Počátky hradu a města Prahy
Na území dnešní Prahy sídlila v předhistorické době řada nejrůznějších kmenů – poslední nálezy u Křeslic datují zdejší osídlení do doby před sedmi tisíci lety (jde o kulturu s lineární – dříve volutovou – keramikou). Na stejném místě je však doloženo i mnohem pozdější germánské sídliště. V 6. století začali osídlovat pražskou kotlinu Slované. Důležitým kultovním místem se stal ostroh nad řekou Vltavou, kde nechal kníže Bořivoj postavit koncem 9. století druhý křesťanský kostelík v Čechách, zasvěcený Panně Marii. Za vlády Bořivojova syna Spytihněva I. na počátku 10. století byla celá plošina ostrohu obehnána obranným valem a vznikl zde knížecí palác. Tak byly položeny základy Pražského hradu, kam přesídlil kníže se svojí družinou z Levého Hradce. Praha se stala centrem rodícího se českého státu. Z Pražského hradu a dalších hradišť ve středních Čechách začali přemyslovští vládci spravovat okolní území, kde si postupně podřídili místní obyvatele a přiměli je k odvádění dávek. Existence knížecího hradu přivedla do jeho podhradí řemeslníky a obchodníky – začalo se rodit středověké město.
Středověk
Panorama Prahy koncem 15. století, dřevoryt z Norimberské kroniky
Počátkem 12. století byla Praha kvetoucím městem, nad nímž se vznosně vypínal knížecí Hrad. „Tam žijí Židé mající plno zlata a stříbra, tam jsou ze všech národů nejbohatší kupci, tam jsou nejzámožnější peněžníci, tam stojí tržiště a něm plno kořisti…“, napsal kdosi neznámý o Praze. Kupec Ibrahim Ibn Jakob napsal o Praze, že je to „město z kamene“, což bylo ve své době znakem spíše bohatých měst. Tehdejší Praha se rozkládala na území dnešního Starého Města. Pojmenování Starší - respektive latinsky Maior, to znamená také Větší – Město pražské získala poté, co Přemysl II. Otakar udělil roku 1257 městská práva pražskému podhradí, osídlenému již minimálně od 10. století. Tak vzniklo Menší Město pražské – Malá Strana. Příliv řemeslníků a kupců do obou měst sílil, zvláště když se v době panování Karla IV. Praha stala císařskou residencí a císař zamýšlel učinit z ní hlavní město Svaté říše římské. Prostor vymezený hradbami pražských měst však začal být pro početné příchozí brzy příliš těsný, a tak panovník přistoupil k velkorysému podniku – v roce 1348 založil Nové Město pražské a vytyčil pro ně rozsáhlé území rozprostírající se mezi Vyšehradem, Poříčím a Starým Městem. To bylo postupně zaplněno výstavnými měšťanskými domy, prostornými tržišti, nádhernými stavbami kostelů a klášterů. Velikostí a nádherou mohla Praha této doby soupeřit s nejslavnějšími městy Římem, Florencií, Paříží, Kolínem, napsal o sídelním městě Karla IV. František Palacký.
Sjednocení pražských měst
Týnský chrám na Staroměstském náměstí
K prvnímu pokusu o sjednocení Starého a Nového Města došlo v roce 1518 na popud staroměstských měšťanů vedených Janem Paškem z Vratu. Roku 1523 král Ludvík Jagellonský potvrdil sjednocenou městskou radu, a tak spojení pražských měst legalizoval. Jednotná Praha však byla již roku 1528 znovu rozdělena.
Sjednotit pražská města natrvalo do jednoho správního celku se podařilo až roku 1784 za vlády císaře Josefa II. Královské hlavní město Praha pak tvořilo Nové a Staré Město pražské, Malá Strana a Hradčany. Postupně byl připojen Josefov, Vyšehrad a Holešovice.
Na konci 19. století byla Praha již industrializovaným, rychle se rozvíjejícím městem se železnicí a továrnami, které nemělo svou velikostí v rámci českých zemí srovnání.[10] Roku 1893 byla zahájena pražská asanace, která zasáhla Josefov a Podskalí; začaly se rozvíjet elektrické dráhy, k městu se v roce 1901 připojila Libeň.
Velká Praha
Související informace lze nalézt také v článku Velká Praha.
Na konci první světové války byla vyhlášena nezávislost českého státu, ke kterému se vzápětí připojilo Slovensko. V Praze docházelo k ničení symbolů rakouského mocnářství. Přitom byly zničeny i některé památky, jako byl například Mariánský sloup na Staroměstském náměstí a později též pomník maršála Václava Radeckého (byl umístěn v Lapidáriu Národního muzea na Výstavišti a nahrazen pomníkem Ernsta Denise) na Malostranském náměstí.
Jako hlavní město nově ustanoveného Československa byla Praha i nadále modernizována a rozšiřována. Roku 1922 byla založena Velká Praha, do které byla zahrnuta všechna předměstí včetně do té doby samostatných měst jako Vinohrady, Nusle nebo Košíře. Praha, v niž vedle sebe žilo české, německé a židovské obyvatelstvo, se stala pozoruhodným kulturním centrem. Historizující styl, v němž bylo postaveno např. Národní divadlo, pseudogotické chrámy sv. Prokopa na Žižkově a sv. Ludmily na Náměstí Míru, či přestavěna vyšehradská bazilika, rázně odvrhla secese přelomu století (Obecní dům, nová budova Hlavního nádraží, Hotel Central v Hybernské ulici, Petřínská rozhledna a Průmyslový palác v Holešovicích, Husův pomník na Staroměstském náměstí). Desetileté secesní období přerušila 1. světová válka. Na konci dvacátých let 20. století se začal v architektuře projevovat funkcionalismus; byla také dostavěna gotická Katedrála svatého Víta.V září 1929 (za prezidenta T.G. Masaryka a arcibiskupa Františka Kordače, jak je uvedeno nad klenbou triumfálního oblouku chóru dómu) byla dokončena dostavba katedrály a slavnostně otevřena u příležitosti tisíciletí zavraždění svatého Václava.
Světově unikátní je architektura kubistická – jedině v Praze přešel kubismus z malířských pláten do architektury (Pavel Janák, Josef Gočár, Josef Chochol), ambiciózním plánem bylo založení kubistického sídliště na Vyšehradě.
Druhá světová válka
Adolf Hitler na Pražském hradě v březnu 1939
Od 15. března 1939 byla Praha hlavním městem Protektorátu Čechy a Morava. Kulturní život byl ochromen; po incidentu, jehož obětí byl student Jan Opletal, byly zavřeny vysoké školy. Během druhé světové války byli z Prahy deportováni do koncentračních táborů příslušníci tzv. „méněcenných ras“, tedy zejména židovské a cikánské (dle tehdejšího označení) obyvatelstvo. Běžné byly popravy a věznění odpůrců nacistického režimu. Nechvalně proslulou se v této souvislosti stala například úřadovna Gestapa v Petschkově paláci nebo střelnice v Kobylisích. Režim dále zesílil represe po úspěšném atentátu na zastupujícího říšského protektora Reinharda Heydricha v květnu 1942. 5. května 1945 vypuklo Pražské povstání, ovšem podle dohod mezi spojenci z protihitlerovské koalice musela americká armáda zůstat stát 6. května u Plzně, zatímco Rudá armáda dorazila do Prahy až 9. května.
Válečné škody na pražské zástavbě byly minimální; plánovanou likvidaci města už nemohl v té době oslabený a ustupující nacistický režim provést, k vážnějšímu poškození tedy došlo pouze za trojnásobného bombardování americkými letadly na konci války: 15. listopadu 1944 v Holešovicích[11] a 14. února 1945[12] zejména v Novém Městě, Nuslích a na Vinohradech. Výraznými stavbami, které vznikly jako náprava válečných škod, jsou věže kláštera v Emauzích nebo novější Tančící dům.
Praha jako hlavní město socialistického Československa
Po druhé světové válce začala vznikat první sídliště, a to napřed v období tzv. první dvouletky (1946–1948). V únoru 1948 se chopila moci Komunistická strana Československa a plánování a výstavba sídlišť se výrazně urychlila. Původní zástavba byla často nahrazena panelovými domy. V letech 1960, 1968, 1970 a 1974 bylo k Praze připojeno dalších celkem více než 60 obcí. V 60. a 70. letech se zmodernizovaly důležité dopravní stavby jako letiště a hlavní nádraží, začalo se budovat metro a takzvaný ZÁKOS – systém kapacitních městských komunikací, z nichž jedna oddělila Národní muzeum od Václavského náměstí. Na protest proti sovětské okupaci se tam 16. ledna 1969 upálil Jan Palach. Pro obyvatele byla na zelených loukách okolo Prahy budována panelová sídliště (největší z nich je Jižní Město).
Postupující ekonomický úpadek země zasáhl i Prahu, což se projevilo v zanedbaném vzhledu města i ve zhoršování služeb. Mocenský monopol komunistické strany ukončila Sametová revoluce.
Praha po sametové revoluci
Tančící dům od Vlada Miluniće a Franka O. Gehryho byl první stavbou od špičkového světového architekta v Praze po sametové revoluci. Jeho stavba rozpoutala rozsáhlou veřejnou diskuzi o moderní architektuře v Praze.
Zavedení standardních vztahů se západoevropskými zeměmi otevřelo Prahu turistice jako nikdy předtím. Rozvoj soukromého vlastnictví a podnikání se nakonec projevil ve zkvalitnění služeb a také v opravě chátrajících budov v samém historickém jádru města.
Individuální automobilová doprava, která před rokem 1990 nebyla tak intenzivní jako v mnohých městech západní Evropy, rychle rostla, a to vedlo k rychlému zhoršení dopravní situace ve městě. Poklesl rovněž i počet cestujících MHD. I přes 60% výdaje na dopravu z městského rozpočtu bude trvat stále mnoho let, než se podaří dobudovat metro či Pražský okruh.
Geografie
Petřín od Vltavy
Praha leží mírně na sever od středu Čech. Centrum se rozkládá v údolí Vltavy a jejích přítoků. Jejich erozní činnost vymodelovala členitý reliéf, nejnižším bodem je hladina Vltavy u Suchdola (177 m n. m.), nejvyšším pak nevýrazný vrch Teleček mezi Sobínem a Chrášťany (399 m n. m.). Televizní vysílač Cukrák nad Zbraslaví byl postaven v nadmořské výšce 412 m. V centru je výrazný vrchol Petřín (327 m n. m.) s rozhlednou z roku 1891, strmě se zdvihající od Vltavy.
Podnebí
Podnebí v Praze je mírné, teplejší než na jiných místech ve stejné zeměpisné šířce (50° s.š.) – např. v kanadském Winnipegu činí v zimě průměrná denní teplota –12 °C, noční –20 °C. Způsobuje také občasný silný vítr, jeho průměrná rychlost je 5 m/s (14 km/h). Větry ale ne vždy vanou ze západu.[13]
Průměrný roční úhrn srážek za roky 1961–1990 ze stanice Praha-Ruzyně byly 526,6 mm, z toho nejvíce napršelo v květnu (78 mm) a nejméně v lednu a únoru (23 mm). Za roky 2000–2007 bylo průměrně ročně 160 dnů deštivých. Ročně je zde přibližně 60 zasněžených dnů, nejvíce v lednu, kde průměrná výška sněhu je 5 cm. Průměrně je zde ročně přes 1600 slunečných hodin (5 hodin denně). Nejvíce slunečných hodin je v červnu (230, za den 8,5) a nejméně v prosinci (38, za den 1,5).
Průměrná roční teplota se pohybuje okolo 8,5 °C. V nejchladnějším měsíci lednu je průměrná denní teplota 1 °C, noční –3 °C. V nejteplejším měsíci červenci je průměrná denní teplota 24 °C, noční 13 °C. Ročně je okolo 100 mrazivých dnů a 30 ledových dnů. Relativní vlhkost vzduchu se celoročně pohybuje mezi 65 až 90 %.
Přehled průměrné teploty a srážek podle měsíců
Praha – podnebí
Měsíc leden únor březen duben květen červen červenec srpen září říjen listopad prosinec
Nejvyšší průměrná teplota [°C] 1,4 3,1 7,7 13,4 18,7 21,2 23,6 23,5 18,6 12,8 5,5 2,1
Nejnižší průměrná teplota [°C] -3,6 -3,3 0,1 3,5 8,4 11,3 13,4 13 9,1 4,9 0,3 -2,2
Srážky [mm] 23,6 23,1 28,1 38,2 77,2 72,7 66,2 69,6 40,4 30,5 31,9 25,3
Zdroj: Ročenka Praha - Životní prostředí 2005 Statistické údaje za roky 1961–1990 ze stanice Praha-Ruzyně
World War II
World War II, or the Second World War[3] (often abbreviated as WWII or WW2), was a global military conflict lasting from 1939 to 1945, which involved most of the world's nations, including all of the great powers: eventually forming two opposing military alliances, the Allies and the Axis. It was the most widespread war in history, with more than 100 million military personnel mobilised. In a state of "total war," the major participants placed their entire economic, industrial, and scientific capabilities at the service of the war effort, erasing the distinction between civilian and military resources. Marked by significant events involving the mass death of civilians, including the Holocaust and the only use of nuclear weapons in warfare, it was the deadliest conflict in human history,[4] resulting in 40 million to over 70 million fatalities.
The war is generally accepted to have begun on 1 September 1939, with the invasion of Poland by Germany and Slovakia, and subsequent declarations of war on Germany by France and most of the countries of the British Empire and Commonwealth. Germany set out to establish a large empire in Europe. From late 1939 to early 1941, in a series of campaigns and treaties, Germany conquered or subdued much of continental Europe; amid Nazi-Soviet agreements, the nominally neutral Soviet Union fully or partially occupied and annexed territories of its six European neighbours. Britain and the Commonwealth remained the only major force continuing the fight against the Axis in North Africa and in extensive naval warfare. In June 1941, the European Axis launched an invasion of the Soviet Union, giving a start to the largest land theatre of war in history, which, from this moment on, was tying down the major part of the Axis military power. In December 1941, Japan, which had been at war with China since 1937,[5] and aimed to dominate Asia, attacked the United States and European possessions in the Pacific Ocean, quickly conquering much of the region.
The Axis advance was stopped in 1942 after the defeat of Japan in a series of naval battles and after defeats of European Axis troops in North Africa and, decisively, at Stalingrad. In 1943, with a series of German defeats in Eastern Europe, the Allied invasion of Fascist Italy, and American victories in the Pacific, the Axis lost the initiative and undertook strategic retreat on all fronts. In 1944, the Western Allies invaded France, while the Soviet Union regained all territorial losses and invaded Germany and its allies.
The war in Europe ended with the capture of Berlin by Soviet and Polish troops and the subsequent German unconditional surrender on 8 May 1945. The Japanese Navy was defeated by the United States, and invasion of the Japanese Archipelago ("Home Islands") became imminent. The war in Asia ended on 15 August 1945 when Japan agreed to surrender.
The war ended with the total victory of the Allies over Germany and Japan in 1945. World War II altered the political alignment and social structure of the world. The United Nations (UN) was established to foster international cooperation and prevent future conflicts. The Soviet Union and the United States emerged as rival superpowers, setting the stage for the Cold War, which lasted for the next 46 years. Meanwhile, the influence of European great powers started to decline, while the decolonisation of Asia and Africa began. Most countries whose industries had been damaged moved towards economic recovery. Political integration, especially in Europe emerged as an effort to stabilise postwar relations.
Contents
1 Chronology
2 Background
3 Pre-war events
3.1 Invasion of Ethiopia
3.2 Spanish Civil War
3.3 Japanese invasion of China
3.4 Japanese invasion of the Soviet Union and Mongolia
3.5 European occupations and agreements
4 Course of the war
4.1 War breaks out in Europe
4.2 Axis advances
4.3 The war becomes global
4.4 Axis advance stalls
4.5 Allies gain momentum
4.6 Allies close in
4.7 Axis collapse, Allied victory
5 Aftermath
6 Impact
6.1 Casualties and war crimes
6.2 Concentration camps and slave work
6.3 Home fronts and production
6.4 Occupation
6.5 Advances in technology and warfare
7 See also
8 Notes
9 References
10 External links
Chronology
See also: Timeline of World War II
The start of the war is generally held to be 1 September 1939, beginning with the German invasion of Poland; Britain and France declared war on Germany two days later. Other dates for the beginning of war include the Japanese invasion of Manchuria on 13 September 1931,[6] and the start of the Second Sino-Japanese War on 7 July 1937.[7][8]
Others follow A. J. P. Taylor, who held that there was a simultaneous Sino-Japanese War in East Asia, and a Second European War in Europe and her colonies. The two wars merged in 1941, becoming a single global conflict, at which point the war continued until 1945. This article uses the conventional dating.[9]
The exact date of the war's end is not universally agreed upon. It has been suggested that the war ended at the armistice of 14 August 1945 (V-J Day), rather than the formal surrender of Japan (2 September 1945); in some European histories, it ended on V-E Day (8 May 1945). The Treaty of Peace with Japan was not signed until 1951.[10]
Background
Main article: Causes of World War II
World War I radically altered the diplomatic and political situations in Eurasia and Africa, with the defeat of the Central Powers, including Austria-Hungary, Germany and the Ottoman Empire; and the 1917 Bolshevik seizure of power in Russia. Meanwhile, the success of the Allied Entente powers including the United Kingdom, France, the United States, Italy, Serbia, and Romania, and the creation of new states from the collapse of Austria-Hungary and the Russian Empire, resulted in fundamental changes to the map of Eastern Europe. In the aftermath of the war, major unrest in Europe rose, especially irredentist and revanchist nationalism and class conflict. Irredentism and revanchism were strong in Germany because she was forced to accept significant territorial, colonial, and financial losses as part of the Treaty of Versailles. Under the treaty, Germany lost around 13 percent of its home territory and all of its overseas colonies, while German annexation of other states was prohibited, massive reparations were imposed, and limits were placed on the size and capability of Germany's armed forces.[11] Meanwhile, the Russian Civil War had led to the creation of the Soviet Union. After Lenin's death in 1924, Joseph Stalin seized power in the USSR and repudiated the New Economic Policy favouring the Five Year Plans instead.[12]
The German Empire was dissolved in the German Revolution of 1918–19, and a democratic government was formed which was known as the Weimar Republic. During the interwar period, domestic civil conflict occurred in Germany involving nationalists and reactionaries versus communists and moderate democratic political parties. A similar scenario occurred in Italy. Although Italy as an Entente ally made some territorial gains, Italian nationalists were angered that the terms of the Treaty of London upon which Italy had agreed to wage war on the Central Powers, were not fulfilled with the peace settlement. From 1922 to 1925, the Italian Fascist movement led by Benito Mussolini seized power in Italy with a nationalist, totalitarian, and class collaborationist agenda that abolished representative democracy, repressed political forces supporting class conflict or liberalism, and pursued an aggressive foreign policy aimed at forcefully forging Italy as a world power, and promising to create a "New Roman Empire."[13] In Germany, the Nazi Party led by Adolf Hitler pursued establishing such a fascist government in Germany. With the onset of the Great Depression, Nazi support rose and, in 1933, Hitler was appointed Chancellor of Germany, and in the aftermath of the Reichstag fire, Hitler created a totalitarian single-party state led by the Nazis.[14]
The Kuomintang (KMT) party in China launched a unification campaign against regional warlords and nominally unified China in the mid-1920s, but was soon embroiled in a civil war against its former Chinese communist allies.[15] In 1931, an increasingly militaristic Japanese Empire, which had long sought influence in China[16] as the first step of its right to rule Asia, used the Mukden Incident as justification to invade Manchuria and established the puppet state of Manchukuo.[17] Too weak to resist Japan, China appealed to the League of Nations for help. Japan withdrew from the League of Nations after being condemned for its incursion into Manchuria. The two nations then fought several minor conflicts, in Shanghai, Rehe and Hebei, until signing the Tanggu Truce in 1933. Thereafter, Chinese volunteer forces continued the resistance to Japanese aggression in Manchuria, and Chahar and Suiyuan.[18]
Benito Mussolini (left) and Adolf Hitler (right)
Adolf Hitler, after an unsuccessful attempt to overthrow the German government in 1923, became the Chancellor of Germany in 1933. He abolished democracy, espousing a radical, racially motivated revision of the world order, and soon began a massive rearmament campaign.[19] Meanwhile, France, to secure its alliance, allowed Italy a free hand in Ethiopia, which Italy desired as a colonial possession. The situation was aggravated in early 1935 when the Territory of the Saar Basin was legally reunited with Germany and Hitler repudiated the Treaty of Versailles, speeding up his rearmament programme and introducing conscription.[20]
Hoping to contain Germany, the United Kingdom, France and Italy formed the Stresa Front. The Soviet Union, concerned due to Germany's goals of capturing vast areas of eastern Europe, wrote a treaty of mutual assistance with France. Before taking effect though, the Franco-Soviet pact was required to go through the bureaucracy of the League of Nations, which rendered it essentially toothless.[21][22] However, in June 1935, the United Kingdom made an independent naval agreement with Germany, easing prior restrictions. The United States, concerned with events in Europe and Asia, passed the Neutrality Act in August.[23] In October, Italy invaded Ethiopia, with Germany the only major European nation supporting the invasion. Italy then revoked objections to Germany's goal of absorbing Austria.[24]
Hitler defied the Versailles and Locarno treaties by remilitarizing the Rhineland in March 1936. He received little response from other European powers.[25] When the Spanish Civil War broke out in July, Hitler and Mussolini supported fascist Generalissimo Francisco Franco's nationalist forces in his civil war against the Soviet-supported Spanish Republic. Both sides used the conflict to test new weapons and methods of warfare,[26] and the nationalists won the war in early 1939. Mounting tensions led to several efforts to strengthen or consolidate power. In October 1936, Germany and Italy formed the Rome-Berlin Axis. A month later, Germany and Japan signed the Anti-Comintern Pact, which Italy would join in the following year. In China, after the Xi'an Incident the Kuomintang and communist forces agreed on a ceasefire in order to present a united front to oppose Japan.[27]
Pre-war events
Invasion of Ethiopia
Main article: Second Italo–Abyssinian War
The Second Italo–Abyssinian War was a brief colonial war that began in October 1935 and ended in May 1936. The war was fought between the armed forces of the Kingdom of Italy (Regno d'Italia) and the armed forces of the Ethiopian Empire (also known as Abyssinia). The war resulted in the military occupation of Ethiopia and its annexation into the newly created colony of Italian East Africa (Africa Orientale Italiana, or AOI); in addition, it exposed the weakness of the League of Nations as a force to preserve peace. Both Italy and Ethiopia were member nations, but the League did nothing when the former clearly violated the League's own Article X.[28]
Spanish Civil War
Main article: Spanish Civil War
The ruins of Guernica after the bombing.
Germany and Italy lent support to the Nationalist insurrection led by general Francisco Franco in Spain. The Soviet Union supported the existing government, the Spanish Republic which showed leftist tendencies. Both sides used this war as an opportunity to test improved weapons and tactics. The Bombing of Guernica, a city of 5000 - 7000 inhabitants, was considered a horrifying attack at the time, with a propaganda figure of 1,654 people killed widely circulated in the west, leading to charges of "terror bombing".[29] In reality the attack was tactical operation against a city with militarily important communications close to the front-line, and modern estimates yield no more than 300 - 400 dead at the high-end.[29][30]
Japanese invasion of China
Main article: Second Sino-Japanese War
A Chinese machine gun nest in the Battle of Shanghai, 1937.
In July 1937, Japan captured the former Chinese imperial capital of Beiping after instigating the Marco Polo Bridge Incident, which culminated in the Japanese campaign to invade all of China.[31] The Soviets quickly signed a non-aggression pact with China to lend materiel support, effectively ending China's prior cooperation with Germany. Generalissimo Chiang Kai-shek deployed his best army to defend Shanghai, but after three months of fighting, Shanghai fell. The Japanese continued to push the Chinese forces back, capturing the capital Nanjing in December 1937 and committed the Nanking Massacre.
In June 1938, Chinese forces stalled the Japanese advance by flooding the Yellow River; although this manoeuvre bought time for the Chinese to prepare their defences at Wuhan, the city was taken by October.[32] Japanese military victories, however, did not bring about the collapse of Chinese resistance that Japan had hoped to achieve, instead the Chinese government relocated inland to Chongqing to continue their resistance.[33]
Japanese invasion of the Soviet Union and Mongolia
See also: Nanshin-ron and Soviet-Japanese Border Wars
Soviet troops fought the Japanese during the Battle of Khalkhin Gol in Mongolia, 1939.
On 29 July 1938, the Japanese invaded the USSR and were checked at the Battle of Lake Khasan. Although the battle was a Soviet victory, the Japanese dismissed it as an inconclusive draw, and on 11 May 1939 decided to move the Japanese-Mongolian border up to the Khalkhin Gol River by force. After initial successes the Japanese assault on Mongolia was checked by the Red Army that inflicted the first major defeat on the Japanese Kwantung Army.[34][35]
These clashes convinced some factions in the Japanese government that they should focus on conciliating the Soviet government to avoid interference in the war against China and instead turn their military attention southward, towards the US and European holdings in the Pacific, and also prevented the sacking of experienced Soviet military leaders such as Georgy Zhukov, who would later play a vital role in the defence of Moscow.[36]
European occupations and agreements
Further information: Anschluss, Appeasement, Munich Agreement, German occupation of Czechoslovakia, and Molotov-Ribbentrop Pact
From left to right (front): Chamberlain, Daladier, Hitler, Mussolini, and Ciano pictured before signing the Munich Agreement.
In Europe, Germany and Italy were becoming bolder. In March 1938, Germany annexed Austria, again provoking little response from other European powers.[37] Encouraged, Hitler began pressing German claims on the Sudetenland, an area of Czechoslovakia with a predominantly ethnic German population; and soon France and Britain conceded this territory to him, against the wishes of the Czechoslovak government, in exchange for a promise of no further territorial demands.[38] Soon after that, however, Germany and Italy forced Czechoslovakia to cede additional territory to Hungary and Poland.[39] In March 1939, Germany invaded the remainder of Czechoslovakia and subsequently split it into the German Protectorate of Bohemia and Moravia and the pro-German client state, the Slovak Republic.[40]
Alarmed, and with Hitler making further demands on Danzig, France and Britain guaranteed their support for Polish independence; when Italy conquered Albania in April 1939, the same guarantee was extended to Romania and Greece.[41] Shortly after the Franco-British pledge to Poland, Germany and Italy formalised their own alliance with the Pact of Steel.[42]
In August 1939, Germany and the Soviet Union signed the Molotov–Ribbentrop Pact,[43] a non-aggression treaty with a secret protocol. The parties gave each other rights, "in the event of a territorial and political rearrangement," to "spheres of influence" (western Poland and Lithuania for Germany, and eastern Poland, Finland, Estonia, Latvia and Bessarabia for the USSR). It also raised the question of continuing Polish independence.[44]
Course of the war
War breaks out in Europe
Common parade of German Wehrmacht and Soviet Red Army on 23 September 1939 in Brest, Eastern Poland at the end of the Invasion of Poland. At centre is Major General Heinz Guderian and at right is Brigadier Semyon Krivoshein.
On 1 September 1939, Germany and Slovakia—a client state in 1939—attacked Poland. On 3 September 1939 France and Britain, followed by the countries of the Commonwealth, declared war on Germany but provided little support to Poland other than a small French attack into the Saarland.[45] On 17 September 1939, after signing a nonaggression pact with Japan, the Soviets also invaded Poland.[46] Though Poland was divided by Germany, the Soviet Union, Lithuania and Slovakia; the Poles didn't surrender and established a Polish Underground State and the insurgent Home Army, and continued to fight on Allied fronts outside Poland.[47] In the Romanian Bridgehead operation, some 120,000 Polish troops were evacuated to France, along with much of the Polish Air Force and Poland's Enigma codebreakers.[48] During this time, Japan launched its first attack against Changsha, a strategically important Chinese city, but was repulsed by late September.[49]
Following the invasion of Poland and a German-Soviet treaty governing Lithuania, the Soviet Union forced the Baltic countries to allow it to station Soviet troops in their countries under pacts of "mutual assistance."[50][51][52] Finland rejected territorial demands and was invaded by the Soviet Union in November 1939.[53] The resulting conflict ended in March 1940 with Finnish concessions.[54] France and the United Kingdom, treating the Soviet attack on Finland as tantamount to entering the war on the side of the Germans, responded to the Soviet invasion by supporting the USSR's expulsion from the League of Nations.[52]
German troops by the Arc de Triomphe, Paris, after the 1940 fall of France.
In Western Europe, British troops deployed to the Continent, but in a phase nicknamed the Phoney War by the British and "Sitzkrieg" (sitting war) by the Germans, neither side launched major operations against the other until April 1940.[55] The Soviet Union and Germany entered a trade pact in February 1940, pursuant to which the Soviets received German military and industrial equipment in exchange for supplying raw materials to Germany to help circumvent a British blockade.[56]
In April 1940, Germany invaded Denmark and Norway to secure shipments of iron ore from Sweden, which the Allies were about to disrupt.[57] Denmark immediately capitulated, and despite Allied support, Norway was conquered within two months.[58] In May 1940 Britain invaded Iceland.[59] British discontent over the Norwegian campaign led to the replacement of Prime Minister Neville Chamberlain by Winston Churchill on 10 May 1940.[60]
Axis advances
Germany invaded France, Belgium, the Netherlands, and Luxembourg on 10 May 1940, the same day Neville Chamberlain resigned as British Prime Minister.[61] The Netherlands and Belgium were overrun using blitzkrieg tactics in a few days and weeks, respectively.[62] The French fortified Maginot Line was circumvented by a flanking movement through the thickly wooded Ardennes region,[61] mistakenly perceived by French planners as an impenetrable natural barrier against armoured vehicles.[63] British troops were forced to evacuate the continent at Dunkirk, abandoning their heavy equipment by the end of the month. On 10 June, Italy invaded France, declaring war on both France and the United Kingdom;[64] twelve days later France surrendered and was soon divided into German and Italian occupation zones,[65] and an unoccupied rump state under the Vichy Regime. On 3 July, the British attacked the French fleet in Algeria to prevent its possible seizure by Germany.[66]
In June, during the last days of the Battle of France, the Soviet Union initiated staged elections in the Baltic states and forcefully and illegally annexed them,[51] followed by the annexation of the region of Bessarabia in Romania. Whereas the increased cooperation between the USSR and Nazi Germany, which included broad economic cooperation, limited military assistance, population exchange and border agreements made the former a de facto German ally,[67][68] Soviet takeover of the Baltic states, Bessarabia and North Bukovina had been seen with dismay and disquiet by Germany,[69][70] This, as well as growing tensions over spheres of influence demonstrated the impossibility of further expansion of Nazi-Soviet cooperation, and both states had begun the countdown to war.[71]
With France neutralized, Germany began an air superiority campaign over Britain (the Battle of Britain) to prepare for an invasion.[72] The campaign failed, and the invasion plans were canceled by September. Using newly captured French ports, the German Navy enjoyed success against an over-extended Royal Navy, using U-boats against British shipping in the Atlantic.[73] Italy began operations in the Mediterranean, initiating a siege of Malta in June, conquering British Somaliland in August, and making an incursion into British-held Egypt in September 1940. Japan increased its blockade of China in September by seizing several bases in the northern part of the now-isolated French Indochina.[74]
The Battle of Britain ended the German advance in Western Europe.
Throughout this period, the neutral United States took measures to assist China and the Western Allies. In November 1939, the American Neutrality Act was amended to allow 'cash and carry' purchases by the Allies.[75] In 1940, following the German capture of Paris, the size of the United States Navy was significantly increased and, after the Japanese incursion into Indochina, the United States embargoed iron, steel and mechanical parts against Japan.[76] In September, the United States further agreed to a trade of American destroyers for British bases.[77] Still, a large majority of the American public continued to oppose any direct military intervention into the conflict well into 1941.[78]
At the end of September 1940, the Tripartite Pact united Japan, Italy and Germany to formalize the Axis Powers.[79] The Tripartite Pact stipulated that any country, with the exception of the Soviet Union, not in the war which attacked any Axis Power would be forced to go to war against all three.[80] During this time, the United States continued to support the United Kingdom and China by introducing the Lend-Lease policy authorizing the provision of materiel and other items[81] and creating a security zone spanning roughly half of the Atlantic Ocean where the United States Navy protected British convoys.[82] As a result, Germany and the United States found themselves engaged in sustained naval warfare in the North and Central Atlantic by October 1941, even though the United States remained officially neutral.[83][84]
The Axis expanded in November 1940 when Hungary, Slovakia and Romania joined the Tripartite Pact.[85] These countries participated in the subsequent invasion of the USSR, with Romania making the largest contribution to recapture territory ceded to the USSR and pursue its leader Ion Antonescu's desire to combat communism.[86] In October 1940, Italy invaded Greece but within days was repulsed and pushed back into Albania, where a stalemate soon occurred.[87] In December 1940, British Commonwealth forces began counter-offensives against Italian forces in Egypt and Italian East Africa.[88] By early 1941, with Italian forces having been pushed back into Libya by the Commonwealth, Churchill ordered a dispatch of troops from Africa to bolster the Greeks.[89] The Italian Navy also suffered significant defeats, with the Royal Navy putting three Italian battleships out of commission by carrier attack at Taranto, and neutralising several more warships at Cape Matapan.[90]
German paratroopers invading the Greek island of Crete, May 1941.
The Germans soon intervened to assist Italy. Hitler sent German forces to Libya in February, and by the end of March they had launched an offensive against the diminished Commonwealth forces.[91] In under a month, Commonwealth forces were pushed back into Egypt with the exception of the besieged port of Tobruk.[92] The Commonwealth attempted to dislodge Axis forces in May and again in June, but failed on both occasions.[93] In early April, following Bulgaria's signing of the Tripartite Pact, the Germans intervened in the Balkans by invading Greece and Yugoslavia following a coup; here too they made rapid progress, eventually forcing the Allies to evacuate after Germany conquered the Greek island of Crete by the end of May.[94]
The Allies did have some successes during this time. In the Middle East, Commonwealth forces first quashed a coup in Iraq which had been supported by German aircraft from bases within Vichy-controlled Syria,[95] then, with the assistance of the Free French, invaded Syria and Lebanon to prevent further such occurrences.[96] In the Atlantic, the British scored a much-needed public morale boost by sinking the German flagship Bismarck.[97] Perhaps most importantly, during the Battle of Britain the Royal Air Force had successfully resisted the Luftwaffe's assault, and the German bombing campaign largely ended in May 1941.[98]
In Asia, despite several offensives by both sides, the war between China and Japan was stalemated by 1940. In order to increase pressure on China by blocking supply routes, and to better position Japanese forces in the event of a war with the Western powers, Japan had seized military control of southern Indochina[99] In August of that year, Chinese communists launched an offensive in Central China; in retaliation, Japan instituted harsh measures (the Three Alls Policy) in occupied areas to reduce human and material resources for the communists.[100] Continued antipathy between Chinese communist and nationalist forces culminated in armed clashes in January 1941, effectively ending their co-operation.[101] With the situation in Europe and Asia relatively stable, Germany, Japan, and the Soviet Union made preparations. With the Soviets wary of mounting tensions with Germany and the Japanese planning to take advantage of the European War by seizing resource-rich European possessions in Southeast Asia, the two powers signed the Soviet–Japanese Neutrality Pact in April 1941.[102] By contrast, the Germans were steadily making preparations for an attack on the Soviet Union, amassing forces on the Soviet border.[103]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment