2

To be clear, recursion in linguistics is here better called "nesting" in this CS context to avoid confusing it with the other recursion. How does one detect nesting? I am particularly interested in the example case of conjunctions. For example: say that I want to look for sentences that look like this:

Would you rather have ten goldfish or a raccoon?

Seems straightforward: a binary choice. However, how do you distinguish a binary choice with nesting from a ternary (or n-ary) choice?

Would you rather have (one or two dogs) or (a raccoon)?

Would you rather have (two dogs) or (ten goldfish) or (a raccoon)?

Ditto for implied uses of "or," which is more common than the latter of the above:

Would you rather have (one or two dogs),[nothing] (ten goldfish), or (a raccoon)?

Given the available tools for NLP (POS-taggers and the like), how do you count the number of conjunctions to say "there are n surface-level clauses in the sentence, with n-or-zero clauses nested within."?

0 Answers0