This commit is contained in:
mikgaw@st.amu.edu.pl 2024-02-18 20:31:55 +01:00
commit 50e8308974
17 changed files with 33583 additions and 0 deletions

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,22 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="GrazieInspection" enabled="false" level="GRAMMAR_ERROR" enabled_by_default="false" />
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
<option value="N803" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="str.append" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ngrams-fitness.iml" filepath="$PROJECT_DIR$/.idea/ngrams-fitness.iml" />
</modules>
</component>
</project>

8
.idea/ngrams-fitness.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Analaiza szyfrogramów pod kątem podobieństwa do tekstu jawnego
Program napisany aby przeanalizować, czy wybrane szyfry monoalfabtyczne generują wystarczająco losowe szyfrogramy. Wykresy i wynik analizy znaduje się w pliku fitness_raport.pdf

33215
data/Ulysses.txt Normal file

File diff suppressed because it is too large Load Diff

20
data/input_cesar.txt Normal file
View File

@ -0,0 +1,20 @@
loxklomnzkxycorrjkvruetkczkintowakyrkgxtzotznkcuxrjycuxyzcorjloxknuzyvuzygyirosgzkingtmkxgoykyznkxoyqrkbkrotznkaqznoyyasskxrgyzekgxynkgzcgbkyygcznuaygtjyulloxkyhxkgquazutkkbktjkyzxueotmnuskygzckttotmz
utkgyzrutjutznoyekgxngygrxkgjeykktnatjxkjyulmxgyyloxkygtjutkulznkaqyrgxmkyzkbkxngyhkkthaxtotmotznkyiuzzoynnomnrgtjyluxznkvgyzzcuckkqysuxkloxkixkcygxktuczxgototmotyqorrylxusyuaznkxtkaxuvkgtjznkaygxkkax
uvkycorjloxkyrotqkjzuirosgzkingtmknomnrgtjcorjloxkiuarjhkrgxmkyzkbkxotaqnuccorjloxkyyzgxzgtjnuczuyzuvznksloxkinoklygxkvgxzoiargxreruuqotmzukdvgtjznktashkxulyvkiogroyzzkgsyzxgotkjothaxtyavvxkyyoutzkint
owakyznkjkrohkxgzkhaxtotmulrgtjzuqkkvgloxkiutzgotkjgzznksusktzpayzlobkaqatozygixuyysuxkzngtloxkgtjxkyiakykxboikyyvkiogroykotznklomnzotmloxkcoznloxkzkintowaksuyzreotsuuxrgtjgxkgyhazinoklloxkulloikxvgar
nkjrkecorjloxkrkgjluxznktgzoutgrloxkinoklyiuatiortliiygojsuxkatozyotirajotmznuykotykxboikyzngzyzxgjjrkaxhgtgtjxaxgrgxkgycuarjhkzxgotkjottkccgeyulcorjloxklomnzotmznkeiuarjznkthkjkvruekjtgzoutgrreotznkk
bktzulgyomtoloigtzloxknkygojnkgjjkjznkxoyqgtjznxkgzulyainsgpuxcorjloxkycgyirkgxremxucotmotznkaqgrrulznoyrkgxtotmlxusotzkxtgzoutgrvgxztkxycnugxkvxuhghreyzorryuskekgxygnkgjulayoygbkxeyktyohrkcgeulzxeotm
zumkzaygnkgjulznkiaxbknkygojozoynuvkjgaqcojkzxgototmvxumxgsskcorrhkykzavgyvgxzulgtgzoutgrgizoutvrgtjxgctavotxkyvutykzuznkrkyyutyrkgxtzlxusrgyzekgxyhrgfkyutkulznkykxboikyrkgjotmznkcgeoyyaxxkeloxkgtjxky
iakcnoinngygrxkgjejkgrzcoznsuxkzngtcorjloxkyznoyekgxznksuyzxkiktzcorjloxkcgyrgyzsutzngzlxktyngsiussuttkgxlgxtngsgvuvargxhkgazeyvuzznkigaykulznknkizgxkloxkoytuzekzqtucthazznkjgsgmkoyirkgxzuykklxusnkgzn
rgtjzujkyurgzoutcnkxkutikznkxkcgyxoinnkgznrgtjnuskzuxgxkyvkiokyotirajotmygtjrofgxjyznkxkoytucjkyurgzoutcnktznkhhiboyozkjburatzkkxylxusznkgsvnohogtgtjxkvzorkiutykxbgzoutingxozeckxkcgrqotmznkyiuxinkjkgx
znyzxkzinkjuazotgrotkroqkgvuroikluxktyoiyzkgsykgxinotmluxixkgzaxkyzngzyaxbobkjznkhrgfkolznkosskjogzkosvgizoyynuiqotmznkrutmzkxskllkizygxkkwagrreiutikxtotmcnoryzckigtygbkyuskulznkykgtosgryzngzyaxbobkjz
nkloxkckruykgtgclarruzgtjckruykgrrzngzhoujobkxyozeozzgqkyekgxyoltuzjkigjkyluxzngzzuiuskhgiqgmgotkdvrgotkjzxayzkknucgxjottyluxiuatzxeyojkxgtmkxjgxxktnorrcnuyavvuxzkjloxklomnzkxyzgiqrotmznkhrgfknkxkykko
tmznkglzkxsgzngtjqtucotmsuxkcorjloxkyiuarjhkutznkoxcgeoyngxjzuzgqkzuiuskhgiqgtjykkgyozkroqkznoygtjqtucoluatjznoyyvkiokyubkxnkxkgtjckngjysuuznytgqkyubkxznkxkozjukyzgqkozyzurrnkygojskgtcnorkayotmgjxutkc
oznznkxsgrosgmotmzuyaxbkeznkyozkluxnojjktyahzkxxgtkgthaxtyoysgzzugqrkegloxkotbkyzomgzoutyulloikxluxyaxxkeloxkgtjxkyiaknkoyutkulznkaqytgzoutgrcorjloxkzgizoigrgjboyuxygmxuavulyvkiogroyzulloikxycnugrxkgj
engbkznkyqorryrkgxtzghxugjgtjcnucorrhkzxgototmatozynkygeyznkqotjulzkintowakynkyykktaykjotnuzyvuzygylgxlratmgylxgtikgtjyuaznglxoigcorrhkbozgrotznkaqotznkekgxyzuiuskuaxirosgzkoyingtmotmozyingtmotmhkeutj
xkiumtozoutnkkdvrgotkjcngzaykjzuhkgtotkzuekgxieirkznoyoykbkxeekgxtucckgxknkgjotmzucgxjygtuxznkxtskjozkxxgtkgtirosgzkotznkyuaznkgyzulktmrgtjcoznotznktkdzjkigjkgtjznoycorrhkhayotkyygyayagrjgeotjgeuazsgt
eulznkcorjloxklomnzotmskznujyhkotmxurrkjuazgixuyyznkaqxkreutgzuurhudulyqorrylxusixkgzotmtgzaxgrloxkhxkgqygtjxkjaiotmznklakrrugjulbkmkzgzoutzuykzzotmiutzxurrkjhaxtyjkrohkxgzkregxuatjcorjloxkyzuyzuvznko
xyvxkgjzumkznkxznkecuarjxkjaikznktkkjluxnamkgsuatzyulcgzkxotgjxuamnzgtjxkjaikznktashkxulgvvrogtikytkkjkjutyozkhazznkloxkhxomgjkyatoutygeytkczxgototmgtjzkintowakygxktuzktuamnzuzgiqrkznkxoyotmingrrktmky
ulirosgzkingtmkozygeysuxkixkcygxktkkjkjglzkxekgxyuliazyzngzngbkykktznkruyyulznuaygtjyulloxklomnzkxyyotiksgzzcxgiqznkloxkhxomgjkyatoutymktkxgrykixkzgxeigrrkjluxsuxklatjotmlxusznkmubkxtsktzygeotmxoyotmz
ksvkxgzaxkygtjznkyeyzksgzoiatjkxlatjotmulznkloxkgtjxkyiakykxboikgxkgxkiovkluxjkyzxaizoutznkmubkxtsktzygojozcgymobotmloxkgtjxkyiakgaznuxozokygxuatjhtznoyekgxgtjkgingaznuxozecgyghrkzujkiojkcngzozyvktzoz
utgyvuqkyvkxyutygojznknuskulloikcuxqyiruykrecoznznktgzoutgrloxkinoklyiuatiorgtjktmrgtjgtjcgrkycorjloxkluxaszuiutzotakzuosvxubkuaxxkyvutykzucorjloxkygtjsozomgzkznks

