Skip to content

Commit c6110a9

Browse files
committedMay 25, 2021
Fix augment_sentence (thanks @xiangc2). Closes amazon-science#4.
1 parent 6a2b0bb commit c6110a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def augment_sentence(tokens: List[str], augmentations: List[Tuple[List[tuple], i
100100

101101
# check that the entities have a tree structure (if two entities overlap, then one is contained in
102102
# the other), and build the entity tree
103-
root = (None, 0, len(tokens)) # this node represents the entire sentence
103+
root = (None, -1, len(tokens)) # this node represents the entire sentence
104104
entity_tree = {root[1:]: []} # list of children of each node
105105
current_stack = [root] # where we are in the tree
106106

0 commit comments

Comments
 (0)