Update app.py
Browse files
app.py
CHANGED
|
@@ -1067,12 +1067,12 @@ def pattern_get_all_inflections(word: str) -> Dict[str, Any]:
|
|
| 1067 |
return {"error": f"An unexpected error occurred: {str(e)}"}
|
| 1068 |
|
| 1069 |
# ============================================================================
|
| 1070 |
-
# 7.
|
| 1071 |
# ============================================================================
|
| 1072 |
|
| 1073 |
def comprehensive_german_analysis(text: str) -> Dict[str, Any]:
|
| 1074 |
"""
|
| 1075 |
-
Combines
|
| 1076 |
"""
|
| 1077 |
if not text or not text.strip():
|
| 1078 |
return {"info": "Please enter text to analyze."}
|
|
@@ -1364,7 +1364,7 @@ def create_pattern_tab():
|
|
| 1364 |
def create_combined_tab():
|
| 1365 |
"""Creates the UI for the new Comprehensive Analyzer tab."""
|
| 1366 |
gr.Markdown("# 🇩🇪 Comprehensive German Text Analyzer")
|
| 1367 |
-
gr.Markdown("This tool combines
|
| 1368 |
with gr.Column():
|
| 1369 |
text_input = gr.Textbox(
|
| 1370 |
label="German Text",
|
|
@@ -1392,7 +1392,7 @@ def create_consolidated_interface():
|
|
| 1392 |
"""Builds the final Gradio app with all tabs."""
|
| 1393 |
with gr.Blocks(title="Consolidated Linguistics Hub", theme=gr.themes.Soft()) as demo:
|
| 1394 |
gr.Markdown("# 🏛️ Consolidated Linguistics Hub")
|
| 1395 |
-
gr.Markdown("One interface for
|
| 1396 |
|
| 1397 |
with gr.Tabs():
|
| 1398 |
# New Combined Tab first
|
|
|
|
| 1067 |
return {"error": f"An unexpected error occurred: {str(e)}"}
|
| 1068 |
|
| 1069 |
# ============================================================================
|
| 1070 |
+
# 7. COMBINED ANALYZER LOGIC
|
| 1071 |
# ============================================================================
|
| 1072 |
|
| 1073 |
def comprehensive_german_analysis(text: str) -> Dict[str, Any]:
|
| 1074 |
"""
|
| 1075 |
+
Combines NLP tools for a deep analysis of German text.
|
| 1076 |
"""
|
| 1077 |
if not text or not text.strip():
|
| 1078 |
return {"info": "Please enter text to analyze."}
|
|
|
|
| 1364 |
def create_combined_tab():
|
| 1365 |
"""Creates the UI for the new Comprehensive Analyzer tab."""
|
| 1366 |
gr.Markdown("# 🇩🇪 Comprehensive German Text Analyzer")
|
| 1367 |
+
gr.Markdown("This tool combines NLP libraries (spaCy, LanguageTool, Pattern, OdeNet) to give a deep analysis of a German text. Results are in JSON format.")
|
| 1368 |
with gr.Column():
|
| 1369 |
text_input = gr.Textbox(
|
| 1370 |
label="German Text",
|
|
|
|
| 1392 |
"""Builds the final Gradio app with all tabs."""
|
| 1393 |
with gr.Blocks(title="Consolidated Linguistics Hub", theme=gr.themes.Soft()) as demo:
|
| 1394 |
gr.Markdown("# 🏛️ Consolidated Linguistics Hub")
|
| 1395 |
+
gr.Markdown("One interface for 4 linguistic tools: spaCy, LanguageTool, Pattern.de, and OdeNet.")
|
| 1396 |
|
| 1397 |
with gr.Tabs():
|
| 1398 |
# New Combined Tab first
|