20
data/input_hill.txt Normal file
View File

@ -0,0 +1,20 @@
yceuycifccgiusydsquticieqdasgpywogefwqwdkgmtoggysbuegygimuoruraxkxyxmjyxiumwsaowccmpanccwqcygiifehcymzmlsbstifkkchwksmeowasbksqwwqgiogmtekaksmswifayiugdkiszaxgiuvwqscsvmreuakgdgicpicstifkqgimtmoanstgr
mrwquneggdmrifcykwirgciukjwqgkqywduwgdeuuewjcpksszaxgianmaiewjifkkagcsiwgiccakkxksuiwdaywdstkgmtogmwyxkgwbwkifcsgdszuvifafksgrgymoqagguvgvaxaseuocirwdeacpqiqimgstceormkqlkqkisvogwdkkyegmanwfogquireuot
qtgiusivyceuefstyswfqgsaowccmpanccwkifcsgdusivyceuawcnmnsbirccunmlehstamiqwgoruraxgiuniruygdiqqdwwwmkbogybaxaswkgviueuyiijwicniryqeggostgruiudanwfogouqxehwjmjassgsaunccymunwqstctstaywdwocxeusmuumtasgp
ywogunogsqsauiwqccaywdstwmefanwfgoeuyiyceuawmtqiiekmgrogqkwamtseunycakamgpeziugzwwgguvijgckfaxwqgdeumwogqymlwigimjassgsaqystifgvemsvstedaxomezqhaxijasgpywogqkunyqstqkuvcsgdirwqkvsvmpakszaxyeszwiehyicn
oggxsousivyceukwgdkiijogaakgmrwlyceumpaksmawgpoqcfmwiaqiiyuvkkqieqstutmfstgriqqystqymlwigiifmtunwqqpkwotmeaagdkkwqcseuksgycnmnijwqstctstiewgwykiaqoruraxgvemsvstgrogguayivifwduisquticctaakgmrwlyqstifeu
akmtwjksemqiycyimtyceuogiuyjoggdsqwfogmyceanwfotwqwmsmkeeosjuvusivyceuaqksutwqsboyyeusmgstifkkqoydwjifcykwirqimgqlkqstccwdmtuuaaghirulehaqiqirafyemeipmkkgydkiwakwiriuoggdwjqucyqvehmkwdycipomwywjcpsamg
wmccisiuoggdwjifasotakogiuyjezcyiqgmkmamussqcpqiqimggzykwqmiomoretgiijkrksyiijwjanmtuuaacskbuuepcsgdwqexkrsteumjmrqywmifsbgikikskwirmtqlkqcsunkwirkvcswakiiewjifgiehiogmefwqaumgifomwycywoehsoyceuansdgi
mcomwkmpgciukjwqgksqwlmuezeouvijgcsworuraxgiifcykwirifucwwcpaswdmuoruraxomkscsunqkmtgcedeuksgcsykqqkanwqgvirohymepqtcniruiouqwmjyxifasouqywjifkxasuyeuyceucycoqwijqbeacbsvifctymmgmymwkwirwmqygvyecdwqif
csgdwmsqkicskgmrsrehyeecijogeuekqlwiujwqifcsgdiqwawmwqeumjasakycecqmaumgiugdsaowctunogeucycokngiipmtuuswogmtogofodcyezctuuqmmteugiqlkqifwqslwkcmanansdafkgkwawksehsgkgmrmpirezuoehomwlgwmgifgiawasogsqir
ifuneuyaogmasvstwlstsbmqwqawsagmkieukswiunwqyowqaswkmgkiaseumtotgiifmtwomlibctifyrcswaclifmymictsgccqsyikbcywbqggwmgifsbmrgrehwaszaseqireuygwlyqawecehqimgsrorunmoyiksqvgikqyeunogqyanqswlungceqotioakwf
ogyceumoegqyanswwoydyxancisbwwwqydifmtcmshibehycqwezuyyseswqgiclcoabasgdgikiijgcgrqgkqyrecqouystqnutqiiewfkkuneuiqekctstkskiasaymtsoycsqwqmgehkmehwdwkydsrwwkrawijctyceuycifccgiuysssamgifyrcswaogeuqymy
mgifwqunehowifanewcousmgqkeuusivyceumwayivuimrifmyomwycygcctwmuyyswmawwamessanueeuksezsbmqijwkiugdqbeaclaygdifcymjasakkiakkxehwqgdmogcueqkyxquaayskiakijogeuezmagiuyysezunipqzgiqiiywqswwkkwqustuysdmrom
ezsvogucwlqsmgstgrwwotakologyccckikxyjsqksidccehanwqcbotkscyowgrmemzsokfaxmyqvgikguykgmrkiszwiehkigioteumxaxwqgdeumwogogcymryeunogamihmtuuaauooruraxijeckgyicsahcyuviucpayawsmgmoqwlcywmszwiehaqiqwleugd
qzqvijogceormkkwirmtcbyegdanciiqusyduicpqiqimggpezwbgiwyunoggwgdwjccmpqiyggiogsmeuouqyauohyxmjyxiuszirefgpuyszwqecwqgdkisvgcqlwisworetmlezwlstifkkgwmtogkwirunqgkqyeotutqsmtmymwgcmgstkgeqmpankgmguieggd
euawulezuuoheuudcsstctsrmtquctwmuianstijicwqasgukwifcycymlehyqwqwdeamoirkxwqaumgwmekctiucoijogwdwaauccehanwqecsaowccstifgiayifwqunwjwdqjanciezwkmtogiechsqyisqanwfwkaqoretyrqustgiiuwowowlkmsagdwyayskan
egunogusivyceuycifkgmgwaifshkvmymgyeydctayuygzwwunogameuyqmrmtosetgbwjceormkqlkqgzwqkgmgaaiswqmxaxyreuukiugdeuygoqmgifgvogydmemaypiwijmtuumtwwijkgmgawmtyeydctaywdoxsbuhehmtsbcsyegpcioruraxgiwmunqtifmy
gigzwqwfykijogijoguoayiveuyggmifwdeuuruvuwccymaymtkiaqmtehstgdyesisvansdctkeijogouqxehwjeputsgecgiiectctmrycccaygrogyceuuvemgdgigpuukswyihomcpqiqimganwfasgpywogiueucocccosisvyxecmzijogmyycmgmpwlkwmggi
wjutqsmtasgcmgmyeqwygguvaseuocirwdeusqkmunehkwirkimwsvungcifqvgieumtogegsmwjifayiugdkiszaxgvemsvehsmstgmowgrmbecchogyceuuvemgdgigpuukscciewqmkaseuuysoyiydctkiucuvgvgpaumgqlkqifiwczehymwdeqwystcpcystgr
ucgmwqiseuiugdifgimkccowkgmcgdehwogdstwmunogyceuansdgimcgiehiogmirwqeuoqgmkictgicpkekgmrifiwczehymwdeqqiaumukskgiomgyceuansdgimcwqsviqmykggiiraygdmrifcykwiransqecgcsviqmyqwekiuipijshasyjomgckgeqgmmtez
mrksawysmjehkiksqiwfogiqwawjycgmgyqamwegqyyqusififwdmtuuaamxaxaswkgvmwayecoransqmgcsgdanciwlgiusivyceukikkapqgmrkgouijcmslyeakayehgiawksijeaoruraxgianiyezemmtijogmV

