Git Product home page Git Product logo

larc-tagset's Introduction

usage: xml2slashtags.py [-h] [-s SPEAKER] [-l X] [-m MAPPING_FILE]
                        filenames [filenames ...]

Convert an XML Talbank file to slash/tag format in an alternate tagset.

positional arguments:
  filenames             Talbank XML files.

optional arguments:
  -h, --help            show this help message and exit
  -s SPEAKER, --speaker SPEAKER
                        Filter output to utterances by SPEAKER
  -l X, --label-speakers X
                        Set to 0 to remove speaker labels. defaults to 1
  -m MAPPING_FILE, --mapping-file MAPPING_FILE
                        A two-column csv file specifying the mappings between
                        the MOR and the target tagset. defaults to
			/path/to/script/dir/mor-to-larc-mapping.csv


The mapping csv file is in the following format:

MOR-PATTERN, NEWTAG

where NEWTAG is the user-defined target tag to translate to, and MOR-PATTERN is
in the following format:

  pos:feature&fusion-suffix|wordform

this mostly comes from the notation in cha files. the operators :, &, - and |
bind to the text following them, and all except for pos and |wordform may occur
multiple times. pos _must_ be specified. ordering is arbitrary for all but pos,
which must occur first.

examples of MOR-PATTERNS:

  adj - matches all words tagged as adjectives.

  v:cop&PAST&13S - matches words tagged as past tense, first/third person copular
		   verbs.

  aux|be - matches all words with stem "be" tagged as aux.


TODO:
  - allow MOR-PATTERNS lacking a pos component
  - add syntax for matching literal words

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.