Feature: keyword extraction with keybert and frequency ranking #751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this changes
Implement keyword extraction feature and unit test. (#145 )
The engine has two options, namely 'keybert' and 'frequency' for KeyBERT and naive frequency ranking respectively.
KeyBERT is an algorithm to rank keywords by cosine similarity between embedding of each ngram in a document to embedding of the whole document. Embeddings are produced by a large language model. I use
airesearch/wangchanberta-base-att-spm-uncased
in this work.The original implementation has more variety to rank keywords. Please check https://github.com/MaartenGr/KeyBERT for more details and better explanations 🙂 . I'm re-implementing core features and making it support Thai.
What was wrong
Just a brand new feature.
How this fixes it
Fixes #145
Some issues related to
airesearch/wangchanberta-base-att-spm-uncased
. It's spamming warning messages upon init.Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.