yangheng95 / PyABSA

Sentiment Analysis, Text Classification, Text Augmentation, Text Adversarial defense, etc.;
https://pyabsa.readthedocs.io
MIT License
952 stars 160 forks source link

Variation in output by adding spaces #304

Open MouzaMrinal opened 1 year ago

MouzaMrinal commented 1 year ago

@yangheng95 - please see the below issue

Text1 = """That is the question I asked then this morning. But most important how do they continue with no support options for clients for problems with these changes."""

Text2 = """That is the question I asked then this morning. But most important how do they continue with no support options for clients for problems with these changes."""

The only difference between text 1 and text 2 is the space after 'But'. For text2 i am getting the error, for text1 its working fine.

Below is my code.

`triplet_extractor = ASTE.AspectSentimentTripletExtractor("multilingual")
 text1 = """That is the question I asked then this morning. But most important how do they continue with no support options for clients for problems with these changes."""
 text2 = """That is the question I asked then this morning.  But most important how do they continue with no support options for clients for problems with these changes."""
triplet_extractor.predict(text2)
 `
{'text': 'That is the question I asked then this morning.  But most important how do they continue with no support options for clients for problems with these changes.',
 'Triplets': '[]',
 'error': "can't assign a NoneType to a torch.LongTensor",
 'error_type': 'RuntimeError'}
yangheng95 commented 1 year ago

Yes, there are some problems to be solved because the quadrule sentiment extraction is an experimental feature. Please try to make some efforts to solve it, and it will be excellent if you would like to share your solution.

After all, I will try to optimize it in future. Provided that I got a easy schedule.

Arsen7076 commented 1 year ago

HIi, do you solve this problem ?