We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to generate vocabulary file from our csv / tsv dataset?
The text was updated successfully, but these errors were encountered:
Hi, you can load the tsv file and then split the words using the spaces and save only the unique words. Like this:
import pandas as pd df = pd.read_csv(dataset_path + "/corpus.tsv", sep='\t', header=None) vocabulary = set() for document in df[0].tolist(): for word in document.split(): vocabulary.add(word) with open(dataset_path + "/vocabulary.txt", 'w') as fw: for word in vocabulary: fw.write(word)
Best,
Silvia
Sorry, something went wrong.
No branches or pull requests
how to generate vocabulary file from our csv / tsv dataset?
The text was updated successfully, but these errors were encountered: