https://github.com/centre-for-humanities-computing/xml-stiften
Alto XML extractor for the Aarhus Stiftstidende dataset
https://github.com/centre-for-humanities-computing/xml-stiften
Last synced: 8 months ago
JSON representation
Alto XML extractor for the Aarhus Stiftstidende dataset
- Host: GitHub
- URL: https://github.com/centre-for-humanities-computing/xml-stiften
- Owner: centre-for-humanities-computing
- Created: 2021-05-27T07:30:58.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-26T09:43:32.000Z (over 4 years ago)
- Last Synced: 2025-02-22T22:41:25.349Z (over 1 year ago)
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stiften Alto-XML Extractor #
- extracting content from Alto-XML to intermediary json
- minimal preprocessing
- concatenate documents in desired time bin
- export as txt
## Prerequisites
For running in virtual environment (recommended) and assuming python is installed.
#### Windows
```bash
> pip install virtualenv
> virtualenv stiftenv
> stiftenv\Scripts\activate
```
#### Linux
```bash
$ pip install virtualenv
$ virtualenv stiftenv
$ source stiftenv/bin/activate
```
## Installation
Clone repository and install requirements.
```bash
$ git clone https://github.com/centre-for-humanities-computing/xml-stiften
$ pip install -r requirements.txt
```
## Usage
There are two ways to run this script - via notebook, or CLI. You can choose whichever suits you best.
Method A is to run the scripts from a jupyter notebook (extract_stiften.ipynb).
Method B is running the extractor using a shell script (extract_stiften.sh).
#### Run from a jupyter notebook
Open the jupyter notebook (`extract_stiften.ipynb`).
Edit input parameters (documented inside the notebook).
Run the chunks you need.
#### Run from command line
Open shell script (`extract_stiften.sh`)
Edit your input parameters.
Run with `sh extract_stiften.sh`.
## Acknowledgments
Stopwords for old Danish by [VictorHarbo](https://github.com/VictorHarbo/holberg_kaffe_tei/blob/master/stopord.txt)