module documentation

Undocumented

Function convert_hex_to_rgb Convert a hex color to rgb :param hex: the hex color :return: the rgb color
Function get_colourmap Creates a colourmap from two colours in hex :param c1: The first colour :param c2: The second colour :return: The colourmap
Function getLanguage Detect the language of a text :param text: the text to detect :return: the language of the text
Function printExceptions Decorator that prints the exceptions of a function :param f: the function to be wrapped :return: the wrapped function
Function renormaliser Renormalises the importance of a user :param importance: the importance of the user :param parameter: the parameter of the function :param type: the type of the function :return: the renormalised importance with the given function...
Function renormaliser_log2 Renormalises the importance of a user using the log2 function :param importance: the importance of the user :param parameter: the parameter of the function :return: the renormalised importance
Function renormaliser_sigmoid Compute the sigmoid function :param importance: the input :return: the sigmoid of the importance
Function timeIt Decorator to time a function :param func: the function to time :return: the function with a timer
Function toEnglish Translate a text to english :param text: the text to translate :return: the translated text
Function toFrench Translate a text in English to French :param text: the text to translate :return: the translated text
Function translate Translate a text from a language to another :param text: the text to translate :param src: the source language :param trg: the target language :return: the translated text
Variable detect_language Undocumented
Variable translation_models Undocumented
def convert_hex_to_rgb(hex):

Convert a hex color to rgb :param hex: the hex color :return: the rgb color

def get_colourmap(c1, c2):

Creates a colourmap from two colours in hex :param c1: The first colour :param c2: The second colour :return: The colourmap

def getLanguage(text):

Detect the language of a text :param text: the text to detect :return: the language of the text

def printExceptions(f):

Decorator that prints the exceptions of a function :param f: the function to be wrapped :return: the wrapped function

def renormaliser(importance, parameter, type):

Renormalises the importance of a user :param importance: the importance of the user :param parameter: the parameter of the function :param type: the type of the function :return: the renormalised importance with the given function

Parameters
importance:floatUndocumented
parameter:floatUndocumented
type:strUndocumented
Returns
floatUndocumented
def renormaliser_log2(importance, parameter):

Renormalises the importance of a user using the log2 function :param importance: the importance of the user :param parameter: the parameter of the function :return: the renormalised importance

Parameters
importance:floatUndocumented
parameter:floatUndocumented
Returns
floatUndocumented
def renormaliser_sigmoid(importance):

Compute the sigmoid function :param importance: the input :return: the sigmoid of the importance

Parameters
importance:floatUndocumented
Returns
floatUndocumented
def timeIt(func):

Decorator to time a function :param func: the function to time :return: the function with a timer

def toEnglish(text):

Translate a text to english :param text: the text to translate :return: the translated text

def toFrench(text):

Translate a text in English to French :param text: the text to translate :return: the translated text

def translate(text, src, trg):

Translate a text from a language to another :param text: the text to translate :param src: the source language :param trg: the target language :return: the translated text

detect_language =

Undocumented

translation_models: dict =

Undocumented