CentreForDigitalHumanities / CentreForDigitalHumanities/langpro-annotator

Store LangPro prover results

Open
#54 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
5d 11h
Merged PRs (30d)
2

Description

The DB should store the JSON'ified LangPro output and act as a caching layer.
- If the frontend requests a problem and the proof exists in the DB, provide it immediately.
- If the user hits 'Parse and Proof' and a new proof is created.
- Based on the data in the LangPro output ([here](https://github.com/CentreForDigitalHumanities/langpro-container/blob/develop/LangPro_demo/tests/data/nli_prob0.json) is an example), infer the entailment label based on the arrays in `proofs.contradiction.info` and `proofs.entailment.info`:
- If there is an error (e.g. if the parsing fails), the entailment label should be "UNKNOWN"
- If either array contains 'open' and the other contains 'closed', the closed branch marks the problem status (ENTAILMENT or CONTRADICTION).
- If both arrays contains 'open', the label should be NEUTRAL.
- If both arrays contains 'closed', the label should be CONFLICT.

While it's technically a bit redundant to store the resulting entailment label separately in the DB, it would make it easier to filter problems based on LangPro-based entailment labels.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.