Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
wjbmattingly committed Sep 14, 2021
1 parent 793e20a commit 0fc7579
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .ipynb_checkpoints/02_04_custom_component-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
13 changes: 10 additions & 3 deletions .ipynb_checkpoints/_toc-checkpoint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ parts:
title: How to use the spaCy Matcher
- file: 02_03_phrase_matcher
title: How to use the spaCy PhraseMatcher
- file: 02_04_simple_regex
- file: 02_04_custom_component
title: Custom Components in spaCy
- file: 02_05_simple_regex
title: How to use RegEx in spaCy (Basic)
- file: 02_05_complex_regex
title: How to use RegEx in spaCy (Advanced)
- file: 02_06_complex_regex
title: How to use RegEx in spaCy (Advanced)
- caption: Applied spaCy
numbered: true
chapters:
- file: 03_01_stock_analysis
title: Financial Analysis with spaCy 3
32 changes: 20 additions & 12 deletions 02_02_matcher.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"cells": [
{
"cell_type": "markdown",
"id": "persistent-border",
"id": "naughty-relationship",
"metadata": {},
"source": [
"# <center>How to use the spaCy Matcher</center>"
]
},
{
"cell_type": "markdown",
"id": "appreciated-promise",
"id": "advised-belief",
"metadata": {},
"source": [
"<center>Dr. W.J.B. Mattingly</center>\n",
Expand All @@ -23,7 +23,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "grand-ownership",
"id": "psychological-click",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -33,15 +33,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "intended-boundary",
"id": "amino-imagination",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 4,
"id": "through-opportunity",
"id": "everyday-paragraph",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -50,7 +50,7 @@
},
{
"cell_type": "markdown",
"id": "corporate-nation",
"id": "funky-knife",
"metadata": {},
"source": [
"## Basic Example"
Expand All @@ -59,7 +59,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "statutory-psychiatry",
"id": "expired-sweden",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -74,7 +74,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "designed-fisher",
"id": "adopted-pleasure",
"metadata": {},
"outputs": [
{
Expand All @@ -91,7 +91,7 @@
},
{
"cell_type": "markdown",
"id": "sharp-client",
"id": "accredited-crawford",
"metadata": {},
"source": [
"Lexeme, start token, end token"
Expand All @@ -100,7 +100,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "narrative-western",
"id": "positive-criterion",
"metadata": {},
"outputs": [
{
Expand All @@ -117,7 +117,15 @@
},
{
"cell_type": "markdown",
"id": "biological-control",
"id": "russian-coral",
"metadata": {},
"source": [
"## Attributes Taken by Matcher"
]
},
{
"cell_type": "markdown",
"id": "opposed-patrol",
"metadata": {},
"source": [
"* ORTH - The exact verbatim of a token (str)\n",
Expand Down Expand Up @@ -152,7 +160,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "instructional-canyon",
"id": "framed-journalist",
"metadata": {},
"outputs": [],
"source": []
Expand Down
76 changes: 76 additions & 0 deletions 02_04_custom_component.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "dominant-durham",
"metadata": {},
"source": [
"# Custom Components in spaCy"
]
},
{
"cell_type": "markdown",
"id": "referenced-complaint",
"metadata": {},
"source": [
"<center>Dr. W.J.B. Mattingly</center>\n",
"\n",
"<center>Smithsonian Data Science Lab and United States Holocaust Memorial Museum</center>\n",
"\n",
"<center>August 2021</center>"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "listed-russian",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"INFO:tensorflow:Enabling eager execution\n",
"INFO:tensorflow:Enabling v2 tensorshape\n",
"INFO:tensorflow:Enabling resource variables\n",
"INFO:tensorflow:Enabling tensor equality\n",
"INFO:tensorflow:Enabling control flow v2\n"
]
}
],
"source": [
"import spacy\n",
"from spacy.language import Language"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "distant-ghost",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
File renamed without changes.
6 changes: 4 additions & 2 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ parts:
title: How to use the spaCy Matcher
- file: 02_03_phrase_matcher
title: How to use the spaCy PhraseMatcher
- file: 02_04_simple_regex
- file: 02_04_custom_component
title: Custom Components in spaCy
- file: 02_05_simple_regex
title: How to use RegEx in spaCy (Basic)
- file: 02_05_complex_regex
- file: 02_06_complex_regex
title: How to use RegEx in spaCy (Advanced)
- caption: Applied spaCy
numbered: true
Expand Down

0 comments on commit 0fc7579

Please sign in to comment.