Replace acronym fails with parenthesis
thoppe opened this issue · comments
Travis Hoppe commented
from nlpre import replace_acronyms
text = '''
BEACH (beige and Chediak Higashi) domain containing proteins (BDCPs) are a highly conserved protein family in eukaryotes.
'''
ABBR = { (('BEACH', 'domain', 'containing', 'proteins'), 'BDCPs'): 1}
P1 = replace_acronyms(ABBR)
print P1(text)
Traceback (most recent call last):
File "tx.py", line 31, in <module>
print P1(text)
File "/home/hoppeta/git-repo/NLPre/nlpre/replace_acronyms.py", line 229, in __call__
highest_phrase = '_'.join(highest_phrase)
TypeError: sequence item 1: expected string, ParseResults found