A webapp for the syntax-prosody analyst working in Optimality Theory, with automated Gen, Con and Eval. Download build files from syntax-prosody-ot/build
Create an html document that uses Mocha tests to check the values produced by all the non-deprecated binarity functions in the file main/constraints/binarity.js. You can assume that the values currently being produced on the interface are correct.
Some sample expected values:
For ptree = ((a b)(c d)),
binMaxLeaves({}, ptree, 'phi') = 1
binMaxBranches({}, ptree, 'phi') = 0
binMinLeaves({}, ptree, 'phi') = 0
binMinBranches({}, ptree, 'phi') = 0
For ptree = (((a) b) c) d),
binMaxLeaves({}, ptree, 'phi') = 2
binMaxBranches({}, ptree, 'phi') = 0
binMinLeaves({}, ptree, 'phi') = 1
binMinBranches({}, ptree, 'phi') = 1
For ptree = {a b c d} (i.e., the root is of cat: 'i'), all functions with category argument = 'phi' should return 0.
binMaxLeaves({}, ptree, 'phi') = 0
binMaxBranches({}, ptree, 'phi') = 0
binMinLeaves({}, ptree, 'phi') = 0
binMinBranches({}, ptree, 'phi') = 0
For ptree = ((a b c)(d e f)),
binMaxLeaves({}, ptree, 'phi') = 3
binMaxBranches({}, ptree, 'phi') = 2
binMinLeaves({}, ptree, 'phi') = 0
binMinBranches({}, ptree, 'phi') = 0
For ptree = {(a)(b)(c)},
binMaxLeaves({}, ptree, 'phi') = 0
binMaxBranches({}, ptree, 'phi') = 0
binMinLeaves({}, ptree, 'phi') = 3
binMinBranches({}, ptree, 'phi') = 3
These samples were not chosen all that systematically; you should try to think about which ones are the most useful and include those, and also consider if there are other edge cases that haven't been covered here.
Create an html document that uses Mocha tests to check the values produced by all the non-deprecated binarity functions in the file main/constraints/binarity.js. You can assume that the values currently being produced on the interface are correct.
Some sample expected values:
For ptree = ((a b)(c d)),
For ptree = (((a) b) c) d),
For ptree = {a b c d} (i.e., the root is of cat: 'i'), all functions with category argument = 'phi' should return 0.
For ptree = ((a b c)(d e f)),
For ptree = {(a)(b)(c)},
These samples were not chosen all that systematically; you should try to think about which ones are the most useful and include those, and also consider if there are other edge cases that haven't been covered here.