----------------------
The
SimpleKeywordTableIndex
in LlamaIndex uses a simple regex extractor to extract keywords from the text. However, there isn't a direct method provided to see the list of keywords extracted. The extraction process is part of the internal workings of the
SimpleKeywordTableIndex
.
Here is a basic example of how you might use the
SimpleKeywordTableIndex
:
from llama_index.core import SimpleKeywordTableIndex
# Assuming 'nodes' is your list of documents and 'storage_context' is your storage context
keyword_index = SimpleKeywordTableIndex(
nodes,
storage_context=storage_context,
show_progress=True,
)
In this example, the
SimpleKeywordTableIndex
is initialized with a list of documents (
nodes
) and a
storage_context
. The
show_progress=True
argument means that the progress of the keyword extraction will be shown.
However, to see the actual keywords extracted, you would need to look into the source code or modify it to expose the keywords. Please refer to the
LlamaIndex documentation () for more details.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------