skit-ai/dialogy-template-simple-transformers

[Feature Request] Method for saving intents and entities prediction.

keshav47 opened this issue · 0 comments

Since I didn't find a standard method extracting and saving intents and entities, I modified this part to

        predictions.append(
            {
                "data_id": row["data_id"],
                const.INTENT: intents[0][const.NAME] if intents else "_no_preds_",
                const.SCORE: intents[0][const.SCORE] if intents else 0,
                const.ENTITIES: json.dumps(entities)

            }
        )

and saved the prediction list to csv, can we add a flag in slu test which when switched on saved intent and entities prediction in csv or some other format @ltbringer ?