classifier/classifier.py
def save_obj(train, objectContent, obj):
    ''' 
    Pickle objects
    ------------------------------
    Parameters
    ----------
    train : Boolean
        if True, get object from train folder

    objectContent : str
        type of content inside obj file

    obj : object
        object to save

    '''

    if train:
        filename = 'objects/train/train_{}.obj'.format(objectContent)
    else: 
        filename = 'objects/test/test_{}.obj'.format(objectContent)

    with open(filename, 'wb') as fp:
        pickle.dump(obj, fp)
        print("Saved %s" % filename)
 
    Pickle objects
    ------------------------------
    Parameters
    ----------
    train : Boolean
        if True, get object from train folder

    objectContent : str
        type of content inside obj file

    obj : object
        object to save

    
Pickle objects
Parameters

train : Boolean
if True, get object from train folder

objectContent : str
type of content inside obj file

obj : object
object to save
Pickle objects Parameters train : Boolean if True get object from train folder objectContent : str type of content inside obj file obj : object object to save
def save_obj(train, objectContent, obj):
    if train:
        filename = 'objects/train/train_{}.obj'.format(objectContent)
    else: 
        filename = 'objects/test/test_{}.obj'.format(objectContent)
    with open(filename, 'wb') as fp:
        pickle.dump(obj, fp)
        print("Saved %s" % filename)
def save_obj ( train , objectContent , obj ) : if train : filename = 'objects/train/train_{}.obj' . format ( objectContent ) else : filename = 'objects/test/test_{}.obj' . format ( objectContent ) with open ( filename , 'wb' ) as fp : pickle . dump ( obj , fp ) print ( "Saved %s" % filename )
Pickle objects
Parameters
Pickle objects Parameters
''' 
    Pickle objects
    ------------------------------
    Parameters
    ----------
    train : Boolean
        if True, get object from train folder

    objectContent : str
        type of content inside obj file

    obj : object
        object to save

    '''
train
objectContent
obj