Movatterモバイル変換


[0]ホーム

URL:


Moduleanagram

This module allows you toscore anagrams.

Functions

defcompute_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
defpowerset(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

defprogress_bar(count, total, size=60, sides='[]', full='#', empty='.', prefix='')

copied from:https://github.com/Relex12/Simple-Progress-Bar


[8]ページ先頭

©2009-2025 Movatter.jp