z-dickson's picture
Update README.md
7a4929a verified
|
raw
history blame
8.69 kB
metadata
tags:
  - politics
  - summarization
  - Event detection
  - political party
  - press release
  - political communication
  - European Union
  - Speech
license: apache-2.0
language:
  - en
  - es
  - da
  - bg
  - el
  - pt
  - sv
  - cs
  - fi
  - hu
  - lv
  - sk
  - et
  - de
  - it
  - fr
  - nl
  - pl
metrics:
  - rouge
widget:
  - text: >-
      In the light of the current spate of organised vandalism perpetrated in
      the names of Eco This or Stop Something Else, haven’t we seen this kind of
      near mass-hysterical action before? With certain obvious exceptions, most
      of the activists appear to be in the teens to early twenties bracket, and
      of a comfortable so-called middle-class group. In any event, they have
      been persuaded that this business of ‘climate change’ which has steadily
      become some sort of cult, is about to destroy all life as we know it. In
      reality, the world’s climate has been changing since the ‘Big Bang’ and
      will continue so to do until the whole thing eventually fizzles out. They
      have not yet cottoned on to the fact that by far the biggest threat to
      human existence is that of overpopulation. What is more disturbing,
      however, is the ease with which they have been recruited into behaving as
      they do – with no regard to everybody else’s opinions and wishes. Whether
      by disrupting a Snooker Tournament, the Grand National, obstructing
      motorways or whatever else, it is clear that there is a core group of
      these ‘eco’ fanatics who can be directed to any place or event that
      somebody decides should be attacked, whenever and wherever they choose.
      For this to happen, there has to be a hierarchy at large, as opposed to
      and directing the cannon fodder who actually make the mischief. As we have
      seen on various other occasions, it is those ‘useful idiots’ who do the
      dirty work while the organisers stay safely away and laugh at those
      gullible enough to take it all in, regardless of the veracity of their
      cause’ or the consequences of their mindless actions. This is not new by
      any means. The Nazis in pre-war Germany used similar tactics involving
      some sort of brainwashing and intimidation, which resulted in the
      emergence of Hitler Youth and we all know what a misguided bunch they
      eventually turned out to be. Of more concern these days is the potential
      for the organisers of these events to bring together at short notice a
      substantial gang of activists who can be easily manipulated into carrying
      out acts of serious civil disobedience against any stratum of society they
      decide needs their form of correction or treatment. This is a form of
      grooming  however you look at it. Of course, there will be a percentage
      who will duck out of any really serious civil disorder, but that would
      still leave a substantial number of organised troublemakers who will
      relish the thought of seizing some sort of power to affect political
      thought or action. This is generally accompanied by those seeking to
      maximise damage to public and private property. It is regrettable that the
      Courts have so far failed to acknowledge this current spate of ochlocracy.
      Meanwhile, we all have to put up with that troublesome element intent on
      testing the boundaries of a decent democratic society.
    example_title: 'English (Political party: UKIP)'
  - text: >-
      Die Bekämpfung illegaler Migration ist eine gemeinsame Priorität von
      Österreich und Indien, gerade vor dem Hintergrund der dramatisch
      gestiegenen Ankunftszahlen illegaler Migrantinnen und Migranten aus Indien
      im vergangenen Jahr. Ausdruck dessen findet sich im Abkommen über eine
      umfassende Migrations- und Mobilitätspartnerschaft, die Außenminister
      Alexander Schallenberg und sein indischer Amtskollege, Subrahmanyam
      Jaishankar, am Rande des EU-Indopazifik-Ministerforums in Stockholm
      unterzeichnet haben. Damit wurde erstmals eine vertragliche Grundlage für
      Rückführungen nach Indien geschaffen, die zusammen mit der erfolgten
      Abschaffung der visafreien Einreise aus Indien nach Serbien, für die sich
      Kanzler und Innenminister erfolgreich eingesetzt haben, zu einem noch
      deutlicheren Rückgang der illegalen Migration aus Indien führen wird. Aber
      es geht dabei nicht nur um die Bekämpfung von illegaler Migration, sondern
      auch viel mehr um die Stärkung legaler Migrationsmöglichkeiten,
      insbesondere für die Fachkräfte, die Österreich dringend benötigt. Hierbei
      soll zukünftig zuerst Kontakt zwischen Firmen und den potentiellen
      Arbeitskräften hergestellt werden, wobei die Zusammenarbeit zwischen
      staatlichen Agenturen indischen Staatsangehörigen erleichtern soll, einen
      geeigneten Arbeitgeber in Österreich zu finden. Ein verbesserter Austausch
      von Studierenden und eine zügige Visavergabe, vor allem für
      Journalistinnen und Journalisten sowie in der Wissenschaft ist ebenfalls
      vorgesehen. Für junge Menschen wird darüber hinaus die Chance geschaffen,
      durch ein Working Holiday Programm im Zielland kurze, befristete
      Arbeitsverhältnisse einzugehen oder Bildungseinrichtungen ohne
      Beschäftigungsbewilligung zu nutzen. Außenminister Alexander Schallenberg:
      „Das Abkommen ist ein Meilenstein in unseren Beziehungen mit dem
      bevölkerungsreichsten Land der Welt. Es schafft Möglichkeiten, indische
      Arbeitskräfte beispielsweise im Rahmen der Rot-Weiß-Rot Karte nach
      Österreich zu bringen. Hochqualifizierte Inderinnen und Inder können nun
      dort Lücken schließen, wo es in Österreich an Arbeitskräften fehlt.“
    example_title: 'German (Political party: Austrian People''s party)'

