Giter VIP home page Giter VIP logo

dependency_stags's Introduction

dependency_stags

Extract dependency tree supertags from CoNLL data. The supertags are the ones described in Ouchi et al., 2014 and Foth et al., 2006.

Requirements

python 2.7

Data

The extractor expects a file or list of files in CoNLL-09 format, but any CoNLL file will work as long as there is a column for word index, head, dependency relation, and part of speech. To use a different CoNLL format, open extract.py and edit the conll_line_to_dict function to match your format. Specifically, edit lines 19 and 20:

    fields = [(0, 'idx', int), (4, 'pos', str),
              (8, 'head', int), (10, 'deprel', str)]    

so that the first element in each tuple (the column index) matches the column index in your data.

You also need to edit arg_list in get_model2_stag, which lists the arguments that are considered to be required for forming model2 supertags. According to Ouchi et al., these are SUBJ (subject), OBJ (object), PRD (predicative complement), and VC (verb chain). You need to change this to match your dependency formalism.

Supertag models

This code extracts supertags models 1 and 2 from Outhi et al. (2014) and also the model from Foth et al. (2006), which is numbered here as model 0. See those papers for details.

Usage

python extract.py model_number file1.txt [file2.txt ...]

dependency_stags's People

Watchers

Dan Friedman 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.