Update app.py
Browse files
app.py
CHANGED
|
@@ -237,10 +237,10 @@ def process_text(input_text, primary1, synonyms1, primary2, synonyms2, primary3,
|
|
| 237 |
def create_interface():
|
| 238 |
with gr.Blocks(title="Keyword Tagging Tool", theme=gr.themes.Soft()) as demo:
|
| 239 |
gr.HTML("""
|
| 240 |
-
<h1>Keyword Tagging Tool</h1>
|
| 241 |
|
| 242 |
-
<p>This tool
|
| 243 |
-
|
| 244 |
|
| 245 |
<h2>How to use this tool:</h2>
|
| 246 |
<ol>
|
|
@@ -385,7 +385,7 @@ def create_interface():
|
|
| 385 |
**Special Handling:**
|
| 386 |
- "US" is matched exactly to avoid confusion with the word "us"
|
| 387 |
- Word boundaries are respected (prevents partial matches)
|
| 388 |
-
- Results are
|
| 389 |
|
| 390 |
**How it works:**
|
| 391 |
When ANY variant is found in your text (primary OR synonym), the tool returns the complete standardized set of terms for that concept.
|
|
@@ -395,16 +395,8 @@ def create_interface():
|
|
| 395 |
gr.HTML("<hr style='margin-top: 40px; margin-bottom: 20px;'>")
|
| 396 |
gr.HTML("""
|
| 397 |
<div style="background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin-top: 20px; text-align: center;">
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
<a href="https://digitalscholarship.web.ox.ac.uk/" target="_blank" style="color: #1976d2;">
|
| 401 |
-
Digital Scholarship at Oxford (DiSc)
|
| 402 |
-
</a>
|
| 403 |
-
funded research project:<br>
|
| 404 |
-
<em>Extracting Keywords from Crowdsourced Collections</em>.
|
| 405 |
-
</p><br><br>
|
| 406 |
-
<p style="font-size: 14px; line-height: 1.8; margin: 0;">
|
| 407 |
-
The code for this tool was built with the aid of Claude Opus 4.
|
| 408 |
</p>
|
| 409 |
</div>
|
| 410 |
""")
|
|
|
|
| 237 |
def create_interface():
|
| 238 |
with gr.Blocks(title="Keyword Tagging Tool", theme=gr.themes.Soft()) as demo:
|
| 239 |
gr.HTML("""
|
| 240 |
+
<h1>Controlled Vocabluary Keyword Tagging Tool</h1>
|
| 241 |
|
| 242 |
+
<p>This tool demonstrates how a simple python script can be used to extract keywords from text using a controlled vocabulary of primary keywords and associated keywords/synonyms.
|
| 243 |
+
</p>
|
| 244 |
|
| 245 |
<h2>How to use this tool:</h2>
|
| 246 |
<ol>
|
|
|
|
| 385 |
**Special Handling:**
|
| 386 |
- "US" is matched exactly to avoid confusion with the word "us"
|
| 387 |
- Word boundaries are respected (prevents partial matches)
|
| 388 |
+
- Results are alphabetised and deduplicated
|
| 389 |
|
| 390 |
**How it works:**
|
| 391 |
When ANY variant is found in your text (primary OR synonym), the tool returns the complete standardized set of terms for that concept.
|
|
|
|
| 395 |
gr.HTML("<hr style='margin-top: 40px; margin-bottom: 20px;'>")
|
| 396 |
gr.HTML("""
|
| 397 |
<div style="background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin-top: 20px; text-align: center;">
|
| 398 |
+
<p style="font-size: 14px; line-height: 1.8; margin: 0;">
|
| 399 |
+
The code for this tool was built with the aid of Claude Sonnet 4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
</p>
|
| 401 |
</div>
|
| 402 |
""")
|