65
data/input_plaintext.txt Normal file
View File

@ -0,0 +1,65 @@
Firefighters will deploy new techniques learnt in the world's worst wildfire hotspots as climate change raises the risk level in the UK this summer.
Last year's heatwaves saw thousands of fires break out, one even destroying homes at Wennington, east London.
This year has already seen hundreds of grass fires and one of the UK's largest ever has been burning in the Scottish Highlands for the past two weeks.
More fire crews are now training in skills from southern Europe and the US.
Are Europe's wildfires linked to climate change?
Highland wildfire could be largest ever in UK
How wildfires start and how to stop them
Fire chiefs are particularly looking to expand the number of specialist teams trained in "burn suppression" techniques - the deliberate burning of land to keep a fire contained.
At the moment, just five UK units across more than 50 fire and rescue services specialise in the "fighting fire with fire" technique, mostly in moorland areas.
But Chief Fire Officer Paul Hedley, wildfire lead for the National Fire Chiefs Council (NFCC), said more units - including those in services that straddle urban and rural areas - would be trained in new ways of wildfire fighting.
They could then be deployed nationally, in the event of a significant fire, he said.
He added the risk and threat of such major wildfires was "clearly growing in the UK".
"All of this learning from international partners, who are probably still some years ahead of us, is a very sensible way of trying to get us ahead of the curve," he said.
It is hoped a UK-wide training programme will be set up as part of a national action plan drawn up in response to the lessons learnt from last year's blazes.
One of the services leading the way is Surrey Fire and Rescue, which has already dealt with more than 80 wildfires this year.
The most recent wildfire was last month at Frensham Common, near Farnham, a popular beauty spot.
The cause of the 10-hectare fire is not yet known - but the damage is clear to see.
From heathland to desolation
Where once there was rich heathland, home to rare species, including sand lizards, there is now desolation.
When the BBC visited, volunteers from the Amphibian and Reptile Conservation charity were walking the scorched earth, stretched out in a line like a police forensics team, searching for creatures that survived the blaze.
If the immediate impact is shocking, the long-term effects are equally concerning.
"Whilst we can save some of these animals that survived the fire, we lose an awful lot and we lose all that biodiversity. It takes years, if not decades, for that to come back again," explained trustee Howard Inns.
For countryside ranger Darren Hill, who supported firefighters tackling the blaze here, seeing the aftermath, and knowing more wildfires could be on their way, is hard to take.
"To come back and see a site like this, and know I found this species over here and we had smooth snakes over there, it does take its toll," he said.
Meanwhile, using a drone with thermal imaging to survey the site for hidden subterranean burns is Matt Oakley, a fire investigations officer for Surrey Fire and Rescue.
He is one of the UK's national wildfire tactical advisors - a group of specialist officers who already have the skills learnt abroad and who will be training units.
He says the kind of techniques he's seen used in hotspots as far-flung as France and South Africa will be vital in the UK in the years to come.
"Our climate is changing - it's changing beyond recognition," he explained. "What used to be a nine to 12-year cycle, this is every year now.
"We are heading towards a northern Mediterranean climate in the southeast of England within the next decade and this will be business as usual day in, day out,"
Many of the wildfire-fighting methods being rolled out across the UK rely on a 'toolbox' of skills, from creating natural firebreaks and reducing the 'fuel-load' of vegetation to setting controlled burns deliberately around wildfires to stop their spread.
Together they would reduce the need for huge amounts of water in a drought and reduce the number of appliances needed on site.
But the Fire Brigades Union says new training and techniques are not enough to tackle the rising challenges of climate change. It says more crews are needed after years of cuts that have seen the loss of thousands of firefighters since 2010.
Matt Wrack, the Fire Brigades Union's general secretary, called for more funding from the government, saying: "Rising temperatures and the systematic underfunding of the fire and rescue service are a recipe for destruction."
The government said it was giving fire and rescue authorities around £2.6bn this year, and each authority was able to decide what it spent it on.
A spokesperson said: "The Home Office works closely with the National Fire Chiefs Council and England and Wales Wildfire Forum to continue to improve our response to wildfires and mitigate them."

