Skip to content

Conversation

austinjp
Copy link
Contributor

Description

TextStats is documented as being directly with the root package textacy, but in my installation (version 0.11.0 installed via pip and Python 3.8) it's actually within textacy.text_stats.

Motivation and Context

Accurate quickstart documentation.

How Has This Been Tested?

Tested only in a REPL (ptpython):

>>> import textacy

>>> doc = textacy.make_spacy_doc("Hello, world!", lang="en_core_sci_md")

>>> ts = textacy.TextStats(doc)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'textacy' has no attribute 'TextStats'

module 'textacy' has no attribute 'TextStats'

>>> ts = textacy.text_stats.TextStats(doc)

>>> ts.n_words
2


>>>

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation, and I have updated it accordingly.

@bdewilde
Copy link
Collaborator

Hi @austinjp , thanks for the report! The current behavior (requiring from textacy import text_stats) is an intentional change in v0.11, but it looks like I forgot to update corresponding quickstart documentation. (I punted on changing it for this release, and instead just added two new tutorials — this was my bad 🙂).

Your change looks good to me. Thanks again!

@bdewilde bdewilde merged commit ae0741c into chartbeat-labs:master Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants