Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Schopf <tim.schopf@t-online.de>
  • Loading branch information
TimSchopf committed Apr 29, 2024
1 parent 3b1316c commit 8ec413a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions keyphrase_vectorizers/keyphrase_count_vectorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def __init__(self, spacy_pipeline: Union[str, spacy.Language] = 'en_core_web_sm'
self.decay = decay
self.delete_min_df = delete_min_df
self.running_fit_transform = False
self.X_ = None

def fit(self, raw_documents: List[str]) -> object:
"""
Expand Down Expand Up @@ -458,11 +459,15 @@ def update_bow(self, raw_documents: List[str]) -> csr_matrix:
that do not exceed `self.delete_min_df` are removed from its
vocabulary and bag-of-keywords matrix.
Arguments:
raw_documents: A list of documents
Parameters
----------
raw_documents : iterable
An iterable of strings.
Returns:
X_: Bag-of-keywords matrix
Returns
-------
X_ : scipy.sparse.csr_matrix
Bag-of-keywords matrix
"""

if hasattr(self, "X_"):
Expand Down
1 change: 1 addition & 0 deletions keyphrase_vectorizers/keyphrase_tfidf_vectorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def __init__(self, spacy_pipeline: Union[str, spacy.Language] = 'en_core_web_sm'
self.use_idf = use_idf
self.smooth_idf = smooth_idf
self.sublinear_tf = sublinear_tf
self.X_ = None

self._tfidf = TfidfTransformer(norm=self.norm, use_idf=self.use_idf, smooth_idf=self.smooth_idf,
sublinear_tf=self.sublinear_tf)
Expand Down

0 comments on commit 8ec413a

Please sign in to comment.