chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.22k stars 250 forks source link

preprocess_text() got an unexpected keyword argument 'normalized_unicode' #255

Closed gryBox closed 5 years ago

gryBox commented 5 years ago

steps to reproduce

text = """A chemical combination brought about by the action of light, 
            as in the formation of carbohydrates in living plants from the carbon di-oxid ."""
textacy.preprocess.preprocess_text(
    text,
    normalized_unicode=False,
    lowercase=False, 
    no_urls=False, 
    no_emails=False, 
    no_phone_numbers=False, 
    no_numbers=False, 
    no_currency_symbols=False, 
    no_punct=False, 
    no_contractions=False, 
    no_accents=False
)

Returns: TypeError: preprocess_text() got an unexpected keyword argument 'normalized_unicode'. Although it does exist in the documentation and source code.

Removing this argument does allow the function to run without errors.

environment

Thanks again for all your hard work on textacy

bdewilde commented 5 years ago

Hey @gryBox , I changed the name of that kwarg from normalize_unicode to normalized_unicode because of a name collision that I'd accidentally created in the 0.7.1 release, as pointed out in Issue #250 . The change has been merged into master so people can use the function correctly, but it's not yet been included in a release.

This prompted me to revamp textacy's preprocessing functionality in the next release (see PR #253), so things will be a bit different in 0.7.2 (or 0.8.0, depending on how I decide to increment). Sorry about the confusion.