Undocumented
Function | cheated |
Clustering of messages with hierarchical ascending classification but pre-implemented so it's cheating :param corpus: list of str :return: None |
Function | clustering |
Clustering of messages with hierarchical ascending classification :param messages: list of discord.Message :param similarityMatrix: np.matrix :param quantity: str :param messageInitIndex: int :return: list of list of discord... |
Function | cluster |
Compute the similarity between clusters :param similarityMatrix: np.matrix :param clusters: list of np.ndarray :return: np.matrix |
Function | cosine |
Compute the cosine distance between two lists of float :param list1: List of float :param list2: List of float :return: float |
Function | distance |
Compute the distance between two messages :param embeddingMessage1: np.ndarray :param embeddingMessage2: np.ndarray :return: Float |
Async Function | do |
Main function of the tldr command, call every function needed to summarize the chat :param bot: The bot :param message: The message that call the command :param messageToEdit: The message to edit with the summary :param quantity: The quantity of summary to send :param position: The position of the summary :param timeGap: The time gap between the summary :return: None... |
Function | dumpjson |
Dump the similarity matrix in json Used to debug and test :param similarityMatrix: The similarity matrix :return: None |
Function | euclidean |
Compute the euclidean distance between two lists of float :param list1: List of float :param list2: List of float :return: float |
Function | find |
Find the minimum value of a matrix :param similarityMatrix: np.ndarray :return: int, int, float |
Function | get |
Get messages from a channel around, after or before a message depending on the position parameter :param bot: Discord bot :param messageInit: Message around which we want to get the messages :param timeGap: Time gap in minutes :param positionParameter: Position parameter :return: List of messages, index of the messageInit in the list... |
Async Function | get |
Coroutines to get messages after a message :param channel: Channel to get the messages :param message: Message after which we want to get the messages :param limit: Limit of messages to get :return: List of messages... |
Async Function | get |
Coroutines to get messages before a message :param channel: Channel to get the messages :param message: Message before which we want to get the messages :param limit: Limit of messages to get :return: List of messages... |
Function | get |
create a list of translted messages :param messages: List of discord.Message :return: List of string |
Function | min |
Compute the distance between two clusters :param cluster1: list of int :param cluster2: list of int :param similarityMatrix: np.matrix :return: float |
Function | postion |
Compute the postion parameter String to a tuple of boolean :param position: String of the position parameter :return: Tuple of boolean (above, below) |
Function | print |
Print the clusters Used to debug and test :param clusters: The clusters :return: None |
Function | print |
Print the similarity matrix Used to debug and test :param similarityMatrix: The similarity matrix :return: None |
Function | quantity |
Compute the quantity parameter String to a boolean :param quantity: String of the quantity parameter :return: Boolean |
Function | remove |
Process text to remove very special characters :param text: String to process :return: Processed string |
Function | send |
Send the summarises :param bot: discord.Client :param messageToEdit: discord.Message :param listSummarise: list of tuple of str and discord.Message :return: None |
Function | similarity |
More like a distance matrix, 0 = same message, 1 = totally different, -1 = not computed :param tokenMessages: list of list of string :param messages: list of discord.Message :return: np.matrix of size len(messages) x len(messages) and embedding of messages... |
Function | similarity |
More like a distance matrix, 0 = same message, 1 = totally different, -1 = not computed :param tokenMessages: list of list of string :param messages: list of discord.Message :return: np.matrix of size len(messages) x len(messages) and embedding of messages... |
Function | summarize |
Summarize Every cluster of messages :param messagesCluster: list of list of discord.Message :return: list of tuple of, Summary For one cluster and the first message of the cluster |
Function | ward |
Compute the Ward distance between two clusters :param cluster1: list of int :param cluster2: list of int :param similarityMatrix: np.matrix :return: float |
Variable | sentence |
Undocumented |
Variable | summarizer |
Undocumented |
Clustering of messages with hierarchical ascending classification but pre-implemented so it's cheating :param corpus: list of str :return: None
Clustering of messages with hierarchical ascending classification :param messages: list of discord.Message :param similarityMatrix: np.matrix :param quantity: str :param messageInitIndex: int :return: list of list of discord.Message
Parameters | |
messages:list[ | Undocumented |
similaritynp.ndarray | Undocumented |
quantity:str | Undocumented |
messageint | Undocumented |
Returns | |
list[ | Undocumented |
Compute the similarity between clusters :param similarityMatrix: np.matrix :param clusters: list of np.ndarray :return: np.matrix
Parameters | |
similaritynp.ndarray | Undocumented |
clusters:list[ | Undocumented |
Returns | |
np.ndarray | Undocumented |
Compute the cosine distance between two lists of float :param list1: List of float :param list2: List of float :return: float
Parameters | |
list1:np.ndarray | Undocumented |
list2:np.ndarray | Undocumented |
Returns | |
np.float64 | Undocumented |
Compute the distance between two messages :param embeddingMessage1: np.ndarray :param embeddingMessage2: np.ndarray :return: Float
Parameters | |
embeddingnp.ndarray | Undocumented |
embeddingnp.ndarray | Undocumented |
async def doTldr(bot, message, messageToEdit, quantity='one', position='around', timeGap=5): ¶
Main function of the tldr command, call every function needed to summarize the chat :param bot: The bot :param message: The message that call the command :param messageToEdit: The message to edit with the summary :param quantity: The quantity of summary to send :param position: The position of the summary :param timeGap: The time gap between the summary :return: None
Parameters | |
bot:discord.Client | Undocumented |
message:discord.Message | Undocumented |
messagediscord.Message | Undocumented |
quantity:str | Undocumented |
position:str | Undocumented |
timeint | Undocumented |
Dump the similarity matrix in json Used to debug and test :param similarityMatrix: The similarity matrix :return: None
Parameters | |
similaritynp.array | Undocumented |
Compute the euclidean distance between two lists of float :param list1: List of float :param list2: List of float :return: float
Parameters | |
list1:np.ndarray | Undocumented |
list2:np.ndarray | Undocumented |
Returns | |
float | Undocumented |
Find the minimum value of a matrix :param similarityMatrix: np.ndarray :return: int, int, float
Parameters | |
similaritynp.ndarray | Undocumented |
Returns | |
tuple[ | Undocumented |
Get messages from a channel around, after or before a message depending on the position parameter :param bot: Discord bot :param messageInit: Message around which we want to get the messages :param timeGap: Time gap in minutes :param positionParameter: Position parameter :return: List of messages, index of the messageInit in the list
Parameters | |
bot:discord.Client | Undocumented |
messagediscord.Message | Undocumented |
timeint | Undocumented |
position | Undocumented |
Returns | |
tuple[ | Undocumented |
Coroutines to get messages after a message :param channel: Channel to get the messages :param message: Message after which we want to get the messages :param limit: Limit of messages to get :return: List of messages
Parameters | |
channel:discord.TextChannel | Undocumented |
message:discord.Message | Undocumented |
limit:int | Undocumented |
Returns | |
list[ | Undocumented |
Coroutines to get messages before a message :param channel: Channel to get the messages :param message: Message before which we want to get the messages :param limit: Limit of messages to get :return: List of messages
Parameters | |
channel:discord.TextChannel | Undocumented |
message:discord.Message | Undocumented |
limit:int | Undocumented |
Returns | |
list[ | Undocumented |
create a list of translted messages :param messages: List of discord.Message :return: List of string
Parameters | |
messages:list[ | Undocumented |
Returns | |
list[ | Undocumented |
Compute the distance between two clusters :param cluster1: list of int :param cluster2: list of int :param similarityMatrix: np.matrix :return: float
Returns | |
float | Undocumented |
Compute the postion parameter String to a tuple of boolean :param position: String of the position parameter :return: Tuple of boolean (above, below)
Parameters | |
position:str | Undocumented |
Returns | |
tuple[ | Undocumented |
Print the similarity matrix Used to debug and test :param similarityMatrix: The similarity matrix :return: None
Parameters | |
similaritynp.array | Undocumented |
Compute the quantity parameter String to a boolean :param quantity: String of the quantity parameter :return: Boolean
Parameters | |
quantity:str | Undocumented |
Returns | |
bool | Undocumented |
Process text to remove very special characters :param text: String to process :return: Processed string
Returns | |
str | Undocumented |
Send the summarises :param bot: discord.Client :param messageToEdit: discord.Message :param listSummarise: list of tuple of str and discord.Message :return: None
Parameters | |
bot:discord.Client | Undocumented |
messagediscord.Message | Undocumented |
listlist[ | Undocumented |
More like a distance matrix, 0 = same message, 1 = totally different, -1 = not computed :param tokenMessages: list of list of string :param messages: list of discord.Message :return: np.matrix of size len(messages) x len(messages) and embedding of messages
Parameters | |
tokenlist[ | Undocumented |
messages:list[ | Undocumented |
Returns | |
np.ndarray | Undocumented |
More like a distance matrix, 0 = same message, 1 = totally different, -1 = not computed :param tokenMessages: list of list of string :param messages: list of discord.Message :return: np.matrix of size len(messages) x len(messages) and embedding of messages
Parameters | |
tokenlist[ | Undocumented |
messages:list[ | Undocumented |
Returns | |
np.ndarray | Undocumented |
Summarize Every cluster of messages :param messagesCluster: list of list of discord.Message :return: list of tuple of, Summary For one cluster and the first message of the cluster
Parameters | |
messageslist[ | Undocumented |
Returns | |
list[ | Undocumented |