Module anagram
This module allows you to score anagrams.
Functions
def compute_score_ND(word, matrix, alphabet, N)
-
compute_score_ND()
compute the score of a word based on a matrix.- word (str): the word to score
- matrix (dict): the matrix representing the probability of letter chaining each other
- alphabet (list): the used alphabet (from input file or from dictionary)
- N (int): the dimension of the matrix
- return (float): the score of the word
def powerset(iterable)
-
powerset([1,2,3]) → () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3) copied from: https://docs.python.org/3/library/itertools.html#itertools-recipes
def progress_bar(count, total, size=60, sides='[]', full='#', empty='.', prefix='')
-
copied from: https://github.com/Relex12/Simple-Progress-Bar