rewicks / ersatz

Apache License 2.0
39 stars 5 forks source link

split is no longer callable from python? #8

Open jmconroy opened 2 years ago

jmconroy commented 2 years ago

Hello, I installed ersatz shortly after your talk your ACL 2021 talk. I was calling split() from python. I recently reinstalled it and split is no longer exposed?

I used to be able to import split as from ersatz import split as ersatz_split

Then I could from python split text, which is a very handy alternative to the nltk spliter or using stanza or spacy.

Perhaps it's something I am missing, but it would be great to have it. Our group planned to include it as an option for our text summarizer once it is released.

patrick-wilken commented 2 years ago

That's because from ersatz import split will import the split module (split.py) instead of the split() function inside __init__, which is what should be exposed, right? from ersatz.__init__ import split works for me. (But isn't really nice...)