Skip to content

Commit

Permalink
Updated demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ciioprof0 committed Aug 18, 2024
1 parent 801c178 commit 9b8d573
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 77 deletions.
72 changes: 71 additions & 1 deletion ling508/demos/demo_clex_importer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9042,6 +9042,48 @@ <h3 id="Show-Database-State-After-Code-Execution">Show Database State After Code
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<h4 id="Reset-Database-for-Web-Form-Demo">Reset Database for Web Form Demo<a class="anchor-link" href="#Reset-Database-for-Web-Form-Demo"></a></h4>
</div>
</div>
</div>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell">
<div class="jp-Cell-inputWrapper" tabindex="0">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea">
<div class="jp-InputPrompt jp-InputArea-prompt">In [ ]:</div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="cm-editor cm-s-jupyter">
<div class="highlight hl-ipython3"><pre><span></span><span class="c1"># Reset the database to start with an empty database</span>
<span class="o">%</span><span class="k">run</span> ../app/reset_database.py
</pre></div>
</div>
</div>
</div>
</div>
<div class="jp-Cell-outputWrapper">
<div class="jp-Collapser jp-OutputCollapser jp-Cell-outputCollapser">
</div>
<div class="jp-OutputArea jp-Cell-outputArea">
<div class="jp-OutputArea-child">
<div class="jp-OutputPrompt jp-OutputArea-prompt"></div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>Error: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER ;


-- Create procedure to check for prolog constraints (sp_check_prol' at line 1
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="jp-Cell jp-MarkdownCell jp-Notebook-cell">
<div class="jp-Cell-inputWrapper" tabindex="0">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<h3 id="Executing-the-Clex-Importer-via-Web-Form">Executing the Clex Importer via Web Form<a class="anchor-link" href="#Executing-the-Clex-Importer-via-Web-Form"></a></h3><p>While the Flask API cannot be run directly within this notebook, you can run it locally by following these steps:</p>
<ol>
<li>Navigate to the project root directory.</li>
Expand Down Expand Up @@ -9071,7 +9113,35 @@ <h3 id="Executing-the-Clex-Importer-via-Web-Form">Executing the Clex Importer vi
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<h2 id="Conclusion">Conclusion<a class="anchor-link" href="#Conclusion"></a></h2><p>In this demonstration, we explored the Clex Importer tool, which populates the <code>lexicon</code> table in the STIX-D Corpus Database with entries from the ACE Common Lexicon (Clex). By importing lexical entries from the Clex file, the tool enables precise language processing for applications requiring unambiguous interpretation by both humans and machines. The project design leverages object-oriented programming principles to create a modular, extensible, and maintainable system, with key modules like <code>ClexImporter</code> and <code>MySQLRepository</code> facilitating database interactions and lexicon importation. The testing strategy includes unit, integration, and end-to-end tests to ensure the reliability and correctness of the codebase. By executing the Clex Importer tool via the command line interface and web interface, users can seamlessly import Clex entries into the database, supporting ACE-based natural language processing tasks.</p>
<h2 id="Conclusion">Conclusion<a class="anchor-link" href="#Conclusion"></a></h2><ol>
<li>Use Case</li>
<li>Project Design</li>
<li>Code Interaction with Database</li>
<li>Test Cases<ul>
<li>All Tests</li>
<li>Unit Tests</li>
<li>Integration Tests</li>
<li>End-to-End Tests</li>
</ul>
</li>
<li>Code Execution<ul>
<li>Command Line Interface (in notebook)</li>
<li>Web Interface (not in notebook)</li>
</ul>
</li>
</ol>
</div>
</div>
</div>
</div>
<div class="jp-Cell jp-MarkdownCell jp-Notebook-cell">
<div class="jp-Cell-inputWrapper" tabindex="0">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<p>*** Speaker Notes for the Conclusion Slide:***</p>
<p>In this demonstration, we explored a use case for the Clex Importer tool, which populates the <code>lexicon</code> table in the STIX-D Corpus Database with entries from the ACE Common Lexicon (Clex). The project design leverages object-oriented programming principles to create a modular, extensible, and maintainable system, with key modules like <code>ClexImporter</code> and <code>MySQLRepository</code> facilitating database interactions and lexicon importation. The testing strategy includes unit, integration, and end-to-end tests to ensure the reliability and correctness of the codebase. By executing the Clex Importer tool via the command line interface and web interface, users can seamlessly import Clex entries into the database, supporting ACE-based natural language processing tasks.</p>
</div>
</div>
</div>
Expand Down
57 changes: 56 additions & 1 deletion ling508/demos/demo_clex_importer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,38 @@
"%sql SELECT * FROM stixd_corpus.obj_lex_jt LIMIT 5;\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"#### Reset Database for Web Form Demo"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Error: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER ;\n",
"\n",
"\n",
"-- Create procedure to check for prolog constraints (sp_check_prol' at line 1\n"
]
}
],
"source": [
"# Reset the database to start with an empty database\n",
"%run ../app/reset_database.py"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -1453,7 +1485,30 @@
"source": [
"## Conclusion\n",
"\n",
"In this demonstration, we explored the Clex Importer tool, which populates the `lexicon` table in the STIX-D Corpus Database with entries from the ACE Common Lexicon (Clex). By importing lexical entries from the Clex file, the tool enables precise language processing for applications requiring unambiguous interpretation by both humans and machines. The project design leverages object-oriented programming principles to create a modular, extensible, and maintainable system, with key modules like `ClexImporter` and `MySQLRepository` facilitating database interactions and lexicon importation. The testing strategy includes unit, integration, and end-to-end tests to ensure the reliability and correctness of the codebase. By executing the Clex Importer tool via the command line interface and web interface, users can seamlessly import Clex entries into the database, supporting ACE-based natural language processing tasks."
"1. Use Case\n",
"1. Project Design\n",
"1. Code Interaction with Database\n",
"1. Test Cases\n",
" - All Tests\n",
" - Unit Tests\n",
" - Integration Tests\n",
" - End-to-End Tests\n",
"1. Code Execution\n",
" - Command Line Interface (in notebook)\n",
" - Web Interface (not in notebook)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"*** Speaker Notes for the Conclusion Slide:***\n",
"\n",
"In this demonstration, we explored a use case for the Clex Importer tool, which populates the `lexicon` table in the STIX-D Corpus Database with entries from the ACE Common Lexicon (Clex). The project design leverages object-oriented programming principles to create a modular, extensible, and maintainable system, with key modules like `ClexImporter` and `MySQLRepository` facilitating database interactions and lexicon importation. The testing strategy includes unit, integration, and end-to-end tests to ensure the reliability and correctness of the codebase. By executing the Clex Importer tool via the command line interface and web interface, users can seamlessly import Clex entries into the database, supporting ACE-based natural language processing tasks."
]
}
],
Expand Down
Binary file modified ling508/demos/demo_clex_importer.pdf
Binary file not shown.
Loading

0 comments on commit 9b8d573

Please sign in to comment.