A tree edit-distance tool for Universal Dependencies.
Project description
UD-TED
A tree edit-distance tool for Universal Dependencies developed as part of my Bachelor's thesis.
Input
The ud-ted command takes two positional arguments, both of them paths to CoNLL-U files containing the input sentences.
If no other option is given, the unordered tree edit distance between the first sentences in the files is computed following the implementation by Paaßen (2021).
Options
--timeout
In the worst case, unordered tree edit distance requires exponential time.
With big trees (more than 20 nodes), this may take a long time.
By providing a timeout, the program simply stops computing after the time is over, or skips the pair in the doc option.
--ordered
Computes the ordered tree edit distance following the implementation of the Zhang-Shasha algorithm in the edist package (Paaßen et al., 2015) instead.
--ids
Allows for the user to specify the sentence IDs of the sentence to be processed. The sentence ID of a sentence must appear in a comment above the respective sentence, in the following format:
# sent_id = <id>
--doc
Compute the tree edit distance between every pair of trees in two files.
--deprel
Adds the edit operation to relabel the edge label (dependency relation). Only the basic type of the dependency relation (i.e., the part before the colon) is compared.
--upos
Adds the edit operation to relabel the universal dependency tag (UPOS).
Output
The tree edit distance between the input trees. By default, all labels are ignored and the cost of both delete and insert operations is 1.
References
- Benjamin Paaßen. 2021. An A*-algorithm for the unordered tree edit distance with custom costs. In Nora Reyes, Richard Connor, Nils Kriege, Daniyal Kazempour, Ilaria Bartolini, Erich Schubert, and Jian-Jia Chen, editors, Similarity Search and Applications, pages 364–371. Springer International Publishing.
- Benjamin Paaßen, Bassam Mokbel, and Barbara Hammer. 2015. A toolbox for adaptive sequence dissimilarity measures for intelligent tutoring systems. In Proceedings of the 8th International Conference on Educational Data Mining (EDM 2015), pages 632–632. International Educational Datamining Society.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ud-ted-0.1.0.tar.gz.
File metadata
- Download URL: ud-ted-0.1.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
540bcbf76137a9eaefa52c7a47779925091e8f7dbb69481546f18d0dafb5a3a7
|
|
| MD5 |
62dbb18cdfa499c695f6bb5fc14301d9
|
|
| BLAKE2b-256 |
b0a319905dc9d38126c6915b19524b7f46a25e4e8e638e7571c75e7d9f541a46
|
File details
Details for the file ud_ted-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ud_ted-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f5f9fab20b000f32807c6a320eaa688055f03d8b427b39008df254db984c99
|
|
| MD5 |
0a77cec13172466d079e552c49400feb
|
|
| BLAKE2b-256 |
9211a8cb69197e28e411182a32f7a04eecec9d6a6196ef29f733242a95312a05
|