Skip to content

webis-de/args-me-model

Repository files navigation

args-me-model

PyPI - Version Python Version from PEP 621 TOML GitHub Actions Workflow Status GitHub Actions Workflow Status Static Badge

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

Claims are extracted from or generated by one or more Sources and connected via Support relations. Two claims can reference each other as their counter if they state the opposite of each other. Each of Claim, Source, and Support have additional fields to store information and allow for arbitrary annotations.

Install

pip install args-me-model

Quickstart

from args_me_model import Claim, Source

# Creating claims
premise1 = Claim.from_source(
        Source(name="common-knowledge", text="There are no clouds")
    )
premise2 = Claim.from_source(
        Source(name="common-knowledge", text="A clear sky is blue")
    )
claim = Claim.from_source(
        Source(name="common-knowledge", text="The sky is blue"),
        support = [[premise1, premise2]] # linked support relations
    )
counterclaim = Claim.from_source(
        Source(name="uncommon-knowledge", text="The sky is not blue"),
        counter = claim # also sets claim.counter
    )

# Writing claims to a file
Claim.write_ndjson(
        [premise1, premise2, claim, counterclaim],
        "claims.ndjson"
    )

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

Contributing

See the development notes.

About

Data model for args.me

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages