diff --git a/docs/guides/keyllm.md b/docs/guides/keyllm.md index 94f36526..1f7496f7 100644 --- a/docs/guides/keyllm.md +++ b/docs/guides/keyllm.md @@ -18,6 +18,7 @@ This data was chosen to show the different use cases and techniques. As you migh Let's start with `KeyLLM` only. + # Use Cases If you want the full performance and easiest method, you can skip the use cases below and go straight to number 5 where you will combine `KeyBERT` with `KeyLLM`. @@ -180,6 +181,13 @@ If you have embeddings of your documents, you could use those to find documents --8<-- "docs/images/efficient.svg" +!!! Tip + Before you get started, it might be worthwhile to uninstall sentence-transformers and re-install it from the main branch. + There is an issue with community detection (cluster) that might make the model run without finishing. It is as straightforward as: + `pip uninstall sentence-transformers` + `pip install --upgrade git+https://github.com/UKPLab/sentence-transformers` + + ```python import openai from keybert.llm import OpenAI @@ -224,6 +232,13 @@ This is the best of both worlds. We use `KeyBERT` to generate a first pass of ke --8<-- "docs/images/keybert_keyllm.svg" +!!! Tip + Before you get started, it might be worthwhile to uninstall sentence-transformers and re-install it from the main branch. + There is an issue with community detection (cluster) that might make the model run without finishing. It is as straightforward as: + `pip uninstall sentence-transformers` + `pip install --upgrade git+https://github.com/UKPLab/sentence-transformers` + + ```python import openai from keybert.llm import OpenAI diff --git a/keybert/__init__.py b/keybert/__init__.py index bbfadc3b..f16b45e2 100644 --- a/keybert/__init__.py +++ b/keybert/__init__.py @@ -1,4 +1,4 @@ from keybert._llm import KeyLLM from keybert._model import KeyBERT -__version__ = "0.8.2" +__version__ = "0.8.3" diff --git a/keybert/_llm.py b/keybert/_llm.py index bc2b4d52..db04c609 100644 --- a/keybert/_llm.py +++ b/keybert/_llm.py @@ -101,7 +101,7 @@ def extract_keywords( if in_cluster: selected_docs = [docs[cluster[0]] for cluster in clusters] if candidate_keywords is not None: - selected_keywords = [candidate_keywords[cluster[0]] for cluster in in_cluster] + selected_keywords = [candidate_keywords[cluster[0]] for cluster in clusters] else: selected_keywords = None in_cluster_keywords = self.llm.extract_keywords( diff --git a/setup.py b/setup.py index fcaa9519..fde8f844 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ setup( name="keybert", packages=find_packages(exclude=["notebooks", "docs"]), - version="0.8.2", + version="0.8.3", author="Maarten Grootendorst", author_email="maartengrootendorst@gmail.com", description="KeyBERT performs keyword extraction with state-of-the-art transformer models.",