# ACT2-4 functions.

'''This Program returns the vocabulary size of Moby Dick.'''

def readMobyDickShort():
    '''Reads the text file MobyDick.txt and returns a list of words from the first 1000 characters'''
    fileName = 'MobyDick.txt'
    myFile = open(fileName,'r')
    fileString = myFile.read()
    myFile.close()
    fileString = fileString[0:1000]
    myList = fileString.split()
    return myList

def readMobyDickAll():
    '''Reads the text file MobyDick.txt and returns a list of words from the entire text'''
    fileName = 'MobyDick.txt'
    myFile = open(fileName,'r')
    fileString = myFile.read()
    myFile.close()
    print('Warning! Returning the entire list of words!')
    myList = fileString.split()
    return myList

def noReplicates(wordList):
    '''Takes a list as argument, returns a list free of replicate items.'''
        
def isElementOf(myElement,myList):
    '''Takes a string and a list and returns True if the string is
    in the list and False otherwise.'''

def vocabSize():
    '''Gets the vocabulary size of Moby Dick.'''
    myList = readMobyDickShort()

    # TODO: Do some stuff here...

    # Then return the vocabulary size.
    return 0
