Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- event-detection
|
| 6 |
+
- token-classification
|
| 7 |
+
- real-time-processing
|
| 8 |
+
- huggingface
|
| 9 |
+
- transformers
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Event Message Detector
|
| 13 |
+
|
| 14 |
+
## Model Description
|
| 15 |
+
|
| 16 |
+
The Event Message Detector is a fine-tuned token classification model based on `xlm-roberta-base`. It is designed to process real-time message streams from chat applications (e.g., Slack, IRC) to detect conversations that can be converted into calendar events. The model identifies event-related messages within a sliding window of recent messages, facilitating the extraction of meaningful interactions for scheduling purposes.
|
| 17 |
+
|
| 18 |
+
## Intended Use
|
| 19 |
+
|
| 20 |
+
### Direct Use
|
| 21 |
+
|
| 22 |
+
This model is intended for real-time detection of event-related conversations in multi-user chat environments. It can be integrated into chat applications to automatically identify and extract discussions pertinent to scheduling events, such as meetings or calls.
|
| 23 |
+
|
| 24 |
+
### Downstream Use
|
| 25 |
+
|
| 26 |
+
Developers can fine-tune this model further for specific domains or integrate it into larger systems that manage event scheduling, automate calendar entries, or analyze communication patterns.
|
| 27 |
+
|
| 28 |
+
### Out-of-Scope Use
|
| 29 |
+
|
| 30 |
+
The model is not designed for general-purpose natural language understanding tasks unrelated to event detection. It should not be used for sentiment analysis, topic modeling, or other unrelated NLP tasks without appropriate fine-tuning.
|
| 31 |
+
|
| 32 |
+
## Model Details
|
| 33 |
+
|
| 34 |
+
- **Model Type**: Token Classification
|
| 35 |
+
- **Base Model**: `xlm-roberta-base` (multilingual, 277M parameters)
|
| 36 |
+
- **Training Data**: Labeled chat messages indicating event-related conversations
|
| 37 |
+
- **Training Procedure**: Fine-tuned with a sliding window of 15 messages, using weighted cross-entropy loss
|
| 38 |
+
- **Evaluation Metrics**: ROC-AUC, F1-Score, Precision, Recall
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
```python
|
| 43 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
| 44 |
+
import torch
|
| 45 |
+
|
| 46 |
+
# Load model and tokenizer
|
| 47 |
+
model = AutoModelForTokenClassification.from_pretrained("oleksiydolgykh/event-message-detector")
|
| 48 |
+
tokenizer = AutoTokenizer.from_pretrained("oleksiydolgykh/event-message-detector")
|
| 49 |
+
|
| 50 |
+
# Example message
|
| 51 |
+
message = "[MESSAGE] [user1]: Let's have a meeting tomorrow at 10 AM."
|
| 52 |
+
|
| 53 |
+
# Tokenize input
|
| 54 |
+
inputs = tokenizer(message, return_tensors="pt")
|
| 55 |
+
|
| 56 |
+
# Get model predictions
|
| 57 |
+
with torch.no_grad():
|
| 58 |
+
outputs = model(**inputs)
|
| 59 |
+
|
| 60 |
+
# Process outputs
|
| 61 |
+
logits = outputs.logits
|
| 62 |
+
predictions = torch.argmax(logits, dim=-1)
|