(word, indd)
returns index of given word based on given lookup dictionary

    returns the length of the lookup dictionary if word not found

    Args:
        word: string
        indd: dictionary with string words as keys and int indices as values
returns index of given word based on given lookup dictionary
returns index of given word based on given lookup dictionary
def _word_to_index(word, indd):
    '''returns index of given word based on given lookup dictionary

    returns the length of the lookup dictionary if word not found

    Args:
        word: string
        indd: dictionary with string words as keys and int indices as values
    '''
    if word in indd:
        return indd[word]
    else:
        return len(indd)
def _word_to_index ( word , indd ) : if word in indd : return indd [ word ] else : return len ( indd )