Closed leohsuofnthu closed 2 years ago
Thank you for your feedback! We will fix it as soon as possible.
FYI, the provided checkpoints are for research only and not trained with sufficient resources. Fit the model on your datasets will bring performance improvement.
Hi, thanks for the nice work. Recently I try to use the multilingual pretrained model for inference. I found that if the model predicts both of 2 consecutive words as (B-ASP). There will be a 'empty separator' error while inferencing. Is there any advice for avoiding this situation? Thanks again !
![]()
I review the code, as a temp solution, please alter this if-clasuse https://github.com/yangheng95/PyABSA/blob/41a067aec58b067058c1998eba33b2d9908f4989/pyabsa/tasks/atepc/prediction/aspect_extractor.py#L233 into
if 'B-ASP' == pred_iobs[iob_idx] and 'B-ASP' in pred_iobs[iob_idx + 1] \
or 'B-ASP' == pred_iobs[iob_idx] and 'ASP' not in pred_iobs[iob_idx + 1] \
or 'I-ASP' == pred_iobs[iob_idx] and 'ASP' not in pred_iobs[iob_idx + 1]:
I will be appreciated if you told me the feasibility of this solution. If it works OK, I will merge into the package, many thanks!
Hi, Thanks for the quick response. I bump into another situation as below. Hope this helpful for you.
Hi, thanks for your message. However the information from this screen is limited. Can you show me the whole error stacktrace and the example text?
Hi, Thanks for the quick response. I bump into another situation as below. Hope this helpful for you.
Hi, Using following if-caulse is more clear and may solve this preoblem. if 'B-ASP' == pred_iobs[iob_idx] and 'B-ASP' == pred_iobs[iob_idx + 1] \ or 'I-ASP' == pred_iobs[iob_idx] and 'B-ASP' == pred_iobs[iob_idx + 1]:
Hi,
Thanks, the code works, the new problem is that it ll combine distinct aspects as below:
Sorry for the buggy repair, I should release the repaire after full test of the code given a cuda device and enough cases. I will check and update again.
Since I cannot run full test then, I suggest you to change the if-clause again, as following:
if pred_iobs[iob_idx].endswith('ASP') and not pred_iobs[iob_idx + 1].endswith('ASP'):
No worry, it is great to help with this useful repository !
I will be appreciated if you futher collect the bad cases and pass them to me
No problem, Here is the error for the newest modification
No problem, Here is the error for the newest modification
I mean could you paste the example texts to me to reproduce your errors?
Here is the text:
'I am extremely disappointed and frustrated with the Granite Club programming since you seem to think the only preschoolers or parents that would be interested in participating are those who are stay at home parents or have at home help to bring children to weekday programming.'
and the model:
model_path = ATEPCTrainedModelManager.get_checkpoint(checkpoint_name='english')
if pred_iobs[iob_idx].endswith('ASP') and not pred_iobs[iob_idx + 1].endswith('I-ASP'):
I test this example, however, I develop this package based on several cases and dont have enough example texts. If any error occurs please let me know, many thanks!
Thank you ! I end up inferencing with version 0.8.7.9, and it works well for now :)
Thank you ! I end up inferencing with version 0.8.7.9, and it works well for now :)
I will close this issue, but feel free to contact me if you have more advice or report.
Hi, thanks for the nice work. Recently I try to use the multilingual pretrained model for inference. I found that if the model predicts both of 2 consecutive words as (B-ASP). There will be a 'empty separator' error while inferencing. Is there any advice for avoiding this situation? Thanks again !