Skip to content

Commit

Permalink
Merge pull request #35 from amir-zeldes/develop
Browse files Browse the repository at this point in the history
bugfix for edeps
  • Loading branch information
amir-zeldes committed Mar 22, 2022
2 parents 9869701 + d863071 commit a8d49a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion depedit/depedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io
from six import iteritems, iterkeys

__version__ = "3.2.0.0"
__version__ = "3.2.1.0"

ALIASES = {"form":"text","upostag":"pos","xpostag":"cpos","feats":"morph","deprel":"func","deps":"head2","misc":"func2",
"xpos": "cpos","upos":"pos"}
Expand Down Expand Up @@ -875,6 +875,10 @@ def execute_action(self, result_sets, action_list, transformation):
except IndexError: # All are filled, overwrite top of stack
index = -1
result[node_position].edep[index][1] = value
# Remove all other edeps connecting the same two tokens
this_edep_parent = result[node_position].edep[index][0]
result[node_position].edep = [x for x in result[node_position].edep if x[0] != this_edep_parent or x[1] == value]
result[node_position].head2 = "_" # Remove any explicit head2 info to accommodate new edeps; it will be generated from edom
elif prop == "edom":
if "||" in value:
h, rel = value.split("||", maxsplit=1)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
setup(
name = 'depedit',
packages = ['depedit'],
version = '3.2.0.0',
version = '3.2.1.0',
description = 'A simple configurable tool for manipulating dependency trees',
author = 'Amir Zeldes',
author_email = 'amir.zeldes@georgetown.edu',
url = 'https://github.com/amir-zeldes/depedit',
install_requires=["six"],
license='Apache License, Version 2.0',
download_url = 'https://github.com/amir-zeldes/depedit/releases/tag/3.2.0.0',
download_url = 'https://github.com/amir-zeldes/depedit/releases/tag/3.2.1.0',
keywords = ['NLP', 'parsing', 'syntax', 'dependencies', 'dependency', 'tree', 'treebank', 'conll', 'conllu', 'ud', 'enhanced'],
classifiers = ['Programming Language :: Python',
'Programming Language :: Python :: 2',
Expand Down

0 comments on commit a8d49a3

Please sign in to comment.