dougdotcon's picture
Release scientific evidence classifier v0.1
ec2d664 verified
Raw History Blame Contribute Delete
782 Bytes
from __future__ import annotations
import argparse, json
def predict(text: str) -> str:
t = text.casefold()
if "proibido" in t or "extrapolação" in t: return "PROHIBITED_CLAIM"
if "sem experimento" in t or "nenhuma métrica" in t or "evidência ausente" in t: return "UNVERIFIED"
if "oposta" in t or "rejeitada" in t: return "FALSIFIED"
if "holdout não distingue" in t or "sem poder" in t: return "REPLICATION_FAILED_INCONCLUSIVE"
if "intervalo contém" in t or "baixa potência" in t: return "INCONCLUSIVE"
return "SUPPORTED"
def main() -> None:
p = argparse.ArgumentParser(); p.add_argument("--text", required=True); a = p.parse_args()
print(json.dumps({"verdict": predict(a.text)}, ensure_ascii=False))
if __name__ == "__main__": main()