PyABSA icon indicating copy to clipboard operation
PyABSA copied to clipboard

Variation in output by adding spaces

Open MouzaMrinal opened this issue 2 years ago • 2 comments

@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'}

MouzaMrinal avatar Apr 14 '23 17:04 MouzaMrinal

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.

yangheng95 avatar Apr 14 '23 17:04 yangheng95

HIi, do you solve this problem ?

Arsen7076 avatar Oct 28 '23 14:10 Arsen7076