Visualisation

class Manteia.Visualisation.Visualisation(path='', name='', save=False, show=True)

This is the class to make visualisation of NLP task.

Args:

documents (list, optional, defaults to None):

A list of documents.

labels (float, optional, defaults to None):

A list of labels.

dataset_name (string, optional, defaults to ‘’):

Name of the dataset.

path (string, optional, defaults to ‘’):

Path to save the report.

save (bool, optional, defaults to False):

save the graph to the path.

show (bool, optional, defaults to False):

show the graph.

Example:

from Manteia.Statistic import Statistic 
from Manteia.Visualisation import Visualisation

documents = [
'  !?? What do you call a potato in space? Spudnik:::13 ;;    //   ',
'What should you do before criticizing Pac-Man? WAKA WAKA WAKA mile in his shoe.',
'What did Arnold Schwarzenegger say at the abortion clinic? Hasta last vista, baby.',
'Why do you never see elephants hiding in trees? \'Cause they are freaking good at it',
'My son just got a tattoo of a heart, a spade, a club, and a diamond, all without my permission. I guess I\'ll deal with him later.',
'Mom: "Do you want this?" Me: "No." Mom: "Ok I\'ll give it to your brother." Me: "No I want it."',
'Ibuprofen is my favorite headache medicine that also sounds like a reggae professor.',
'INTERVIEWER: Why do you want to work here? ME: *crumbs tumbling from my mouth* Oh, I don\'t. I was just walking by and saw you had donuts.',
'I\'ve struggled for years to be above the influence... But I\'ve never been able to get that high',
'With Facebook, you can stay in touch with people you would otherwise never talk to, but that\'s only one of the many awful things about it',
]

labels = [
['funny'],['not funny'],['funny'],['not funny'],['funny'],['not funny'],['not funny'],['not funny'],['funny'],['not funny'],
]

stat=Statistic(documents,labels)
dictionary=stat.dictionnary_stat_labels()
path='./visu.png'
visu = Visualisation(path)
visu.format_data(dictionary)
visu.plot_bar()

Attributes:

plot_boxplot(labels, longueur_des_doc, ylim=200)

figure for show exploration length of document.