Model description

A sequence-to-sequence model fine-tuned to extract structured event summaries from European political party press releases and output strict JSON with four fields:

{
  "response_to_event": "Yes" | "No",
  "event_name": "string or null",
  "country": "string or null",
  "political_issue": "string or null"
}
  • Base model: facebook/mbart-large-50 (multilingual).
  • Languages in input: ~15–20 EU languages; output is always English.
  • Task type: information extraction / structured summarization.

Intended uses & limitations

Intended uses

  • Measure party responsiveness to specific events (e.g., extreme weather, crises).
  • Produce machine-readable metadata from press releases for downstream analysis.

Out of scope / limitations

  • Free-text fields (event_name, political_issue) can vary in wording; they are not normalized to a fixed ontology.
  • The model does not verify factual correctness; it summarizes based on the given text only.
  • Lower performance is expected on domains very different from party press releases, or on languages unseen in training.

How the training data was created

  1. Collected party press releases from European political parties (multi-language).
  2. Used a local LLM (Ollama + Qwen) to generate weak labels in strict JSON format with the schema above.
  3. Cleaned labels with JSON validation and simple normalization (e.g., “Yes/No”, empty string → null).
  4. De-duplicated inputs, truncated long texts, and split into train/validation.

Note: labels for event_name and political_issue are inherently noisy (free-text, long-tail), which is reflected in evaluation.

Validation results (held-out set)

(Exact strings from trainer.evaluate())

  • 'eval_loss': 0.34201106429100037
  • 'eval_json_valid_rate': 0.9991575400168492
  • 'eval_exact_match_rate': 0.08003369839932603
  • 'eval_response_to_event_f1': 0.8672566371681415
  • 'eval_event_name_f1': 0.28046289993192647
  • 'eval_country_f1': 0.8763845813026141
  • 'eval_political_issue_f1': 0.14344449520328917
  • 'epoch': 5.0

Example usage

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch, json

model_id = "https://huggingface.co/z-dickson/BART_political_event_detection"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id).to("cuda" if torch.cuda.is_available() else "cpu")


text = "Following the devastating floods in Slovenia, our party calls for stronger climate resilience measures."
inputs = tok(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
response = tok.decode(outputs[0], skip_special_tokens=True)
response_json = json.loads(response)
response_json

{
  "response_to_event": "Yes",
  "event_name": "Floods in Slovenia",
  "country": "Slovenia",
  "political_issue": "Climate adaptation policy"
}