Views
No views yet
BertForTokenClassification (BERT-base, cased tokenizer vocabulary)dslim/bert-base-NER — classification head replaced for this label settransformers Trainersynthetic2 — includes synthetic augmentation alongside real-style incident data (stronger coverage for patterns like unit IDs and templated phrases)| Label | Description (typical use) |
|---|---|
O | Outside any entity |
ADDRESS | Street address / numbered location |
AGENCY | Agency / department name |
CONTEXT | Surrounding context |
DESC | Free-text description |
EVT_TYPE | Incident / event type |
LOC | Location name (street without number, place, etc.) |
STATUS | Unit / incident status |
SUBJECT | Subject (person role) |
SUSPECT_DATA | Suspect-related details |
UNIT | Radio / resource unit identifiers |
VEHICLE | Vehicle references |
X_STREET | Cross street |
B-UNIT, I-UNIT).| Setting | Typical value |
|---|---|
| Optimizer / schedule | AdamW, weight decay 0.01 |
| Learning rate | 2e-5 |
| Epochs | 3 |
| Batch size | 8 (per device) |
| Max sequence length | 128 |
| Validation split | 15% (last slice of shuffled or ordered JSONL — match your run) |
| Seed | 42 |
tokens and parallel labels per token (IOB strings), as consumed by train_ner.py.1from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
2
3model_id = "YOUR_HF_USERNAME/incidents_ner_v1" # after upload
4
5tok = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForTokenClassification.from_pretrained(model_id)
7
8ner = pipeline(
9 "token-classification",
10 model=model,
11 tokenizer=tok,
12 aggregation_strategy="simple",
13)
14text = "5137, 5188 copy a traffic stop on US 67 at Maple Street."
15print(ner(text))is_split_into_words=True and align labels to word pieces the same way as in training.models/incident_ner_v1config.json includes id2label / label2id and transformers version used at export.YOUR_HF_USERNAME/incidents_ner_v1 with your Hub repo id after publishing. Add evaluation metrics (precision/recall/F1 per entity) in a Evaluation section when you have them.