syntax-prosody-ot / main

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
https://spot.sites.ucsc.edu/
GNU General Public License v2.0
12 stars 2 forks source link

Automated testing for Binarity constraints #479

Closed jbellik closed 3 years ago

jbellik commented 3 years ago

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.