20
data/input_random.txt Normal file
View File

@ -0,0 +1,20 @@
mdqaqsNnHOkLtSVYyzPeNMxmfHkMDdtpDDALCmtDWCeGeKDJkdWupmHKHTDdZamHsrRSHeFpJNcYPhepcZTMmOJBgMkgkRUwPIdaLkvVpyfzRkKanlVkBKYxnzMBxwyjMldQcOjFKYGLZtMvGqqrmqxkGGPALoYynPLaXUJxlibZLkuqGigtCDbXRSGxCaqfcIIRnQxv
RLJBQarEIMsPFfPSZOATcfGVWvTrltIIZTrMHvUIfADNbGdYduhtmsPVPrEypwuAzniAxjVjDVdOWLaCEcgbszoouCrvqLKCMgoZVGvqmHq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bOXHBfFegzpZVoONEfDfgySCnzRajCAFRLPJTnoUdzMngefXIYzbssapECciEjcVyVBmDckXgEZTFGEJDnAPUAnZkuWRnlBomLlcmkODmyelGOmjbDPEIyDxhmFXlkwQHPITuBJmWZDzMWmpmRXAWqxOQFUIVDxXOkYQmMVezXsINbIHrkffOqzWiqPwMPRdLYQ
rZufhrrnYgRhsjFoXJqCHMFklXgtzUBbjXvpnowDfcsxyEwYiPsZHxQxHDGKcDzjtYdhUZbAWQgKkSZAClKPTIvichovIFUmCWcCgKwxWrBVuzNxLUOPWYUAevZbNEMYRwnTQlKCgoPApvalLUxLVlqpGMqUVywzPqp

20
data/input_subs.txt Normal file
View File

