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 d1257dc commit a5e0f99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,9 @@ 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 @@ -258,11 +255,14 @@ vectorizer = KeyphraseTfidfVectorizer()

# Print parameters
print(vectorizer.get_params())
```
```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}
```
>>> {'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
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# ones.
extensions = [
'sphinx_rtd_theme',
'myst_parser',
'recommonmark',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx_markdown_tables',
Expand Down Expand Up @@ -64,7 +64,7 @@
master_doc = 'index'

source_parsers = {
'.md': 'myst_parser.parser.MystParser',
'.md': 'recommonmark.parser.CommonMarkParser',
}

source_suffix = ['.rst', '.md']

0 comments on commit a5e0f99

Please sign in to comment.