{"id":20618684,"url":"https://github.com/notjoemartinez/copcrawler","last_synced_at":"2026-03-09T12:02:38.424Z","repository":{"id":253590329,"uuid":"843953442","full_name":"NotJoeMartinez/copcrawler","owner":"NotJoeMartinez","description":"Bug tracker for copcrawler.com ","archived":false,"fork":false,"pushed_at":"2025-09-23T00:56:28.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-26T11:30:50.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://copcrawler.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotJoeMartinez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"notjoemartinez"}},"created_at":"2024-08-17T23:25:15.000Z","updated_at":"2025-09-23T00:56:31.000Z","dependencies_parsed_at":"2024-08-18T00:28:04.157Z","dependency_job_id":"0f17a54b-0f54-4cd4-9b3d-aee5f6d7c76b","html_url":"https://github.com/NotJoeMartinez/copcrawler","commit_stats":null,"previous_names":["notjoemartinez/copcrawler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NotJoeMartinez/copcrawler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotJoeMartinez%2Fcopcrawler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotJoeMartinez%2Fcopcrawler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotJoeMartinez%2Fcopcrawler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotJoeMartinez%2Fcopcrawler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotJoeMartinez","download_url":"https://codeload.github.com/NotJoeMartinez/copcrawler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotJoeMartinez%2Fcopcrawler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30294691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T11:12:22.024Z","status":"ssl_error","status_checked_at":"2026-03-09T11:10:54.577Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T12:09:10.601Z","updated_at":"2026-03-09T12:02:38.419Z","avatar_url":"https://github.com/NotJoeMartinez.png","language":"Python","funding_links":["https://github.com/sponsors/notjoemartinez"],"categories":[],"sub_categories":[],"readme":"# [copcrawler.com](https://copcrawler.com/) \u0026 [AlertPage.ai](https://alertpage.ai/)\n\nSome code snippets of the audio preprocessing, transcription, incident classification, and \ngeocoding workflow for copcrawler.com \u0026 alertpage.ai\n\n\n## LLM classification \u0026 geocoding \n\n```mermaid\nflowchart TD\n    A[Start: Radio Transmission] --\u003e B[Split by Talkgroups]\n    B --\u003e C[For each transmission]\n    C --\u003e D{No Speech Found?}\n    D --\u003e|Yes| C\n    D --\u003e|No| E{Duplicate text?}\n    E --\u003e|Yes| C\n    E --\u003e|No| F[**JustifyIncident**\u003cbr/\u003eLLM Function]\n    \n    F --\u003e G{Extract incident?}\n    G --\u003e|No| H[Skip transmission]\n    G --\u003e|Yes| I[**ClassifyIncident**\u003cbr/\u003eLLM Function]\n    \n    I --\u003e J{Classification valid?}\n    J --\u003e|No - UNKNOWN| H\n    J --\u003e|Yes| K[**CheckForGeocodeableAddress**\u003cbr/\u003eLLM Function]\n    \n    K --\u003e L{Has address?}\n    L --\u003e|No| H\n    L --\u003e|Yes| M[**ExtractIncidentLocation**\u003cbr/\u003eLLM Function]\n    \n    M --\u003e N{Location extracted?}\n    N --\u003e|No| H\n    N --\u003e|Yes| O[**ValidateIncidentClassificationLocation**\u003cbr/\u003eLLM Function]\n    \n    O --\u003e P{Validation passed?}\n    P --\u003e|No| H\n    P --\u003e|Yes| Q[**IncidentKeywordSelector**\u003cbr/\u003eLLM Function]\n    \n    Q --\u003e R[Create LLM Transcript Node]\n    R --\u003e S[**Geocoding Process**]\n    \n    S --\u003e T[Check Cache]\n    T --\u003e U{Cached result?}\n    U --\u003e|Yes| V[Use cached coordinates]\n    U --\u003e|No| W[LocationIQ Geocoding]\n    \n    W --\u003e X{Geocoding successful?}\n    X --\u003e|No| Y[Skip incident]\n    X --\u003e|Yes| Z[**Validate Geocode**\u003cbr/\u003eBased on address type]\n    \n    Z --\u003e AA[**NormalGeocodeValidator**\u003cbr/\u003e**PlaceGeocodeValidator**\u003cbr/\u003e**IntersectionGeocodeValidator**\u003cbr/\u003eLLM Functions]\n    AA --\u003e BB{Geocode valid?}\n    BB --\u003e|No| Y\n    BB --\u003e|Yes| CC[Cache result]\n    CC --\u003e DD[Create Simplified Incident]\n    \n    V --\u003e DD\n    DD --\u003e EE[Return processed incidents]\n    \n    H --\u003e C\n    Y --\u003e C\n    \n    %% style F fill:#e1f5fe\n    %% style I fill:#e1f5fe\n    %% style K fill:#e1f5fe\n    %% style M fill:#e1f5fe\n    %% style O fill:#e1f5fe\n    %% style Q fill:#e1f5fe\n    %% style AA fill:#e1f5fe\n    \n    classDef llmFunction fill:#e1f5fe,stroke:#01579b,stroke-width:2px\n    classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px\n    classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px\n    classDef endpoint fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px\n```\n\n## LLM Functions Overview\n\n### 1. **JustifyIncident** (`gpt-4o-mini`)\n- **Input**: Transcript text\n- **Output**: `extract_incident` (boolean)\n- **Purpose**: Determines if transcript contains actionable police/fire/ems information\n\n### 2. **ClassifyIncident** (`gpt-4o-mini`)  \n- **Input**: Transcript text\n- **Output**: `type_of_incident`, `meta_category`, `description`\n- **Purpose**: Classifies incident type and meta-category\n\n### 3. **CheckForGeocodeableAddress** (`gpt-4o-mini`)\n- **Input**: Transcript text  \n- **Output**: `has_address` (boolean)\n- **Purpose**: Determines if transcript contains a geocodeable address\n\n### 4. **ExtractIncidentLocation** (`gpt-4o-mini`)\n- **Input**: Transcript text\n- **Output**: `extracted_location`, `address_type`, `confidence_score`\n- **Purpose**: Extracts location information and classifies address type\n\n### 5. **ValidateIncidentClassificationLocation** (`gpt-4o`)\n- **Input**: Transmission text, type of incident, extracted location\n- **Output**: `is_valid` (boolean)\n- **Purpose**: Cross-validates that extracted location matches incident classification\n\n### 6. **IncidentKeywordSelector** (`gpt-4o-mini`)\n- **Input**: Transcript text, valid keywords list\n- **Output**: `relevant_keywords` (array)\n- **Purpose**: Selects semantically relevant keywords from predefined list\n\n### 7. **Geocode Validators** (`gpt-4o-mini`)\n- **NormalGeocodeValidator**: Validates standard address geocoding\n- **PlaceGeocodeValidator**: Validates place/landmark geocoding  \n- **IntersectionGeocodeValidator**: Validates intersection geocoding\n- **Input**: LLM extracted address, geocoded address\n- **Output**: `is_valid` (boolean)\n- **Purpose**: Ensures geocoding service results match LLM extracted addresses\n\n## Workflow Summary\n\nThe system processes radio transmissions through a multi-stage LLM pipeline:\n\n1. **Pre-processing**: Split transmissions by talkgroups, filter duplicates/empty\n2. **Justification**: Determine if transmission is actionable\n3. **Classification**: Categorize incident type and severity\n4. **Address Detection**: Check for geocodeable addresses\n5. **Location Extraction**: Extract specific location details\n6. **Cross-validation**: Verify location matches classification\n7. **Keyword Selection**: Extract relevant trigger keywords\n8. **Geocoding**: Convert addresses to coordinates with validation\n9. **Output**: Generate simplified incident records for dashboard display\n\nThe pipeline uses 7 different LLM functions with robust validation and caching to ensure high-quality incident data extraction from scanner audio transcripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotjoemartinez%2Fcopcrawler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotjoemartinez%2Fcopcrawler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotjoemartinez%2Fcopcrawler/lists"}