@ -0,0 +1,20 @@
bpsfbpjmnfsevpggifzgqucfvnfomcpahfegftscnpcnmfvqsgievqsenvpgibpsfmqnezqneteogpwtnfomtcjfstpefenmfspexgflfgpcnmfhxnmpeehwwfsgtenuftsemftnvtlfeetvnmqhetcieqbbpsfeysftxqhnqcfflfcifensqupcjmqwfetnvfccpcjn
qcftengqciqcnmpeuftsmtetgsftiueffcmhcisfieqbjsteebpsfetciqcfqbnmfhxegtsjfenflfsmteyffcyhscpcjpcnmfeoqnnpemmpjmgtciebqsnmfztennvqvffxewqsfbpsfosfvetsfcqvnstpcpcjpcexpggebsqweqhnmfscfhsqzftcinmfhetsffhs
qzfevpgibpsfegpcxfinqogpwtnfomtcjfmpjmgtcivpgibpsfoqhgiyfgtsjfenflfspchxmqvvpgibpsfeentsntcimqvnqenqznmfwbpsfompfbetsfztsnpohgtsgugqqxpcjnqfdztcinmfchwyfsqbezfoptgpennftwenstpcfipcyhscehzzsfeepqcnfomc
pahfenmfifgpyfstnfyhscpcjqbgtcinqxffztbpsfoqcntpcfitnnmfwqwfcnrhenbplfhxhcpnetosqeewqsfnmtcbpsftcisfeohfefslpofeezfoptgpefpcnmfbpjmnpcjbpsfvpnmbpsfnfomcpahfwqengupcwqqsgtcitsfteyhnompfbbpsfqbbpofszthg
mfigfuvpgibpsfgftibqsnmfctnpqctgbpsfompfbeoqhcopgcbooetpiwqsfhcpnepcoghipcjnmqefpcefslpofenmtnenstiigfhsytctcishstgtsftevqhgiyfnstpcfipccfvvtueqbvpgibpsfbpjmnpcjnmfuoqhginmfcyfifzgqufictnpqctggupcnmff
lfcnqbtepjcpbpotcnbpsfmfetpimftiifinmfspextcinmsftnqbehomwtrqsvpgibpsfevteogftsgujsqvpcjpcnmfhxtggqbnmpegftscpcjbsqwpcnfsctnpqctgztsncfsevmqtsfzsqytyguenpggeqwfuftsetmftiqbhepetlfsuefcepygfvtuqbnsupcj
nqjfnhetmftiqbnmfohslfmfetpipnpemqzfithxvpifnstpcpcjzsqjstwwfvpggyfefnhzteztsnqbtctnpqctgtonpqczgtcistvchzpcsfezqcefnqnmfgfeeqcegftscnbsqwgtenuftseygtkfeqcfqbnmfefslpofegftipcjnmfvtupeehssfubpsftcisfe
ohfvmpommtetgsftiuiftgnvpnmwqsfnmtcvpgibpsfenmpeuftsnmfwqensfofcnvpgibpsfvtegtenwqcnmtnbsfcemtwoqwwqccftsbtscmtwtzqzhgtsyfthnuezqnnmfothefqbnmfmfontsfbpsfpecqnufnxcqvcyhnnmfitwtjfpeogftsnqeffbsqwmftnm
gtcinqifeqgtnpqcvmfsfqcofnmfsfvtespommftnmgtcimqwfnqstsfezfopfepcoghipcjetcigpktsienmfsfpecqvifeqgtnpqcvmfcnmfyyolpepnfilqghcnffsebsqwnmftwzmpyptctcisfznpgfoqcefsltnpqcomtspnuvfsfvtgxpcjnmfeoqsomfifts
nmensfnomfiqhnpctgpcfgpxftzqgpofbqsfcepoenftweftsompcjbqsosftnhsfenmtnehslplfinmfygtkfpbnmfpwwfiptnfpwztonpeemqoxpcjnmfgqcjnfswfbbfonetsffahtgguoqcofscpcjvmpgenvfotcetlfeqwfqbnmfeftcpwtgenmtnehslplfin
mfbpsfvfgqeftctvbhggqntcivfgqeftggnmtnypqiplfsepnupnntxfeuftsepbcqnifotifebqsnmtnnqoqwfytoxtjtpcfdzgtpcfinshenffmqvtsipccebqsoqhcnsuepifstcjfsitssfcmpggvmqehzzqsnfibpsfbpjmnfsentoxgpcjnmfygtkfmfsfeffp
cjnmftbnfswtnmtcixcqvpcjwqsfvpgibpsfeoqhgiyfqcnmfpsvtupemtsinqntxfnqoqwfytoxtciefftepnfgpxfnmpetcixcqvpbqhcinmpeezfopfeqlfsmfsftcivfmtiewqqnmectxfeqlfsnmfsfpniqfentxfpnenqggmfetpiwftcvmpgfhepcjtisqcfv
pnmnmfswtgpwtjpcjnqehslfunmfepnfbqsmpiifcehynfsstcftcyhscepewtnnqtxgfutbpsfpclfenpjtnpqceqbbpofsbqsehssfubpsftcisfeohfmfpeqcfqbnmfhxectnpqctgvpgibpsfntonpotgtilpeqsetjsqhzqbezfoptgpenqbbpofsevmqtgsfti
umtlfnmfexpggegftscntysqtitcivmqvpggyfnstpcpcjhcpnemfetuenmfxpciqbnfomcpahfemfeeffchefipcmqnezqnetebtsbghcjtebstcoftcieqhnmtbspotvpggyflpntgpcnmfhxpcnmfuftsenqoqwfqhsogpwtnfpeomtcjpcjpneomtcjpcjyfuqci
sfoqjcpnpqcmffdzgtpcfivmtnhefinqyftcpcfnquftsouogfnmpepeflfsuuftscqvvftsfmftipcjnqvtsietcqsnmfscwfipnfsstcftcogpwtnfpcnmfeqhnmftenqbfcjgtcivpnmpcnmfcfdnifotiftcinmpevpggyfyhepcfeetehehtgitupcituqhnwtc
uqbnmfvpgibpsfbpjmnpcjwfnmqieyfpcjsqggfiqhntosqeenmfhxsfguqctnqqgyqdqbexpggebsqwosftnpcjctnhstgbpsfysftxetcisfihopcjnmfbhfggqtiqblfjfntnpqcnqefnnpcjoqcnsqggfiyhsceifgpyfstnfgutsqhcivpgibpsfenqenqznmfp
sezsftinqjfnmfsnmfuvqhgisfihofnmfcffibqsmhjftwqhcneqbvtnfspctisqhjmntcisfihofnmfchwyfsqbtzzgptcofecffifiqcepnfyhnnmfbpsfyspjtifehcpqcetuecfvnstpcpcjtcinfomcpahfetsfcqnfcqhjmnqntoxgfnmfspepcjomtggfcjfe
qbogpwtnfomtcjfpnetuewqsfosfvetsfcffifitbnfsuftseqbohnenmtnmtlfeffcnmfgqeeqbnmqhetcieqbbpsfbpjmnfseepcofwtnnvstoxnmfbpsfyspjtifehcpqcejfcfstgefosfntsuotggfibqswqsfbhcipcjbsqwnmfjqlfscwfcnetupcjspepcjn
fwzfstnhsfetcinmfeuenfwtnpohcifsbhcipcjqbnmfbpsftcisfeohfefslpoftsftsfopzfbqsifenshonpqcnmfjqlfscwfcnetpipnvtejplpcjbpsftcisfeohfthnmqspnpfetsqhciycnmpeuftstciftomthnmqspnuvtetygfnqifopifvmtnpnezfcnpn
qctezqxfezfseqcetpinmfmqwfqbbpofvqsxeogqefguvpnmnmfctnpqctgbpsfompfbeoqhcopgtcifcjgtcitcivtgfevpgibpsfbqshwnqoqcnpchfnqpwzsqlfqhssfezqcefnqvpgibpsfetciwpnpjtnfnmfw

