#!/usr/bin/env python
import pandas as pd
import argparse

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("-i", default=None, type=str, required=True, help="Dataset csv file")
    args = parser.parse_args()


# df = pd.DataFrame()
df = pd.read_csv(args.i)

vocab = set()

df['Sentence'].str.split().apply(vocab.update)

# for i in range(len(df)):
    # print(i)
    # df['Sentence'].iloc[i].str.split().apply(vocab.update)
    # df['Sentence'] = df['Sentence'].replace(df['Sentence'].iloc[i], trn.transform(df['Sentence'].iloc[i]))
    # for word in df['Sentence'].iloc[i]:
        # print(word)
        # vocab.add(word)

print(vocab)
print("Length of the vocabulary is: ", len(vocab))
