IG2NLP: Automated NLP Based Institutional Statement Annotation
Abstract
"Institutional Grammar" (Institusjonell Grammatikk) er en grammatikk for systematisk studie og analyse av institusjoner. Målet til den Institusjonelle Grammatikken er å formalisere en måte å definere institusjoner og å analysere institusjoner uttrykt i naturlig språk for å gjøre institusjonene tilgjengelige for analyse. Den essensielle enheten av analyse er såkalte "institutional statements" (institusjonelle uttrykk) som inkluderer strategier (dvs. konvensjoner av atferd), normer (sosialt håndhevet atferd) og regler (lovlig håndhevet atferd). Disse institusjonelle utrykkene er kommentert eller kodet med komponenter av den Institusjonelle Grammatikken for å utføre denne analysen. Oppgaven av å kode institusjonelle uttrykk krever kunnskap og ekspertise i den Institusjonelle Grammatikken og betydelig tidsinvestering. Hensikten til denne oppgaven er å hjelpe med kodingen av institusjonelle uttrykk. Denne hjelpen er i form av en prototype av et program som automatiserer kodingen av uttrykkene basert på Naturlig Språkbehandling (NLP) og en modell for å knytte komponenter av den Institusjonelle Grammatikken til deler av tekst basert på resultatene av Naturlig Språkbehandling på uttrykket. Bidragene til oppgaven ble utviklet i stadier. Først ble et innledende pilotprosjekt utviklet. Dette pilotprosjektet var en prototype som automatiserte kodeprosessen basert på avhengighetsanalyse og POS-tagging. Denne prototypen ble utviklet i parallell med en prototype på et oppdatert brukergrensesnitt til IG Parser kodeverktøyet (tekstredigeringsprogram for institusjonelle uttrykk), denne prototypen ble senere integrert inn i IG Parser kodeverktøyet. Pilotprosjektet ble videreutviklet gjennom utviklingen av IG2NLP programmet med ekstra funksjonalitet, verktøy og med koding basert på flere NLP teknikker. Videre ble et API utviklet sammen med en prototype for integrasjon av API inn i IG Parser, som utvider funksjonaliteten til IG Parser med automatisert koding. Bruken av en skreddersydd modell for å knytte komponenter til tekst basert på NLP gir reproduserbare resultater og viser potensialet av å bruke NLP til å hjelpe med kodeoppgaver. Løsningen viser god ytelse på "regulative statements" (regulerende uttrykk) som består av enkeltformede setninger. Løsningen automatiserer også koding av nestede uttrykk (utrykk som inneholder andre utrykk) og "constitutional statements" (konstitusjonelle uttrykk), men ytelsen er lavere på disse oppgavene. Videre bidrag inkluderer testmetoden utviklet for å teste kodingen og diskusjonen av begrensninger, styrker og videre arbeid. Alt i alt virker løsningen utviklet i denne oppgaven som et konseptbevis som legger grunnlaget for videre arbeid innen automatisert koding ved hjelp av NLP. The Institutional Grammar (IG) is a grammar for systematic study and analysis of institutions. The purpose of the IG is to formalize a way to define institutions and analyse institutions expressed in natural language in order to make those analytically accessible. The essential unit of analysis are so-called institutional statements that include strategies (e.g., conventions of behaviour), norms (socially enforced behaviour) and rules (legally enforced behaviour). These institutional statements are annotated or encoded with components of the IG to perform this analysis. The task of annotating institutional statements requires knowledge and expertise of the IG, as well as substantive time investment. The purpose of this thesis is to assist in the annotation of institutional statements. This assistance comes in the form of a prototype of an automated annotation software that bases its automated annotations on Natural Language Processing (NLP) techniques and a custom matching function to match components of the IG to parts of text based on the output of the NLP pipeline. The contributions were developed in stages, starting with an initial pilot prototype for the automated annotations based solely on dependency parsing and Part-of-Speech (POS)-tagging. This was developed alongside an updated user interface prototype for the Institutional Grammar Parser (IG Parser) annotation tool that was later integrated into the main IG Parser program. The pilot project was further extended through the development of IG2NLP with additional functionality, tooling and NLP techniques. Further, an Application Programming Interface (API) was developed together with a prototype integration of the API into the IG Parser, which extends the functionality of the IG Parser with automated annotation. The main contributions of this thesis are the development of a matching function from dependency parsing, coreference resolution, Named Entity Recognition (NER), POS-tags and uFeats to components of the IG and the integration of this in a prototype. The use of custom manually created rules based on NLP techniques gives reproducible results and shows the potential of using NLP to assist in the annotation task. The solution shows good performance on regulative statements consisting of single fully formed sentences. The solution also automates the annotation of constitutive statements and nested statements, however the accuracy is lower for these features. Further contributions are the testing methodology developed for testing the annotations and the discussion of limitations, strengths and future work. In the end, the solution developed in this thesis serves as a proof of concept that lays the foundation for further work in automated annotation using NLP.