-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hello! I'm a little confused about attributes in .json file, which is mentioned in OpenIE_process.py.
Take a .story in cnn/dm dataset for example:
In process_one function:
filename = os.path.join(DATA_DIR, split, str(_id) + '.json')
How can I get this json file?
Especially, in prepare_data function:
coref = data['**input_mention_cluster**']
abstract = data['**abstract'**]
article = data['**article**']
if split != 'test': extracts = data['**extracted_combine**']
and:
for entity in coref:
entities = []
for mention in entity:
entities.append((mention['**text**'], mention['**position**']))
How can i let a story file turn into a json file like this?
I've tried Stanford corenlp openie like Readme.md in ./preprocess. But here is what I get:
/raw_stories_src/ad021a7924ee57491cee8576499ac196b1afeb23.src 2 worried customers as lines is one 23 25 22 2 13 14 1.000 long lines formed before counters opened at the northern rock building society , one of the uk 's top five lenders , as worried customers ignored reassurances from the bank and the government . RB NNS VBN IN NNS VBD IN DT JJ NN NN NN , CD IN DT NN POS JJ CD NNS , IN JJ NNS VBN NNS IN DT NN CC DT NN . worried customer as line be one
it looks like the triples has been extracted, but I want to turn it into the json file like yours. Could you give me a explanation about how you get these attributes, and what these attributes(input_mention_cluster,extracted_combine....) mean?
Thank you very much !