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 be1e841 commit 5fc495b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ formats: all
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- method: pip
path: .
extra_requirements:
Expand All @@ -27,7 +26,7 @@ python:
build:
os: ubuntu-22.04
tools:
python: "3.7"
python: "3.8"

submodules:
include: all
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ vectorizer = KeyphraseCountVectorizer()

# Print parameters
print(vectorizer.get_params())
```
```plaintext
>>> {'binary': False, 'dtype': <class 'numpy.int64'>, 'lowercase': True, 'max_df': None, 'min_df': None, 'pos_pattern': '<J.*>*<N.*>+', 'spacy_exclude': ['parser', 'attribute_ruler', 'lemmatizer', 'ner'], 'spacy_pipeline': 'en_core_web_sm', 'stop_words': 'english', 'workers': 1}
```


By default, the vectorizer is initialized for the English language. That means, an English `spacy_pipeline` is
specified, English `stop_words` are removed, and the `pos_pattern` extracts keywords that have 0 or more adjectives,
followed by 1 or more nouns using the English spaCy part-of-speech tags. In addition, the spaCy pipeline
Expand Down Expand Up @@ -255,14 +258,11 @@ vectorizer = KeyphraseTfidfVectorizer()

# Print parameters
print(vectorizer.get_params())
>>> {'binary': False, 'custom_pos_tagger': None, 'decay': None, 'delete_min_df': None, 'dtype': <


class 'numpy.int64'>, 'lowercase': True, 'max_df': None

, 'min_df': None, 'pos_pattern': '<J.*>*<N.*>+', 'spacy_exclude': ['parser', 'attribute_ruler', 'lemmatizer', 'ner',
'textcat'], 'spacy_pipeline': 'en_core_web_sm', 'stop_words': 'english', 'workers': 1}
```
```plaintext
>>> {'binary': False, 'custom_pos_tagger': None, 'decay': None, 'delete_min_df': None, 'dtype': <class 'numpy.int64'>, 'lowercase': True, 'max_df': None, 'min_df': None, 'pos_pattern': '<J.*>*<N.*>+', 'spacy_exclude': ['parser', 'attribute_ruler', 'lemmatizer', 'ner','textcat'], 'spacy_pipeline': 'en_core_web_sm', 'stop_words': 'english', 'workers': 1}
```


To calculate tf values instead, set `use_idf=False`.

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ docutils>=0.16
numpy>=1.18.5
spacy>=3.0.1
spacy-transformers>=1.1.6
spacy-curated-transformers>=0.2.2
nltk>=3.6.1
scikit-learn>=1.0
scipy>=1.7.3
Expand Down

0 comments on commit 5fc495b

Please sign in to comment.