|
39 | 39 | "cell_type": "markdown",
|
40 | 40 | "metadata": {},
|
41 | 41 | "source": [
|
42 |
| - "# Introduction\n", |
| 42 | + "## Introduction\n", |
43 | 43 | "\n",
|
44 | 44 | "Crime analysis is an essential part of efficient law enforcement for any city. It involves:\n",
|
45 | 45 | "-\tCollecting data in a form that can be analyzed. \n",
|
|
62 | 62 | "cell_type": "markdown",
|
63 | 63 | "metadata": {},
|
64 | 64 | "source": [
|
65 |
| - "# Prerequisites\n", |
| 65 | + "## Prerequisites\n", |
66 | 66 | "\n",
|
67 | 67 | "- **Data preparation** and **model training workflows** using `arcgis.learn` is based on [spaCy](https://spacy.io/usage/linguistic-features#named-entities) & [Hugging Face Transformers](https://huggingface.co/transformers/v3.0.2/index.html) libraries. A user can choose an appropriate backbone / library to train his/her model. \n",
|
68 | 68 | "- Refer to the section **\"Install deep learning dependencies of arcgis.learn module\"** [on this page](https://developers.arcgis.com/python/guide/install-and-set-up/#Install-deep-learning-dependencies) for detailed documentation on installation of the dependencies.\n",
|
|
76 | 76 | "cell_type": "markdown",
|
77 | 77 | "metadata": {},
|
78 | 78 | "source": [
|
79 |
| - "# Necessary Imports" |
| 79 | + "## Necessary Imports" |
80 | 80 | ]
|
81 | 81 | },
|
82 | 82 | {
|
|
111 | 111 | "cell_type": "markdown",
|
112 | 112 | "metadata": {},
|
113 | 113 | "source": [
|
114 |
| - "# Data preparation\n", |
| 114 | + "## Data preparation\n", |
115 | 115 | "\n",
|
116 | 116 | "Data preparation involves splitting the data into training and validation sets, creating the necessary data structures for loading data into the model and so on. The `prepare_data()` function can directly read the training samples in one of the above specified formats and automate the entire process."
|
117 | 117 | ]
|
|
396 | 396 | "cell_type": "markdown",
|
397 | 397 | "metadata": {},
|
398 | 398 | "source": [
|
399 |
| - "# EntityRecognizer model\n", |
| 399 | + "## EntityRecognizer model\n", |
400 | 400 | "\n",
|
401 | 401 | "`EntityRecognizer` model in `arcgis.learn` can be used with spaCy's [EntityRecognizer](https://spacy.io/api/entityrecognizer) backbone or with [Hugging Face Transformers](https://huggingface.co/transformers/v3.0.2/index.html) backbones\n",
|
402 | 402 | "\n",
|
|
1280 | 1280 | "cell_type": "markdown",
|
1281 | 1281 | "metadata": {},
|
1282 | 1282 | "source": [
|
1283 |
| - "# Model Inference\n", |
| 1283 | + "## Model Inference\n", |
1284 | 1284 | "\n",
|
1285 | 1285 | "Now we can use the trained model to extract entities from new text documents using `extract_entities()` method. This method expects the folder path of where new text document are located, or a list of text documents."
|
1286 | 1286 | ]
|
|
1478 | 1478 | "cell_type": "markdown",
|
1479 | 1479 | "metadata": {},
|
1480 | 1480 | "source": [
|
1481 |
| - "# Publishing the results as a feature layer\n", |
| 1481 | + "## Publishing the results as a feature layer\n", |
1482 | 1482 | "\n",
|
1483 | 1483 | "The code below geocodes the extracted address and publishes the results as a feature layer."
|
1484 | 1484 | ]
|
|
1662 | 1662 | "cell_type": "markdown",
|
1663 | 1663 | "metadata": {},
|
1664 | 1664 | "source": [
|
1665 |
| - "# Create a hot spot map of crime densities\n", |
| 1665 | + "## Create a hot spot map of crime densities\n", |
1666 | 1666 | "\n",
|
1667 | 1667 | "ArcGIS has a set of tools to help us identify, quantify and visualize spatial patterns in our data by identifying areas of statistically significant clusters.\n",
|
1668 | 1668 | "\n",
|
|
1737 | 1737 | "cell_type": "markdown",
|
1738 | 1738 | "metadata": {},
|
1739 | 1739 | "source": [
|
1740 |
| - "# Conclusion\n", |
| 1740 | + "## Conclusion\n", |
1741 | 1741 | "\n",
|
1742 | 1742 | "This sample demonstrates how `EntityRecognizer()` from `arcgis.learn` can be used for information extraction from crime incident reports, which is an essential requirement for crime analysis. Then, we see how can this information be geocoded and visualized on a map for further analysis."
|
1743 | 1743 | ]
|
|
1746 | 1746 | "cell_type": "markdown",
|
1747 | 1747 | "metadata": {},
|
1748 | 1748 | "source": [
|
1749 |
| - "# References\n", |
| 1749 | + "## References\n", |
1750 | 1750 | "\n",
|
1751 | 1751 | "[1]: [Police Incident Reports(City of Madison)](https://www.cityofmadison.com/police/newsroom/incidentreports/)\n",
|
1752 | 1752 | "\n",
|
|
1764 | 1764 | "notebookRuntimeVersion": ""
|
1765 | 1765 | },
|
1766 | 1766 | "kernelspec": {
|
1767 |
| - "display_name": "Python [conda env:conda-dl] *", |
| 1767 | + "display_name": "Python 3 (ipykernel)", |
1768 | 1768 | "language": "python",
|
1769 |
| - "name": "conda-env-conda-dl-py" |
| 1769 | + "name": "python3" |
1770 | 1770 | },
|
1771 | 1771 | "language_info": {
|
1772 | 1772 | "codemirror_mode": {
|
|
1778 | 1778 | "name": "python",
|
1779 | 1779 | "nbconvert_exporter": "python",
|
1780 | 1780 | "pygments_lexer": "ipython3",
|
1781 |
| - "version": "3.11.8" |
| 1781 | + "version": "3.11.0" |
1782 | 1782 | }
|
1783 | 1783 | },
|
1784 | 1784 | "nbformat": 4,
|
|
0 commit comments