SarcasmDetection icon indicating copy to clipboard operation
SarcasmDetection copied to clipboard

How to run this on my own data to get sarcasm result?

Open monajalal opened this issue 6 years ago • 3 comments

Two questions:

I have a CSV with one column that contains tweets.

  1. how can I run this using your pre-trained weights?
  2. how can I train this using my own training data? Does having 800 ground truth tweets work in this case? Is there a number of minimum ground truth tweets you would suggest?

https://pastebin.com/wxwbmD16 this took about 1 hour for me. I was wondering how I could use a saved model and don't start training from scratch.

monajalal avatar Mar 04 '18 01:03 monajalal

Actually I figured the answer to Q1. I just followed your command and commented this

    # uncomment for training
    #tr = train_model(train_file, validation_file, word_file_path, split_word_path, emoji_file_path, model_file,
    #                 vocab_file_path, output_file)

What should be the format of the test data, the data I want to run your code on and get result? Should I put it in test folder?

monajalal avatar Mar 04 '18 01:03 monajalal

The data should be in the following tab-separated format. In case of tweets, each line should represent one tweet. IDlabeltext

Please set the test_file with the path of the tab-separated test data. output_file.analysis will contain the output of the test data.

AniSkywalker avatar Apr 06 '18 14:04 AniSkywalker

The data should be in the following tab-separated format. In case of tweets, each line should represent one tweet. IDlabeltext

Please set the test_file with the path of the tab-separated test data. output_file.analysis will contain the output of the test data.

Or can take a look into data handler , and change the way read from files. If you have giving a csv file, just look to those lines with separate by "tab" ,change it to something else like separate by ","

PaulZhangIsing avatar Jan 10 '19 01:01 PaulZhangIsing