marcotcr / anchor

Code for "High-Precision Model-Agnostic Explanations" paper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example only shows first few words of given text

saranoor opened this issue · comments

I am following the example for ‘Anchor for text’. The only difference is I am using my own dataset. My data is labelled as ‘depressed’ and ‘not depressed’. One thing I don’t understand is when I print the examples it includes the first few words from the entire text given to anchor explainer. For eg : following is the text I am giving to anchor

image

When I print the examples where anchor apply, and model predicts ‘depressed’ or ‘not depressed’. It only prints the first few words from the whole text.

image

Can you please explain why it is not taking into account entire given text?

sorry for the delay in responding. We were truncating strings at 80, and I guess I never noticed because I didn't try longer strings. Fixed in 00a3ee1