Downloads · 30 days
12
14% of all-time downloads
anonymous15135/nsp-councilseg-en
nsp-councilseg-en is a machine learning model from anonymous15135. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-nc-nd-4.0.
NSP-CouncilSeg-EN is a fine-tuned BERT model specialized in Text Segmentation for municipal council meeting minutes. The model uses Next Sentence Prediction (NSP) to identify topic boundaries in long-form documents, m…
Downloads · 30 days
12
14% of all-time downloads
All-time downloads
84
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
NSP-CouncilSeg-EN is a fine-tuned BERT model specialized in Text Segmentation for municipal council meeting minutes. The model uses Next Sentence Prediction (NSP) to identify topic boundaries in long-form documents, making it particularly effective for segmenting administrative and governmental meeting minutes.
Try out the model: Hugging Face Space Demo
google-bert/bert-base-uncasedThe model predicts whether two consecutive sentences belong to the same topic (label 0: "is_next") or represent a topic transition (label 1: "not_next"). By applying this classifier sequentially across all sentence pairs in a document, it identifies topic boundaries.
Sentence A: "By the President, minutes no. 28 of 20.12.2023 were present at the meeting."
Sentence B: "After considering and analyzing the matter, the Municipal Executive unanimously decided to approve minute no. 28 of 12.20.2023."
→ Prediction: Same Topic (confidence: 76%)
Sentence A: "After considering and analyzing the matter, the Municipal Executive unanimously decided to approve minute no. 28 of 12.20.2023."
Sentence B: "There were no various processes and requests to submit."
→ Prediction: Topic Boundary (confidence: 82%)
from transformers import AutoTokenizer, AutoModelForNextSentencePrediction
import torch
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("anonymous15135/nsp-councilseg-en")
model = AutoModelForNextSentencePrediction.from_pretrained("anonymous15135/nsp-councilseg-en")
# Prepare input
sentence_a = "By the President, minutes no. 28 of 20.12.2023 were present at the meeting."
sentence_b = "After considering and analyzing the matter, the Municipal Executive unanimously decided to approve minute no. 28 of 12.20.2023."
# Tokenize
inputs = tokenizer(sentence_a, sentence_b, return_tensors="pt")
# Predict
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probs = torch.softmax(logits, dim=1)
# Interpret results
is_next_prob = probs[0][0].item()
not_next_prob = probs[0][1].item()
print(f"Is Next (same topic): {is_next_prob:.3f}")
print(f"Not Next (topic boundary): {not_next_prob:.3f}")
if not_next_prob > 0.5:
print("🔴 Topic boundary detected!")
else:
print("🟢 Same topic continues")
For questions or feedback, please open an issue in the model repository.
This model is released under the Attribution-NonCommercial-NoDerivatives 4.0 International