20
data/input_vinegere.txt Normal file
View File

@ -0,0 +1,20 @@
jvzkrikubkdsavtrpetywezeagmitnmdckelinztfirgpkiovylyiovfbculhsqxqhsgavatwnaixiqnbkoheaokdamfmyfhieqywliimrunxumawtlvaygmqrzrmsxlmgdslriziazraymwxuwaearqaurfmemynrinsugtsamkherqmyfrslqtshszmymtarvtunkg
wtqawgtuzdsabnuscrixtawntxqahlakqnlhvjdehfwlsrefalurifitporrwlfhihsyxavtmyfezrznmsfrmtnuvaqtsirgpkecsgboehlvonxarqalarxumvmsxgeuieixasarisqxqcvreymriawcfrevvozgmaaqulpfnxamwbcztevamadotritptlrcymrircx
apifeoxdjvzkelmaskptsptoyaxrknmnkrposhpnvjiipqnodegbcrpbiyixsewgmbqrmacqtoajqrpfmemyeteebgzdlbezasxbxzteqsqxqclvmleavrxgdtmpcrmrpltuakmaozaebcitptlrvaybiewlepipqgxiwgbkmmwgzguniqqtnuvaaabpvrayuorgmitn
mdcketlrlkxifrzgfefhztunkbnrmnhgwqqetnnodegbvzmirrlgftlruuyergraetjvdkgkyaqzeagewyemsemztarsqxqarqzkecyrakdvmpmyepipqgxiwrqtfhisqmttmaolurijqztfmemzqclaqwgeqbazxymauuarpnvjmrinahgtguqkrfmemurfmpmxbayy
pkplileoxdjvzkxeeqnudtlrvgfisairrivrknuejfkugngvttrcgfiopmsemazixfqtolyqqtstlbakunwrzbucifbnmtwgzgpdprcxnarnvjduvntgdeefeuglhomzdamamjunrrecmywbnculhsqxqfmtpzunkgpkkcshtjfhiajkpetyweqdrnboaneyteunxumk
hergwlmsmtvorignvzrivrpkeamqpkmdhrlztevvaqmnhgpxqaxbnygclziparavtjrivracmsgymgdlctzuiirtqtfhihsgxlssbnusprixzirtnxammabkdnegquzapcixfnieactoeemvdofnjrksxvtreoqrgkmrwnpkmdsscyuseimxksiaaonlijieafxegozg
xbokfuwnpkmdssbnqcyedktewnqjutmfpubehncqiihrbxmirvvmbrstzgymijqrxbifmzgpefxgdtssitmtmbvgxaggquzppnvjdaaacvunvravanwrbufhiymyeorftkmrrgnxampnazkeeeahxadrauzessbnqsiedooewymgpirtbnqwelqyeuvemerivritprif
kaqwlvkntawntxqahllkmlxjqztmsemztarjqrpfmemyfhmfgkmrxumsasxemiqnxjqrpfmemcmspnazyorgpgffvrvytaqpwsyoramgdfeevnmmecwvgleejkmuxlavatxumimuwrwlfhiumifavrnodemfvufyigstawroczfhiqismgivaixeeebueeiszuyhinbn
xarqbupewbtgfisaenqribviqtlrzkiaweqithinbnxarqpuyexbzgdewcmiuewvvixuhvvmearqtolavqaztevrqyzoaqmyalegquzwlrvztefokbusmgmjhophvzqevfnxamxumgyplvjomnealxqpxvtkoorfmxhaxvwtoheeqzkwiemcmlovvmfhifkudclrlkmr
xuazdexppkpoygqtmlmamrukinxuxigrnuderfqietinuyqavppozgjbzideegcxqsxuizeuviqbqdxumhxadrqlfhivusqdmnbkumtnkzuswuwiwirtbnqlsaozqrqrnlqcxfixqeuhirxygbviqrrvvmihmyaziegnvymvifwsqojgpkeeeaqsmlwgpgfsyedohehg
pkrivrekxowritmwjhtratealcqlsfmgxlxuiznisqqbqrwvbeutxnskeyinzyufrbbjqceqmyrovgpgftspwsqbepsgsamamdblevvkptvhazqelbegddmavyrovpwaztvlaopevnvmqrhnzxqnlvtrihsfcvbovgmjrivrnoshxrzyfagxtozgxumhxadrpkdewrmo
zgxumgrtieugfhealqzoavvmyovreoxdjvzkecshtjnesabnqivjieuslnzjfoxnskfogbuknagxitpsiriyutiyqqqtlvagzdoawcufshvjfhmfavqcmrauhevumxqarqektahfuuatlfvgwewbdkdtlrzkuthbmyfaorqzetsytnqsevlsqarjpoxeyfqtsahewtqw
mgpztevzirumetqtstsfcxhecgpkeixrnudhmqlkzsyobkdreamgzbyevyusqnbzaaoymemfmemozvifbosaxvwteojsqiqrjbzygrvrglurinvjdewpcktemfwtqojgpkgkwaizuorntculhsqxqtepbooapnlbusseagsrshxurstrkomlmfburfmpmxewlbirdeeq
gnmvigpkekmytyxeeevzmbvbijmnhjpuiipyjkfrevvozgyaqzehifieetlrsozdssbkohrvyaqslrayqerhakpiruwzepsgagefeenrgnknaldarpmgzdwbcztajeqimwmythqvmgirunxumawirgpkkeeeazacszmugrgyqsmtivaitartqtsixfknmnkvvmnecbvj
degbotutmbvnqebctguniqenmtyfmjfofritunigweqavpgixexuqyusiimxkyinztawarixqhinlozgxbegddwnvudtlrztyehvbkdreamgzcpvugfemabnqsshbnqawgwlqnkyitpwmgpoztlrvkjthrkgpeealztiwjqrxbiocyunifageuwhirpacvvjmyshbsmn
cbnzteavtjrivrnoshxvvmyexuwjebivvmdopymjauxnkxaswgpkgkvrteanegwuxbskwlekmytyrrszkxqaxvvmzaxhzgxfmemhdeexagzdvrlaoirtbnqfyrtraahbnbqgigizuorgwyqtxvvmoorgzuxliqjadnwqmrubieizqlcnzugnhjqrpfmemyfowgwvfhiv
zybrinlzagigpkdtlrgcaupqzkpugrbnqnirllarlhokmmshvzeojjizqrmaijdoytpzmnhemjgcigpkzuqomxafecxruarpmyzeiqmjanwvbknuxgpkrivrjxugeqmygnmbvymywamcfrevvozgealzqclaqwgewnzkzoxrvugglgwzmcoymztevvaozgguirxertmy
afgyqsmtippgzgivbymywzwxqcvreymriamkpehnnzqrcrixeojpczetlnbnmvifmkztlrtuesssbnauwnvjeojsqxqfmtpzqrwfqtoeqnbzirepsztejvzknrmtijqsyaquzskrvkdapfmidexnzeoapymjrovzwxqfyalozgjewsfhitwbqrrzmtfselqtsrmfqtst
izxkdaxhzkearqbnqscfbkyaxvkazdienazdmaourtlrnodeealxqsghmyqrzvkkmrinzkoitrnuddifbxgcxvwtfhitwbqrrzmtfsevlofwefoohirtnodeealxqsghmggtlbzofiifixaurqjtfhmfgkmrealkmclncztovvbeiawnjrqtsqmiudijpgfixfxkztmg
wtmstbskepieauzsevlztelbukafjvkkiovxaixowrteiixubnqnegquzapsqxqclvmlecshviulealkzgpnvjmnhjirqsavtjrivrnuduqgwianxvvaqtsvuvdozrwadrifxuzsigwculhsqxqsealsutmtizqtlru

