SorrelC commited on
Commit
2a67349
Β·
verified Β·
1 Parent(s): cf347e9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -4
README.md CHANGED
@@ -11,14 +11,151 @@ license: gpl-3.0
11
  short_description: Try some Keyword Extraction (KE) models to see what they do.
12
  ---
13
 
 
 
14
  **About**
15
 
16
- This interactive Keyword Extraction explorer tool has been created to offer the opportunity to test different Keyword Extraction models, to help develop a better understanding
17
- of how they work, and what can be done with them. It is not intended for use with very large chunks of text.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- This tool is aimed at those with no-coding experience, who may otherwise struggle to test these models/this data extraction approach.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- It is intended as an educational resource only.
 
 
22
 
 
23
 
24
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
11
  short_description: Try some Keyword Extraction (KE) models to see what they do.
12
  ---
13
 
14
+ # πŸ” Keyword Extraction Explorer Tool
15
+
16
  **About**
17
 
18
+ This interactive web application has been designed to help you explore and compare different keyword extraction models, with no-coding required!
19
+ It is primarily intended as an educational resource, and is not intended for use with very large chunks of text or use in a research project context.
20
+ The idea is you get to see what might work for you and go from there.
21
+
22
+ [![Made with Gradio](https://img.shields.io/badge/Made%20with-Gradio-ff7c00?style=flat-square)](https://gradio.app/)
23
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg?style=flat-square)](https://www.python.org/downloads/)
24
+
25
+ ## πŸ“– What is Keyword Extraction?
26
+
27
+ Keyword extraction is the automated process of identifying the most important and relevant words or phrases from a text. It helps you quickly understand what a document is about without reading the entire content.
28
+
29
+ **Use cases include:**
30
+ - 🏷️ Automatically tagging collections records, blog posts or documents
31
+ - πŸ”Ž Improving search and discovery in digital collections
32
+ - πŸ“Š Analysing survey responses
33
+ - πŸ“š Organising and categorising large text datasets
34
+
35
+ ## ✨ Features
36
+
37
+ This tool allows you to:
38
+
39
+ - **Compare 4 different keyword extraction algorithms** side-by-side
40
+ - **Visualise results** with colour-coded relevance scores
41
+ - **See keywords highlighted** directly in your source text
42
+ - **Adjust parameters** like the number of keywords and phrase length (n-grams)
43
+ - **Test with example texts** to learn how each model works
44
+ - **No installation required** β€” runs entirely in your browser
45
+
46
+ ### Available Models
47
+
48
+ | Model | Best For | How It Works |
49
+ |-------|----------|--------------|
50
+ | **YAKE** | Short texts, multilingual content | Statistical approach requiring no training data |
51
+ | **TF-IDF with Cosine Similarity** | Finding document-specific keywords | Identifies words most representative of the document |
52
+ | **RAKE-NLTK** | Quick phrase extraction | Classic algorithm optimised for multi-word phrases |
53
+ | **TextRank** | Extracting key concepts | Graph-based ranking inspired by Google's PageRank |
54
+
55
+ ## πŸš€ How to Use
56
+
57
+ ### Online Version (Easiest)
58
+ 1. Visit the [Hugging Face Space](https://huggingface.co/spaces/SorrelC/KeywordExtraction-Explorer-Tool)
59
+ 2. Paste or type your text into the text box
60
+ 3. Select a keyword extraction model
61
+ 4. Adjust the number of keywords and n-gram range
62
+ 5. Click "πŸ” Extract Keywords"
63
+ 6. Explore the results!
64
+
65
+ ### Running Locally
66
+
67
+ If you prefer to run the tool on your own computer:
68
+
69
+ ```bash
70
+ # Clone the repository
71
+ git clone https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
72
+ cd YOUR_SPACE_NAME
73
+
74
+ # Install dependencies
75
+ pip install -r requirements.txt
76
+
77
+ # Run the app
78
+ python app.py
79
+ ```
80
+
81
+ Then open your browser to `http://localhost:7860`
82
+
83
+ ## πŸ“Š Understanding the Results
84
+
85
+ The tool provides three types of output:
86
 
87
+ 1. **Summary** β€” Overview of how many keywords were found and the average relevance score
88
+ 2. **Highlighted Text** β€” Your original text with keywords colour-coded by relevance:
89
+ - 🟒 **Green** = High relevance (70%+)
90
+ - 🟑 **Yellow** = Medium relevance (40-70%)
91
+ - πŸ”΄ **Red** = Low relevance (<40%)
92
+ 3. **Keyword Table** β€” Ranked list of all extracted keywords with scores and visual relevance bars
93
+
94
+ ## πŸ’‘ Tips for Best Results
95
+
96
+ - **Short texts (1-3 paragraphs)** work best for this educational tool
97
+ - **Try different models** β€” each excels with different text types
98
+ - **Adjust n-gram range**:
99
+ - Min=1, Max=1 β†’ Single words only
100
+ - Min=1, Max=3 β†’ Singles words + 2-word phrases + 3-word phrases
101
+ - Higher max values capture longer phrases but may be less precise
102
+ - **More keywords** gives broader coverage but may include less relevant terms
103
+
104
+ ## 🎯 Target Audience
105
+
106
+ This tool is designed for:
107
+
108
+ - βœ… Researchers exploring text analysis methods
109
+ - βœ… Students learning about Natural Language Processing (NLP)
110
+ - βœ… Digital humanists working with text collections
111
+ - βœ… Colleagues working with collections in the Galleries, Libraries, Archives and Museums Secotor
112
+ - βœ… Anyone curious about how computers understand text
113
+ - βœ… **No coding experience required!**
114
+
115
+ ## ⚠️ Limitations
116
+
117
+ - **Not intended for very large texts** β€” works best with 50-1000 words
118
+ - **Educational purpose only** β€” not optimised for production use
119
+ - **English text** works best (though YAKE supports multiple languages)
120
+ - **Results vary** depending on text type and quality
121
+
122
+ ## πŸ› οΏ½οΏ½ Technical Details
123
+
124
+ Built with:
125
+ - [Gradio](https://gradio.app/) for the web interface
126
+ - [YAKE](https://github.com/LIAAD/yake) for statistical keyword extraction
127
+ - [scikit-learn](https://scikit-learn.org/) for TF-IDF implementation
128
+ - [RAKE-NLTK](https://github.com/csurfer/rake-nltk) for rapid keyword extraction
129
+ - [NetworkX](https://networkx.org/) for TextRank graph analysis
130
+ - [NLTK](https://www.nltk.org/) for text processing utilities
131
+
132
+ ## πŸ“š Learn More
133
+
134
+ - **YAKE**: [Yet Another Keyword Extractor](https://github.com/LIAAD/yake)
135
+ - **TF-IDF**: [Term Frequency-Inverse Document Frequency](https://scikit-learn.org/stable/modules/feature_extraction.html#tfidf-term-weighting)
136
+ - **RAKE**: [Rapid Automatic Keyword Extraction](https://github.com/csurfer/rake-nltk)
137
+ - **TextRank**: [Original Paper (PDF)](https://web.eecs.umich.edu/~mihalcea/papers/mihalcea.emnlp04.pdf)
138
+
139
+ ## πŸ™ Acknowledgements
140
+
141
+ This **Keyword Extraction Explorer Tool** was created as part of the [Digital Scholarship at Oxford (DiSc)](https://digitalscholarship.web.ox.ac.uk/) funded research project: *Extracting Keywords from Crowdsourced Collections*.
142
+
143
+ The code for this tool was developed with the assistance of Claude Opus 4.
144
+
145
+ ## πŸ“„ License
146
+
147
+ MIT
148
+
149
+ ## πŸ› Issues & Feedback
150
+
151
+ Found a bug? Please [open an issue](https://huggingface.co/spaces/KeywordExtraction-Explorer-Tool/discussions).
152
+
153
+ ---
154
 
155
+ <div align="center">
156
+
157
+ [Try it now!](https://huggingface.co/spaces/SorrelC/KeywordExtraction-Explorer-Tool) | [Report Bug](https://huggingface.co/spaces/KeywordExtraction-Explorer-Tool/discussions)
158
 
159
+ </div>
160
 
161
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference