openeventdata / petrarch2

Another next-generation event coding platform.
MIT License
71 stars 43 forks source link

fix function read_actor_dictionary() #27

Closed JingL1014 closed 8 years ago

JingL1014 commented 8 years ago

when the function reads dictionary "Phoenix.International.actors.txt", some actors are read incorrectly. For example: UFFE_ELLEMANNJENSEN [IGOEUREEC 820701-821231][IGOEUREEC 870701-871231] # president of the CoEU from DENMARK# IGOrulers.txt

Right now the above example is stored as: {u'UFFE': {u'ELLEMANN': {u'JENSEN': {u'[IGOEUREEC': {u'820701-821231][IGOEUREEC': {u'#': [(u'70701-871231', [])]}}}}}}

I fixed the errors so that the above example is stored as: {u'UFFE': {u'ELLEMANN': {u'JENSEN': {u'#': [(u'IGOEUREEC', [u'820701', u'821231']), (u'IGOEUREEC', [u'870701', u'871231'])]}}}}

johnb30 commented 8 years ago

This currently breaks 6 of the 11 existing unit tests. Could you hunt down what's causing that breakage?

@cnnorris if you have a minute could you take a look at this as well?

JingL1014 commented 8 years ago

the breakage is caused by reading dictionary "Phoenix.Countries.actors.txt". i have fixed the error

johnb30 commented 8 years ago

👍

Thanks for this!