ronaldseoh / atsc_prompts

Codes for the experiments in our EMNLP 2021 paper "Open Aspect Target Sentiment Classification with Natural Language Prompts"

Home Page:https://link.iamblogger.net/atscprompts-paper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I got the error info about unique in `_generate_examples`

SupritYoung opened this issue · comments

the error info is:

FAILURE TO GENERATE DATASET !
Found duplicate Key: 0
Keys should be unique and deterministic in nature

I see this code:

            if len(aspect_term_sentiment) > 0:
                for ats in aspect_term_sentiment:
                    yield id_, {
                        "text": sentence_text,
                        "aspect": ats["aspect"],
                        "sentiment": ats["sentiment"]
                    }

In my view, for every aspect in a text, the id_ will must be duplicate, isn't it ?