IG Parser Article Examples
This page lists IG Script-encoded institutional statements examples used as part of the IG Parser introductory article.
Below you find all statements encoded as part of the article, with corresponding links that prepopulate the parser. By default, the links with open the visual output version of the parser. You can interactively switch between visual and tabular output by clicking on the Switch to tabular version of IG Parser
link in the UI. While switching between the different UIs all statement information is retained. After clicking on Generate visual output
(for the visual output version) and Generate tabular output
(for the tabular output version) respectively, you will see the corresponding output generated at the bottom. For tabular output, you can copy the CSV or Google Sheets output (using the corresponding button) and paste it into Excel (using the Text-to-Column feature with pipe (|
) as delimiter) or into Google Sheets respectively (it will automatically parse the individual columns into the spreadsheet structure).
UI Parameters relevant to see specific features exemplified in the statements are highlighted alongside the link for the corresponding example.
More details about the supported IG Script features is provided in the IG Parser Readme. To explore more complex examples beyond the ones displayed below, please consider testing the various example statements provided in the IG Parser UI.
Examples in IG Script Section
Cac(If officer observes or is made aware of violation), A(officer) D(must) I(fine and report) Bdir(violator) to Bind(authority).
Cac(If officer observes or is made aware of violation), A(officer) D(must) I(fine [AND] report) Bdir(violator) to Bind(authority).
Cac{If A(officer) I(observes [XOR] is made aware of) Bdir(violation)}}, A(officer) D(must) I(fine [AND] report) Bdir(violator) to Bind(authority).
- Note: When generating tabular output, ensure to select
Produce IG Extended output
in order to see the decomposed nested structure in the output.
Cac{Cac{If A(officer) I(observes [XOR] is made aware of) Bdir(violation)} [AND] Cac{if A(officer) I(deems) Bdir(intervention) Cex(safe)}}, A(officer) D(must) I(fine [AND] report) Bdir(violator) to Bind(authority).
- Note: When generating tabular output, ensure to select
Produce IG Extended output
in order to see the decomposed nested structure in the output.
Cac{Cac{If A(officer) I(observes [XOR] is made aware of) Bdir(violation)} [AND] Cac{if A(officer) I(deems) Bdir(intervention) Cex(safe)}}, A(officer) D(must) {I(fine) Bdir(violator) [AND] I(file) Bdir(report) with Bind(district court)}
- Note: When generating tabular output, ensure to select
Produce IG Extended output
in order to see the decomposed nested structure in the output.
Cac{Cac[condition=violation]{If A[role=enforcer](officer) I(observes [XOR] is made aware of) Bdir(violation)} [AND] Cac[condition=safety]{if A[role=enforcer](officer) I(deems) Bdir(intervention) Cex(safe)}}, A[role=enforcer](officer) D[stringency=high](must) {I[act=sanction](fine) Bdir(violator) [AND] I[act=report](file) Bdir(report) with Bind[act=authority](district court)}
- Notes
- When generating tabular output, ensure to select two features, a)
Produce IG Extended output
in order to see the decomposed nested structure in the output, and b)Include IG Logico annotations in output
to see additional columns capturing the annotations. - When generating visual output, ensure to select
Include IG Logico annotations in output
to see the annotations as part of the generated statement tree (as labels associated with the corresponding nodes).
- When generating tabular output, ensure to select two features, a)
Illustrative Example
Cac{Cac[condition=violation]{If A[role=enforcer](officer) I[act=detection](observes [XOR] is made aware of) Bdir(violation)} [AND] Cac[condition=safety]{if A[role=enforcer](officer) I(deems) Bdir(intervention) Cex(safe)}}, A[role=enforcer](officer) D[stringency=high](must) I[act=sanction](fine [AND] report) Bind[role=violator](violator).
- Note: Ensure to select
Include IG Logico annotations in output
to see the annotations as part of the generated statement tree (as labels associated with the corresponding nodes).