Back to directory

KeyAtten

A zero-shot keyword and keyphrase extraction library that reads keywords directly out of a pretrained language model's attention weights, no fine-tuning or labeling required.

KeyAtten

KeyAtten extracts keywords and keyphrases from text using a pretrained model's own attention weights in a single forward pass, with no training or labeling step, and supports both Chinese and English. It is evaluated on seven public datasets against 14 other methods, reporting a 67% F1@10 improvement over traditional baselines on Chinese news and a 78% improvement over the strongest external method on English long documents.

Its main route replaces the default candidate set with BIO-tagged candidates and reranks them with fine-tuned attention; standalone attention-series methods (received attention, SAMRank, fusion attention and their inverse-document-frequency variants) are also available, alongside legacy baselines for comparison. Word-level output includes the weight value, position index and part-of-speech tag, and attention can be fused across a single layer or multiple layers.

It installs with pip; a minimal install pulls in only numpy, so the full machine-learning stack is opt-in.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.