KeybertLinkExtractor#
- class langchain_community.graph_vectorstores.extractors.keybert_link_extractor.KeybertLinkExtractor(*, kind: str = 'kw', embedding_model: str = 'all-MiniLM-L6-v2', extract_keywords_kwargs: Dict[str, Any] | None = None)[source]#
Beta
This feature is in beta. It is actively being worked on, so the API may change.
Extract keywords using KeyBERT <https://maartengr.github.io/KeyBERT/>.
Example
extractor = KeybertLinkExtractor() results = extractor.extract_one(PAGE_1)
- Parameters:
kind (str) – Kind of links to produce with this extractor.
embedding_model (str) – Name of the embedding model to use with KeyBERT.
extract_keywords_kwargs (Dict[str, Any] | None) – Keyword arguments to pass to KeyBERT’s extract_keywords method.
Methods
__init__
(*[, kind, embedding_model, ...])Extract keywords using KeyBERT <https://maartengr.github.io/KeyBERT/>.
extract_many
(inputs)Add edges from each input to the corresponding documents.
extract_one
(input)Add edges from each input to the corresponding documents.
- __init__(*, kind: str = 'kw', embedding_model: str = 'all-MiniLM-L6-v2', extract_keywords_kwargs: Dict[str, Any] | None = None)[source]#
Extract keywords using KeyBERT <https://maartengr.github.io/KeyBERT/>.
Example
extractor = KeybertLinkExtractor() results = extractor.extract_one(PAGE_1)
- Parameters:
kind (str) – Kind of links to produce with this extractor.
embedding_model (str) – Name of the embedding model to use with KeyBERT.
extract_keywords_kwargs (Dict[str, Any] | None) – Keyword arguments to pass to KeyBERT’s extract_keywords method.