{"slug": "custom-entity-extraction-from-text", "title": "Custom Entity Extraction from text", "summary": "A developer released ReDefiNER, a 0.8B-parameter model under Apache 2.0 that extracts user-defined entities from text by taking the entity type and plain-English rules as input rather than requiring labelled training data, and runs on a CPU. The model returns exact character spans with confidence scores so low-confidence rows can be routed for review, and users correct mistakes by adding rules instead of retraining. The developer cautioned that ReDefiNER has not been tested on card transaction descriptions and recommended checking a few hundred rows before relying on it.", "body_md": "For anyone finding this thread now: you can do this without labelling data, using a model that takes the entity type as input. I built one, ReDefiNER ([GitHub - Jungroo-AI/redefiner: A 0.8B model that extracts the entities you define in a plain-English rulebook. It runs on a CPU and is free under Apache 2.0. · GitHub](http://github.com/jungroo-ai/redefiner), Apache 2.0, runs on a CPU). You describe the type and the rules in plain English:\n\n``` python\nfrom redefiner import Tagger\n\ntagger = Tagger.from_pretrained(\"jungroo-ai/redefiner-0.8b\")\n\nrulebook = \"\"\"[RULES]\nExtract every entity of the supplied types. Return exact spans from the text.\n\n[TYPE] STORE_NUMBER\n[DESCRIPTION] The store or branch number in a card transaction description, usually right after the merchant name.\nSN1 Do not mark phone numbers, dates or amounts.\nSN2 Keep a letter prefix in the span, as in K6148.\n\"\"\"\n\ntagger.extract([\"FIVE GUYS 2565 DIST 468-981-3409 AL\", \"McDonald's K6148\"], rulebook)\n```\n\nIt returns exact character spans with a confidence, so you can send low-confidence rows for review. When it gets a pattern wrong, you add a rule instead of retraining. I haven’t tested it on transaction descriptions, so check a few hundred of your own rows first. If you already have labelled data, the token-classification approach above is still a good route.", "url": "https://wpnews.pro/news/custom-entity-extraction-from-text", "canonical_source": "https://discuss.huggingface.co/t/custom-entity-extraction-from-text/18469#post_4", "published_at": "2026-11-14 11:05:17+00:00", "updated_at": "2026-11-14 11:22:07.147319+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "natural-language-processing", "ai-tools"], "entities": ["ReDefiNER", "Jungroo-AI", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/custom-entity-extraction-from-text", "markdown": "https://wpnews.pro/news/custom-entity-extraction-from-text.md", "text": "https://wpnews.pro/news/custom-entity-extraction-from-text.txt", "jsonld": "https://wpnews.pro/news/custom-entity-extraction-from-text.jsonld"}}