Metadata-Version: 2.2
Name: quotect
Version: 1.0.3
Summary: state-of-the-art, ready to use software for quotation detection in German texts
Author: Fynn Petersen-Frey
License: MIT
Project-URL: Repository, https://github.com/fynnos/quotect.git
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: accelerate
Requires-Dist: transformers[torch]
Requires-Dist: torch
Requires-Dist: argparse_dataclass
Requires-Dist: sentencepiece
Requires-Dist: scipy
Requires-Dist: numpy
Requires-Dist: protobuf
Requires-Dist: spacy

# quotect

Python package to perform quotation detection on German texts.

## Installation

From PYPI: `pip install quotect`

From reposiory: `pip install -e .`

## Usage

```python
import json
from quotect import Quotect, QuotectArguments, QuoteInput
args = QuotectArguments(
    model_name_or_path="fynnos/quotect-mt5-base",
    output_dir="/tmp",
    predict_with_generate=True,
    generation_max_length=4096,  # max. 4096
    generation_num_beams=1,
)
q = Quotect(args)
input = QuoteInput(
    name="example",
    tokens=[],
    sentences=[],
    text="Sie sagte gestern: 'Morgen scheint die Sonne!' Jemand anderes erwiderte, dass es bestimmt regnen wird.",
)
print(json.dumps(q.predict(input)))
```

## Citation

Based on the publication [Fine-grained quotation detection and attribution in German news articles](https://aclanthology.org/2024.konvens-main.22/)
