Downloads · 30 days
4
5% of all-time downloads
sili03/EE_cross_domain
EE_cross_domain is a machine learning model from sili03. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This is a comprehensive web-based annotation interface for cross-domain event extraction tasks. It allows users to annotate documents using event detection and argument extraction tasks across multiple datasets.
Downloads · 30 days
4
5% of all-time downloads
All-time downloads
74
Public
Parameters
223M
909 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors892 MB · 98%
From the Hugging Face model README
This is a comprehensive web-based annotation interface for cross-domain event extraction tasks. It allows users to annotate documents using event detection and argument extraction tasks across multiple datasets.
demo_event_extraction.mp4
This section highlights the UI features with placeholders for screenshots captured from the running web_dash_app.py interface. The application guides users from document upload and selection through multi-mode event detection and argument extraction, with combined visualizations to compare outputs. It also supports complete end-to-end extraction and schema-aware result saving across datasets.
{"documents": [{"id": "doc1", "text": "..."}, ...]}Detect and classify event triggers with three modes:
Results are displayed with:
Extract event arguments based on detected triggers:
Results are saved with hierarchical structure:
{
"doc_id": "...",
"source": "...",
"events": {
"geneva": {
"pipeline": [{"trigger": {...}, "arguments": [...]}, ...],
"e2e": [...],
"merged": [...]
},
"m2e2": {
"pipeline": [...],
"e2e": [...],
"merged": [...]
}
}
}
pip install dash dash-bootstrap-components transformers torch
web_infer.py: Core inference functionspattern_tagprime.py: Event schema definitionshttps://huggingface.co/sili03python web_dash_app.py
The application will start at http://localhost:8050
{"documents": [{"id": "...", "text": "..."}, ...]}Two options:
Assumptions used for the table below:
Per-model weight size (FP32): $$ 220\text{M} \times 4\text{ bytes} \approx 0.82\text{ GiB} $$
| Scenario | Models Loaded | Storage for Models (GiB) | Inference GPU Memory (GiB) |
|---|---|---|---|
| Only cross-domain model | 1 | 0.82 | 0.82 |
| One domain-specific + cross-domain | 2 | 1.64 | 1.64 |
| All models (6 domain-specific + cross-domain) | 7 | 5.74 | 5.74 |
If you plan to run larger batch sizes or longer sequences, add extra headroom for activations.
Results are saved in JSON with the following structure:
{
"doc_id": "unique_document_id",
"source": "original_text",
"events": {
"dataset_name": {
"pipeline": [
{
"trigger": {
"text": "word",
"type": "EventType",
"offset": [start, end]
},
"arguments": [
{
"text": "arg_text",
"role": "Role",
"offset": [start, end]
}
]
}
],
"e2e": [...],
"merged": [...]
}
}
}
Model paths are configured in MODEL_PATHS within web_dash_app.py and are resolved in get_model_path().
cross-domaingeneva, wikievents, casie, genia2013, m2e2, ramsThe application uses these functions from infer.py:
run_single_inference_event_detection(): Run trigger detectionparse_and_merge_single_inference_event_detection_results(): Parse and merge resultsrun_single_inference_event_argument_extraction(): Extract argumentsstructure_argument_extraction_pipeline_predictions(): Structure argument resultsLoading model: domain-specific from sili03/EE_geneva
config.json: 1.47kB [00:00, 6.70MB/s]
model.safetensors: 100%|#############################| 892M/892M [00:09<00:00, 95.9MB/s]
generation_config.json: 100%|###########################| 152/152 [00:00<00:00, 1.53MB/s]