Skip to content

Commit

Permalink
docs: build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HLasse committed Sep 26, 2022
1 parent 88cbc40 commit 0d5e960
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/posstats.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Part-of-Speech Statistics
----------------------
-------------------------

The *pos_stats* component adds one attribute to a Doc or Span:

Expand Down
8 changes: 2 additions & 6 deletions textdescriptives/components/descriptive_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,8 @@ def syllables(self, doc: Doc):
}

def counts(self, doc: Union[Doc, Span], ignore_whitespace: bool = True):
"""Returns:
Dict with keys:
n_tokens,
n_unique_tokens,
proportion_unique_tokens,
n_characters
"""Returns dict with keys: n_tokens, n_unique_tokens, proportion_unique_tokens,
n_characters
"""
n_tokens = doc._._n_tokens
n_types = len(set([tok.lower_ for tok in doc._._filtered_tokens]))
Expand Down
8 changes: 4 additions & 4 deletions textdescriptives/components/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,12 @@ def create_quality_component( # pylint: disable=dangerous-default-value
"""Allows Quality to be added to a spaCy pipe using nlp.add_pipe("quality").
Set the following extensions:
- {Span/Doc}._.quality
- {Span/Doc}._.passed_quality_check
- {Span/Doc}._.quality
- {Span/Doc}._.passed_quality_check
It is also possible to optionally set the following extensions:
- {Span/Doc}._.lines
- {Span/Doc}._.paragraphs
- {Span/Doc}._.lines
- {Span/Doc}._.paragraphs
These are used to calculate some of the quality metrics. They can be overwritten if
you e.g. wish lines to be split on "\\r\\n" instead of "\\n".
Expand Down

0 comments on commit 0d5e960

Please sign in to comment.