File size: 3,494 Bytes
f74e36b
 
 
 
 
 
 
 
 
 
72f02e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34a9521
72f02e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
language:
  - de
license: mit
base_model: unsloth/Qwen3-1.7B-unsloth-bnb-4bit
library_name: gguf
base_model_relation: finetune
tags:
  - text-generation
---
# PolitScanner

## Abstract

Swiss politicians lie.
And they mostly get away with it.
"One reason for this is that fact-checks, which can only be carried out retrospectively, are surprisingly ineffective. Listeners still remember the false information. The correction is forgotten." — Philipp Gerlach.
This technical report provides a comprehensive overview of the artificial intelligence components of the PolitScanner project.
It aims to automatically detect false narratives and fake news in the speeches of Swiss politicians while avoiding the inaccuracies inherent in Large Language Models.

The training code can be found on [GitHub](https://github.com/lenamerkli/PolitScanner).

This is an entry for the Swiss AI Challenge 2025.
More information can be found at [www.ki-challenge.ch](https://www.ki-challenge.ch/).

## Table of Contents

0. [Abstract](#abstract)
1. [Paper](#paper)
2. [Installation](#installation)
3. [Usage](#usage)
4. [License](#license)
5. [Citation](#citation)

## Paper

Read the full paper [here](https://huggingface.co/lenamerkli/PolitScanner/blob/main/politscanner.pdf).

## Installation

**Note: inference only**

This installation guide is for Nobara Linux.
Other distributions should work as well.

For the full installation guide, see [the development readme](https://github.com/lenamerkli/PolitScanner/blob/main/README.md).

### Increase memlock

Add (or update) the following lines to `/etc/security/limits.conf`:
```text
* soft memlock 50331648
* hard memlock 50331648
```

### Git

Install git:

```shell
sudo dnf install git
```

Clone the PolitScanner repository:

```shell
git clone https://huggingface.co/lenamerkli/PolitScanner
cd PolitScanner
```

### Python

Install Python version 3.12.10 with the following command:

```shell
sudo dnf install python3.12-0:3.12.10-1.fc41.x86_64
```

Install the Python virtual environment package:

```shell
sudo dnf install python3-virtualenv
```

Create the virtual environment:

```shell
./create_venv.sh
```

Activate the virtual environment:

```shell
source .venv/bin/activate
```

### llama.cpp

If llama.cpp is not installed, check the [development readme](https://github.com/lenamerkli/PolitScanner/blob/main/README.md) for instructions.

### Download models

Run the downloader:

```shell
python3 download_ggufs.py
```

Move the PolitScanner model:

```shell
mv ./Qwen3-1.7B-PolitScanner-Q5_K_S.gguf /opt/llms/Qwen3-1.7B-PolitScanner-Q5_K_S.gguf
```

## Usage

Copy the political speech (preferably in swiss high german) to the `input.txt` file.

Run the program:

```shell
python3 main.py
```

The output will be written to the `output.txt` file.

## License

[MIT License](https://github.com/lenamerkli/PolitScanner/blob/main/LICENSE)

## Citation

bibtex:
```bibtex
@misc{merkli2025politscanner,
    title = {PolitScanner: Automatic Detection of common Incorrect Statements in Speeches of Swiss Politicians},
    author = {Lena Merkli},
    year = {2025},
    month = {07},
    url = {https://huggingface.co/lenamerkli/PolitScanner}
}
```
biblatex:
```biblatex
@online{merkli2025politscanner,
    title = {PolitScanner: Automatic Detection of common Incorrect Statements in Speeches of Swiss Politicians},
    author = {Lena Merkli},
    year = {2025},
    month = {07},
    url = {https://huggingface.co/lenamerkli/PolitScanner}
}
```