Skip to main content

Data model for the args.me argument search engine

Project description

# args-me-model

[![PyPI - Version](https://img.shields.io/pypi/v/args-me-model)](https://pypi.org/project/args-me-model/)
[![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fwebis-de%2Fargs-me-model%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)](https://webis.de/args-me-model)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/webis-de/args-me-model/test.yml)](https://github.com/webis-de/args-me-model/actions/workflows/test.yml)
[![Static Badge](https://img.shields.io/badge/licence-MIT-%2395c30d)](https://github.com/webis-de/args-me-model/blob/main/LICENSE)


The data model of the args.me search engine (work-in-progress).


[Claim](https://github.com/webis-de/args-me-model/blob/main/src/args_me_model/claim.py)s are extracted from or generated by one or more [Source](https://github.com/webis-de/args-me-model/blob/main/src/args_me_model/source.py)s and connected via [Support](https://github.com/webis-de/args-me-model/blob/main/src/args_me_model/support.py) relations. Two claims can reference each other as their `counter` if they state the opposite of each other.


## Install
```shell
pip install args-me-model
```


## Quickstart
```python
from args_me_model import Claim, Source

# Creating claims
claim1 = Claim.from_source(
Source(
name="common-knowledge",
text="Blue is scattered more than other colors"
)
)
claim2 = Claim.from_source(
Source(
name="common-knowledge",
text="The sky is blue"
),
support = [[claim1]] # list of linked support
)
claim3 = Claim.from_source(
Source(
name="uncommon-knowledge",
text="The sky is not blue"
),
counter = claim2 # claim2 and claim3 are counter claims
)

# Writing claims to a file
Claim.write_ndjson([claim1, claim2, claim3], "myclaim.ndjson")

# Iterating over claims from a file
for claim in Claim.read_ndjson("myclaim.ndjson"):
print(claim.text)
```

More information in the [documentation](https://webis.de/args-me-model).

## Development
Running unittests (done automatically on push)
```shell
PYTHONPATH=$PWD/src python3 -m unittest
```

Building documentation (done automatically on release)
```shell
pip install -r docs/requirements
sphinx-build -b html docs/ docs/_build
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

args_me_model-0.3.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

args_me_model-0.3.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file args_me_model-0.3.0.tar.gz.

File metadata

  • Download URL: args_me_model-0.3.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for args_me_model-0.3.0.tar.gz
Algorithm Hash digest
SHA256 57116cbe4c15df60c9f89269e7dc70d440e1b3aa614851f98dc57c25fb68cca0
MD5 c98483fadaf65503ce84eb09caa40976
BLAKE2b-256 37db5acd59acfba3dfa0d76c82f80ecce055ccc6c68c0d2258c8e7c540b55bcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for args_me_model-0.3.0.tar.gz:

Publisher: publish.yml on webis-de/args-me-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file args_me_model-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: args_me_model-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for args_me_model-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3110a57d2b66a025aeb68f205a6fccb10177283fe057dd0e0a6da1ba7a304b78
MD5 121cc922d2fc124ba41681ec7745e17c
BLAKE2b-256 22598b8ff769fa2af9fdbbd09fcc928608872303dc8e858554190b24da1ebdef

See more details on using hashes here.

Provenance

The following attestation bundles were made for args_me_model-0.3.0-py3-none-any.whl:

Publisher: publish.yml on webis-de/args-me-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page