20
data/text.txt Normal file
View File

@ -0,0 +1,20 @@
firefighterswilldeploynewtechniqueslearntintheworldsworstwildfirehotspotsasclimatechangeraisestherisklevelintheukthissummerlastyearsheatwavessawthousandsoffiresbreakoutoneevendestroyinghomesatwenningt
oneastlondonthisyearhasalreadyseenhundredsofgrassfiresandoneoftheukslargesteverhasbeenburninginthescottishhighlandsforthepasttwoweeksmorefirecrewsarenowtraininginskillsfromsoutherneuropeandtheusareeur
opeswildfireslinkedtoclimatechangehighlandwildfirecouldbelargesteverinukhowwildfiresstartandhowtostopthemfirechiefsareparticularlylookingtoexpandthenumberofspecialistteamstrainedinburnsuppressiontechn
iquesthedeliberateburningoflandtokeepafirecontainedatthemomentjustfiveukunitsacrossmorethanfireandrescueservicesspecialiseinthefightingfirewithfiretechniquemostlyinmoorlandareasbutchieffireofficerpaul
hedleywildfireleadforthenationalfirechiefscouncilnfccsaidmoreunitsincludingthoseinservicesthatstraddleurbanandruralareaswouldbetrainedinnewwaysofwildfirefightingtheycouldthenbedeployednationallyinthee
ventofasignificantfirehesaidheaddedtheriskandthreatofsuchmajorwildfireswasclearlygrowingintheukallofthislearningfrominternationalpartnerswhoareprobablystillsomeyearsaheadofusisaverysensiblewayoftrying
togetusaheadofthecurvehesaiditishopedaukwidetrainingprogrammewillbesetupaspartofanationalactionplandrawnupinresponsetothelessonslearntfromlastyearsblazesoneoftheservicesleadingthewayissurreyfireandres
cuewhichhasalreadydealtwithmorethanwildfiresthisyearthemostrecentwildfirewaslastmonthatfrenshamcommonnearfarnhamapopularbeautyspotthecauseofthehectarefireisnotyetknownbutthedamageiscleartoseefromheath
landtodesolationwhereoncetherewasrichheathlandhometorarespeciesincludingsandlizardsthereisnowdesolationwhenthebbcvisitedvolunteersfromtheamphibianandreptileconservationcharitywerewalkingthescorchedear
thstretchedoutinalinelikeapoliceforensicsteamsearchingforcreaturesthatsurvivedtheblazeiftheimmediateimpactisshockingthelongtermeffectsareequallyconcerningwhilstwecansavesomeoftheseanimalsthatsurvivedt
hefireweloseanawfullotandweloseallthatbiodiversityittakesyearsifnotdecadesforthattocomebackagainexplainedtrusteehowardinnsforcountrysiderangerdarrenhillwhosupportedfirefighterstacklingtheblazehereseei
ngtheaftermathandknowingmorewildfirescouldbeontheirwayishardtotaketocomebackandseeasitelikethisandknowifoundthisspeciesoverhereandwehadsmoothsnakesoverthereitdoestakeitstollhesaidmeanwhileusingadronew
iththermalimagingtosurveythesiteforhiddensubterraneanburnsismattoakleyafireinvestigationsofficerforsurreyfireandrescueheisoneoftheuksnationalwildfiretacticaladvisorsagroupofspecialistofficerswhoalread
yhavetheskillslearntabroadandwhowillbetrainingunitshesaysthekindoftechniqueshesseenusedinhotspotsasfarflungasfranceandsouthafricawillbevitalintheukintheyearstocomeourclimateischangingitschangingbeyond
recognitionheexplainedwhatusedtobeaninetoyearcyclethisiseveryyearnowweareheadingtowardsanorthernmediterraneanclimateinthesoutheastofenglandwithinthenextdecadeandthiswillbebusinessasusualdayindayoutman
yofthewildfirefightingmethodsbeingrolledoutacrosstheukrelyonatoolboxofskillsfromcreatingnaturalfirebreaksandreducingthefuelloadofvegetationtosettingcontrolledburnsdeliberatelyaroundwildfirestostopthei
rspreadtogethertheywouldreducetheneedforhugeamountsofwaterinadroughtandreducethenumberofappliancesneededonsitebutthefirebrigadesunionsaysnewtrainingandtechniquesarenotenoughtotackletherisingchallenges
ofclimatechangeitsaysmorecrewsareneededafteryearsofcutsthathaveseenthelossofthousandsoffirefighterssincemattwrackthefirebrigadesunionsgeneralsecretarycalledformorefundingfromthegovernmentsayingrisingt
emperaturesandthesystematicunderfundingofthefireandrescueservicearearecipefordestructionthegovernmentsaiditwasgivingfireandrescueauthoritiesaroundbnthisyearandeachauthoritywasabletodecidewhatitspentit
onaspokespersonsaidthehomeofficeworkscloselywiththenationalfirechiefscouncilandenglandandwaleswildfireforumtocontinuetoimproveourresponsetowildfiresandmitigatethem

