Fix incorrect attribute access
This commit is contained in:
@@ -668,8 +668,8 @@ def merge_punctuations(alignment: List[dict], prepended: str, appended: str):
|
|||||||
following = alignment[j]
|
following = alignment[j]
|
||||||
if previous["word"].startswith(" ") and previous["word"].strip() in prepended:
|
if previous["word"].startswith(" ") and previous["word"].strip() in prepended:
|
||||||
# prepend it to the following word
|
# prepend it to the following word
|
||||||
following["word"] = previous.word + following.word
|
following["word"] = previous["word"] + following["word"]
|
||||||
following["tokens"] = previous.tokens + following.tokens
|
following["tokens"] = previous["tokens"] + following["tokens"]
|
||||||
previous["word"] = ""
|
previous["word"] = ""
|
||||||
previous["tokens"] = []
|
previous["tokens"] = []
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user