leuchine / multi-domain-sentiment

Code for the paper Learning Domain-specific Representations for Multi-Domain Sentiment Classification
30 stars 12 forks source link

Training with 3 domains data #3

Open avinashsai opened 4 years ago

avinashsai commented 4 years ago

Hi, Can I train with 3 domains data simultaneously instead of 2 domains as mentioned in the paper?? If so, can you please suggest changes to be made in the code??

Thank you.

leuchine commented 4 years ago

Hi:

Yes. You can train with multiple domains instead of 2 domains. Please see line 312 - 319 in the file multi_view.py that creates num of layers equal to num of domains. Thanks!

Best Regards, Qi

avinashsai commented 4 years ago

Hi, Which file should I run?? multi_view.py or multi_view_domain_embedding_memory_adversarial.py??

Thank you

leuchine commented 4 years ago

Hi: Both files support multi-domains. Either one can be used. Thanks!

Best Regards, Qi

avinashsai commented 4 years ago

Hi, Thank you for the reply.

How can I test on cross domain data?? For example: I want to train domain 1,domain 2 and domain 3 simultaneously and wanted to test on a different 4th domain data.

Regards, Avinash

leuchine commented 4 years ago

Hi Avinash:

To use cross domain, you have to prepare the datasets. Basically, replace the dev and test set with the cross domains. Thanks!

Best Regards, Qi

avinashsai commented 4 years ago

Hi, In preprocessing.py vocabulary includes words from test data as well. Shouldn't test data be completely unseen?

Regards, Avinash

leuchine commented 4 years ago

Hi:

Yes. Ideally, the test data words shall not be shown. It is a common mistake. Just remove the file from test data or use some vocabulary from some public domain, like some BPE vocabularies.

Regards, Qi