You can use this model in the Classify Text Using Deep Learning tool available in the GeoAI toolbox in ArcGIS Pro.
Classify text
Complete the following steps to classify text:
- Download the Country Classification model from ArcGIS Living Atlas of the World.
- Browse to Tools on the Analysis tab.
- Click the Toolboxes tab in the Geoprocessing pane, select GeoAI Tools, and browse to the Classify Text Using Deep Learning tool under Text Analysis.
- Set the variables on the Parameters tab as follows:
- Input Table—The input point, line, or polygon feature class or table containing the text to be classified.
- Text Field—The address field within the input feature class or table.
- Input Model Definition File—Select the pretrained or fine-tuned model .dlpk file.
- Class Label Field—The name of the field that will contain the classified text in the output feature class or table. The default field name is ClassLabel.
- Model Arguments (optional)—Change the values of the arguments if
required.
- Sequence_length—Default value is 512. This is the maximum sequence length (at subword level after tokenization) of the training data to be considered for training the model. It is applicable only for models with HuggingFace transformer backbones.
- Set the variables on the Environments tab by setting Processor Type as CPU or GPU.
It is recommended that you select GPU, if available, and set GPU ID to the GPU to be used.
- Click Run.
The output layer or table is added to the map. Click Attribute Table to see the output.