FileAnalysis (version 0.0.2)
index
fileanalysis.py

This file analyze emergence of characters in file (to decrypt with statistics).

 
Modules
       
matplotlib.pyplot

 
Classes
       
builtins.object
FileAnalysis

 
class FileAnalysis(builtins.object)
    FileAnalysis(filename: str, alphabet_only: bool = False)
 
This class analyze emergence of characters.
 
  Methods defined here:
__init__(self, filename: str, alphabet_only: bool = False)
Initialize self.  See help(type(self)) for accurate signature.
analysis_char(self, char: bytes) -> None
This function analyse a character.
analysis_filecontent(self) -> Dict[str, int]
This function analyze file content.
build_chart(self) -> None
This function use pyplot to build the chart from chars.
get_pourcent(self) -> Dict[str, float]
This function return pourcent from chars.
sort_and_show(self, sort: bool = False, json: bool = False) -> None
This function sort characters by emergence
if sort argument is True and print emergences as JSON
if json argument is True else show chart.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        ENGLISH_FREQUENCE = {'A': 8.2, 'B': 1.5, 'C': 2.8, 'D': 4.3, 'E': 13, 'F': 2.2, 'G': 2, 'H': 6.1, 'I': 7, 'J': 0.15, ...}
FRENCH_FREQUENCE = {'A': 7.11, 'B': 1.14, 'C': 3.18, 'D': 3.67, 'E': 12.1, 'F': 1.11, 'G': 1.23, 'H': 1.11, 'I': 6.59, 'J': 0.34, ...}
__all__ = ['FileAnalysis', 'FRENCH_FREQUENCE', 'ENGLISH_FREQUENCE']
__author_email__ = 'mauricelambert434@gmail.com'
__copyright__ = '\nFileAnalysis Copyright (C) 2021 Maurice Lambe...ome to redistribute it\nunder certain conditions.\n'
__description__ = 'This file analyze emergence of characters in file (to decrypt with statistics).'
__license__ = 'GPL-3.0 License'
__maintainer__ = 'Maurice Lambert'
__maintainer_email__ = 'mauricelambert434@gmail.com'
__url__ = 'https://github.com/mauricelambert/FileAnalysis/'

 
Author
        Maurice Lambert