def test_nested():

    # In PETRARCH 0.4.0 this event should only code "US claimed that ISIL."
    # Nested sentences are intentionally not coded, but this can be changed if needed.
    #       (this would be changed at the end of check_verbs where the index is reevaluated)
    
    
    text = "The US claimed that ISIL had attacked Iraq and taken the city of Mosul"

    parse = """(ROOT (S (NP (DT The) (NNP US)) (VP (VBD claimed) (SBAR (IN that) (S (NP (NNP ISIL)) (VP (VBD had) (VP (VP (VBN attacked) (NP (NNP Iraq))) (CC and) (VP (VBN taken) (NP (NP (DT the) (NN city)) (PP (IN of) (NP (NNP Mosul))))))))))))"""

    parsed = utilities._format_parsed_str(parse)

    dict = {u'test123': {u'sents': {u'0': {u'content': text, u'parsed': parse}},
                u'meta': {u'date': u'20150101'}}}

    return_dict = petrarch.do_coding(dict,None)
    assert return_dict['test123']['sents']['0']['events'] == [['USA','IMGMUSISI','112']]
dataset/ETHPy150Open openeventdata/petrarch/petrarch/tests/test_petrarch.py/test_nested/original