129
fitness_ngrams.py Normal file
View File

@ -0,0 +1,129 @@
import re
import itertools
import string
import matplotlib.pyplot as plt
import random
ALPHABET = string.ascii_lowercase
def lclear(text):
return re.sub(r'[^a-z]', '', text.lower())
def read_file(filename):
counter = 0
longtxt = ''
with open(filename, encoding='utf8') as f:
for line in f:
longtxt += lclear(line.strip())
counter += 1
f.close()
return lclear(longtxt)
def write_to_file(filename, content):
with open(filename, 'w') as f:
current_line_length = 0
for word in content:
word_length = len(word)
while word_length > 0:
if current_line_length + word_length > 200:
f.write('\n')
current_line_length = 0
chars_to_write = min(word_length, 200 - current_line_length)
f.write(word[:chars_to_write] + '')
current_line_length += chars_to_write
word = word[chars_to_write:]
word_length -= chars_to_write
def generate_n_grams(n, alphabet): # it creates all possible grams of len n from given alphabet and puts it in a dict with each value 0
combinations = itertools.product(alphabet, repeat=n)
n_grams_dict_0 = {''.join(combination): 0 for combination in combinations}
return n_grams_dict_0
def calculate_n_grams_freq(n: int, inputFile, alphabet: str):
grams = generate_n_grams(n, alphabet)
# file_content = read_file(inputFile)
file_content = inputFile
total_n_grams = len(file_content) - n + 1
for i in range(total_n_grams): # after this loop the dict grams contains the NUMBER of how many times particular ngram occurs in text
ngram = file_content[i:i+n]
# print('gram: ',ngram)
grams[ngram] += 1
for key in list(grams.keys()):
grams[key] /= total_n_grams
# print('total ngrams freq:', total_n_grams)
grams = {key: value for key, value in grams.items() if value != 0}
return dict(sorted(grams.items(), key=lambda x: x[1], reverse=True)) # sorts by number of particular ngram
def compute_fitness(n, filename, frequencies):
text = read_file(filename)
total_n_grams = len(text) - n + 1
score = 0.0
for i in range(total_n_grams):
current_gram = text[i:i+n]
# print('cuttenr gram', current_gram)
score += frequencies.get(current_gram, 0)
# print('total ngrams sample:', total_n_grams)
return round(((score / total_n_grams) * 100), 8)
def create_bar_diagram(values):
x_positions = range(len(values))
labels = ['plaintxt', 'random', 'cesar', 'substitution', 'vinegere', 'hill'] # Labels for each bar
plt.bar(x_positions, values)
# Add labels to the x-axis and y-axis
plt.xlabel('sample text')
plt.ylabel('fitness rating')
# Add a title to the bar diagram
plt.title('Fitness using quadgrams')
# Set the x-axis tick positions and labels
plt.xticks(x_positions, labels)
plt.show()
n=2 # n-grams
eng_freq = calculate_n_grams_freq(n, read_file('data/Ulysses.txt'), ALPHABET)
fit_plain = compute_fitness(n, 'data/Ulysses.txt', eng_freq)
fit_random = compute_fitness(n, 'data/input_random.txt', eng_freq)
fit_cesar = compute_fitness(n, 'data/input_cesar.txt', eng_freq)
fit_subs = compute_fitness(n, 'data/input_subs.txt', eng_freq)
fit_ving = compute_fitness(n, 'data/input_vinegere.txt', eng_freq)
fit_hill = compute_fitness(n, 'data/input_hill.txt', eng_freq)
print(fit_plain)
print(fit_random)
print(fit_cesar)
print(fit_subs)
print(fit_ving)
values = [fit_plain, fit_random, fit_cesar, fit_subs, fit_ving, fit_hill]
write_to_file('data/text.txt', lclear(read_file('data/input_plaintext.txt')))
create_bar_diagram(values)

BIN
fitness_raport.pdf Normal file

Binary file not shown.