Skip to content

Commit

Permalink
Merge pull request #33 from amir-zeldes/develop
Browse files Browse the repository at this point in the history
README
  • Loading branch information
amir-zeldes authored Apr 30, 2021
2 parents d076a6c + 27b9a9b commit ef3528a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@

A simple configurable tool for manipulating dependency trees.

DepEdit reads and writes files encoded in the CoNLLX or CoNLLU dependency format (10 columns). It's a simple Python script which can change token attributes, token text, part of speech dependency function and other columns, as well as rewiring dependency graphs based on rules. You can also use it to add annotations to each sentence based on properties of the subgraph (see the English example of tagging rough sentence type in examples/)
DepEdit reads and writes files encoded in the CoNLL-U or CoNLL-X dependency format (10 columns). It's a simple Python script which can change token attributes, token text, part of speech dependency function and other columns, as well as rewiring dependency graphs based on rules. You can also use it to add annotations to each sentence based on properties of the subgraph (see the English example of tagging rough sentence type in examples/)

To use the script, either copy the file `depedit/depedit.py` into your project, or install it from PyPI:

```
pip install depedit
```

You can then run it directly or as a module:

```
If depedit is in the current directory:
> python depedit.py -c CONFIG.ini INFILE.conllu
Or if installed via pip or setup.py, then in any directory:
> python -m depedit -c CONFIG.ini INFILE.conllu
```

## Basic usage

```
Expand All @@ -20,14 +32,15 @@ usage: depedit.py [-h] [-c CONFIG] [-d] [-s] [-k {supertoks,comments,both}]
positional arguments:
file Input single file name or glob pattern to process a
batch (e.g. *.conll10)
batch (e.g. *.conllu)
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Configuration file defining transformation
-d, --docname Begin output with # newdoc id =...
-s, --sent_id Add running sentence ID comments
-t, --text Add # text =...
-k {supertoks,comments,both}, --kill {supertoks,comments,both}
Remove supertokens or commments from output
-q, --quiet Do not output warnings and messages
Expand Down

0 comments on commit ef3528a

Please sign in to comment.