citecheck · Word add-in
Two checks for court decisions, in Word. The document stays on your computer.
citecheck checks every reference to a court decision against a list of over a million Swiss decisions, and shows what in the version to be published could identify a person. Free, open source (MIT).
Version 1.1 · anonymisation check as a preview · Microsoft 365 or Office 2021 and later
Check cites
- Finds BGE/ATF/DTF citations and file numbers of the federal and cantonal courts in the text and the footnotes.
- Checks each one: is the decision in the list, does it have the cited Erwägung (E. 2.3, consid. 4), is the cited page inside the decision, is the date right.
- For a citation that is not in the list, shows similar ones: a number one character apart with the same date, or the BGE that contains the cited page.
- Each result links to the decision on opencaselaw.ch. "Show in the draft" selects the citation in the document. If you want, it adds a Word comment.
What it does not do
- It does not check whether the decision says what the draft claims.
- "Not in the list" does not mean the decision does not exist. Unpublished and very recent decisions are not in the list. The pane shows what the list has for that court.
- Erwägung numbers are known for about 80% of the decisions. For the rest, the pane says the Erwägung cannot be checked.
- It does not change the text.
The pane after a check. German, French, Italian, English.
Check anonymisation preview
- Reads everything the file carries: the text, footnotes, headers and footers, and what a reader does not see: comments and their authors, tracked deletions, hidden text, field codes, image descriptions, document properties, data that case-management systems leave in the file, the file name.
- Every word and number is either explained or shown, except single lower-case words the word list does not know: they are counted, and two such words side by side (say “hans müller”) are shown. Explained is what is usual in published rulings and not a name, what the ruling itself makes public (court, counsel, cited literature and case law) and every placeholder. Identification numbers are always shown: AHV numbers (check digit verified), IBAN, phone numbers, e-mail addresses, addresses, number plates, land parcels, dates of birth and more.
- You tick what to replace. A person gets one letter however the name is written (Müller, Müllers, MÜLLER). Where a name fits more than one person, such as “Müller” with two Müllers, you choose the letter, place by place if need be. Create anonymised copy writes a new file: the ticked places replaced, tracked changes accepted, comments, hidden text and properties removed. The copy is checked again before it opens. Your version stays as it is.
What it does not do
- It does not judge whether several usual facts together (age, place, occupation) identify a person.
- Where a surname is also an ordinary word (Frei, Sommer, Weiss), it cannot always tell the two apart. It does not read text in images.
- It does not recognise every identifying detail, and it decides nothing. What it shows, you judge.
Measured on 5,724 published, anonymised rulings it had never seen: every identification number or address put next to a placeholder is shown; a name missed in one place is shown in 96 to 97% of cases, a person forgotten entirely in 91%; a ruling shows a median of 5 (German), 4 (French) or 6 (Italian) places to look at. Benchmark report.
The pane after a check: an address, an AHV number in the lower court's reference and a missed name, also in a comment and the document title. Two are ticked. The author's name from the document properties is dropped from the copy.
Install
Download one file and upload it in Word. No installer, no admin rights.
Download citecheck-manifest.xml
Installed before October 2026? The anonymisation check is already in the pane: switch at the top (restart Word once). For its own button on the ribbon, download the file again and replace the old one.
Word for Windows installs an add-in from a file only through a shared folder (steps below, about five minutes). Quicker: the same file in Word in the browser (next tab), or the pane without Word (see Use).
- Make a folder, for example
C:\citecheck, and put the file in it. Right-click the folder, Properties, tab Sharing, Share, Share. Note the network path shown, for example\\YOUR-PC\citecheck. - In Word: File, Options, Trust Center, Trust Center Settings, Trusted Add-in Catalogs. Paste the network path under Catalog Url, Add catalog, tick Show in Menu, OK, OK. Restart Word.
- Home, Add-ins, Advanced (older versions: Insert, My Add-ins). Tab Shared Folder, select citecheck, Add.
- The pane opens. Next time: tab Review, buttons Check cites and Check anonymisation.
Some Microsoft 365 versions of Word also show Upload My Add-in under My Add-ins; if yours does, upload the file there instead. If sharing a folder is not allowed, your IT can add the same file in the Microsoft 365 admin center (Integrated apps, Upload custom apps) or put the add-in on the intranet: instructions for IT.
- Open the document in Word at office.com. Insert, Add-ins (newer versions: Home, Add-ins, More Settings).
- My Add-ins, Manage My Add-ins, Upload My Add-in, select the file, Upload.
Word in the browser keeps the add-in in this browser only. In another browser, or after clearing the browser's data, upload the file again.
- Quit Word.
- In the Finder: Go, Go to Folder…, paste
~/Library/Containers/com.microsoft.Word/Data/Documents/wef. Create the folderwefif it is missing. - Put the file in that folder.
- Start Word. Home, Add-ins, Developer Add-ins, citecheck.
Use
- Open the draft, press Check the draft. The first time, the list is downloaded (16 MB). After that only when a newer list exists; the add-in asks before a check, at most every ten minutes.
- One line per citation: found, differs, not in the list, not checked. Click a line for details.
- Anonymisation: open the version to be published, switch to Anonymisierung at the top of the pane (or use the ribbon button), Check this version, tick, Create anonymised copy. The first time, the word list is downloaded (2.4 MB).
- Without Word: open the pane in a browser and drop the .docx on it. The file is read in the browser, not uploaded.
What is sent where
The add-in downloads files. It does not upload anything.
Web server of the add-in
jonashertner.github.io. Serves files only. A court can put the same files on its own server.
- the add-in (page, script, style)
- the list: court, date, number and Erwägung numbers of each decision. No text of any decision.
- the word list for the anonymisation check: words that are common in published rulings. No names, no text of any decision.
- sees: the pane was opened, the list was downloaded. Not the document.
Your computer
The add-in runs inside Word. It reads the document and compares the citations with the list. Everything happens here.
- the document
- the citations and places found in it
- the results, the comments, the anonymised copy
- a copy of the lists, for the next run
Microsoft
Word loads the file office.js from appsforoffice.microsoft.com. Every Word add-in needs it.
- sees: an add-in was opened. Not which document.
Exception: when you click "open decision", your browser opens that decision's page on opencaselaw.ch. That is a normal link. opencaselaw.ch sees that the page was opened, not the document.
The add-in's page contains a rule for the browser (Content-Security-Policy) that allows connections to its own web server only. Word's built-in browser blocks every other connection. The code has one place that downloads, nothing that uploads. A test in the source code fails if this changes.
To check it yourself: open the pane with the browser's developer tools and watch the Network tab during a run. Details: SECURITY.md.
For the IT of a court
The add-in is a folder of files and one manifest. Copy the folder to an internal web server, put the list next to it, generate the manifest for that address, distribute it via the Microsoft 365 admin center. The computers then contact only the internal server and Microsoft. Instructions.
Feedback
Cite check: if a result is wrong, send the citation as written and the message from the pane. Anonymisation check (preview): please send no content from documents; describe what kind of place was missed or shown wrongly (for example “a name after a hyphen”, “a hospital's address”). GitHub or e-mail. Which courts and years are in the list: coverage.