Code Monkey home page Code Monkey logo

negative_constructions's Introduction

Negative_Constructions

This repository contains code and data for the paper "English Negative Constructions and Communicative Functions in Child Language", to appear in CogSci 2021, as well as an ongoing journal article extension.

In particular, the study investigates negative syntactic constructions and the communicative functions they play in early child language of English (age ranges from 12 to 72 months).

Experimental flow at the Syntactic Level

From childes-db to csv

python3 COGSCI2021/diaparse/chides2csv.py --path OUTPUT_PATH

From csv to conll (parsed dependency annotations)

python3 COGSCI2021/diaparse/diaparser.py --input CSV_DIRECTORY --output CONLL_DIRECTORY

Extract negative (and positive) utterances

python3 COGSCI2021/diaparse/construction.py --input CONLL_DIRECTORY --output FILENAME --domain DOMAIN/FUNCTION (--desp)
  1. -desp is for whether you'd like to generate descriptive file (e.g. number of uterances at each age of the childre) for both child and parent speech
  2. For --domain, set it to: emotion for emotion motor for prohibition and inability learning for labeling epistemic for epistemic negation percetion for non-existence

Output

  1. Descriptive files for child and parent speech are in COGSCI2021/data/
  2. Data for each domain/function of negation is in COGSCI2021/data/

Updated codes for journal article extension, including both the syntactic and the discourse level as well as individual variation

From childes-db to csv

python3 COGSCI2021/diaparse/chides2csv.py --path OUTPUT_PATH

From csv to conll (parsed dependency annotations)

python3 code/parse.py --output CONLL_DIRECTORY

To get descriptive statistics of overall utterances at different corresponding ages of the child

python3 code/discourse.py --input CONLL_DIRECTORY --output FILENAME --domain DOMAIN/FUNCTION --desp

Output

  1. data/child_descriptive.txt
  2. data/parent_descriptive.txt

The FILENAME and DOMAIN/FUNCTION can be anything, and one only needs to turn on the --desp flag once

Extract negative (and positive) utterances

python3 code/discourse.py --input CONLL_DIRECTORY --output FILENAME --domain DOMAIN/FUNCTION --level d/s
  1. For --domain, set it to: emotion for emotion motor for prohibition and inability learning for labeling epistemic for epistemic negation percetion for non-existence
  2. For --level, d is for discourse level, and s is for sentence level

Output

  1. data/DOMAIN.txt, e.g. data/emotion.txt for the sentence level
  2. data/DOMAIN_discourse.txt, e.g. data/emotion_discourse.txt for the discourse level

Individual variation

For simplicity, one could modify the individuals variable in the code/discourse.py file to decide which child's / children's production they would like to analyze. Then run:

python3 code/discourse --input CONLL_DIRECTORY --output FILENAME --domain DOMAIN/FUNCTION --individual --level s

This would generate descriptive statistics for each individual child of interest; the data for each child within a particular domain would already be generated by the previous step.

Output

  1. data/individual_child_descriptive.txt
  2. data/individual_parent_descriptive.txt

negative_constructions's People

Contributors

zoeyliu18 avatar jasbi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.