Skip to content

Instantly share code, notes, and snippets.

@tdgunes
Created November 24, 2021 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdgunes/6d57cec2fbac95b7260c280b47dc9cdb to your computer and use it in GitHub Desktop.
Save tdgunes/6d57cec2fbac95b7260c280b47dc9cdb to your computer and use it in GitHub Desktop.
org-tweetyproject-arg-peaf
// TODO: Make sure the aif RA and CA nodes have `probability` field assigned to 1.0.
// TODO: For an example, check `resources/aif/5.json`.
public class Example {
public static void main(String[] args) {
AIFReader reader = new AIFReader("changethepath.json");
AIFTheory theory = reader.read();
AIFtoPEEAFConverter converter = new AIFtoPEEAFConverter();
PEEAFTheory peeafTheory = converter.convert(theory);
peeafTheory.prettyPrint();
PEEAFToPEAFConverter converter2 = new PEEAFToPEAFConverter();
NamedPEAFTheory peafTheory = converter2.convert(peeafTheory);
peafTheory.prettyPrint();
ExactPEAFInducer inducer = new ExactPEAFInducer(peafTheory);
inducer.induce(new Consumer<InducibleEAF>() {
@Override
public void accept(InducibleEAF inducibleEAF) {
EAFTheory eafTheory = inducibleEAF.toNewEAFTheory();
DungTheory dungTheory = eafTheory.convertToDAFNaively();
// TODO: This function needs to called by inducer single time (since all probabilities are 1.0).
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment