openeventdata / UniversalPetrarch

Language-agnostic political event coding using universal dependencies
MIT License
18 stars 9 forks source link

Add pattern-based test cases #23

Open PTB-OEDA opened 6 years ago

PTB-OEDA commented 6 years ago

Since the coder can now use the PETRARCH 1 dictionaries, test cases need to be added to make sure the patterns work correctly

philip-schrodt commented 6 years ago

There are a bunch of these in petrarch/data/dictionaries/PETR.Validate.verbs.txt in the openeventdata/petrarch repo. I'm guessing you'll need to modify them since I assume we're abandoning the underscore notation, but there are a lot of the actor tokens %, +, $ and %. Dig around a bit in the comments in the cases in data/text/PETR.UnitTest.records.xml and it should be possible to match up a lot of the cases and the pattern it matched. But you probably don't want the whole dictionary since it was relatively large and has a bunch of nonsense phrases left over from the TABARI sparse parsing.