nltk.sem.cooper_storage module¶
- class nltk.sem.cooper_storage.CooperStore[source]¶
Bases:
object
A container for handling quantifier ambiguity via Cooper storage.
- __init__(featstruct)[source]¶
- Parameters
featstruct (FeatStruct (with features
core
andstore
)) – The value of thesem
node in a tree fromparse_with_bindops()
- s_retrieve(trace=False)[source]¶
Carry out S-Retrieval of binding operators in store. If hack=True, serialize the bindop and core as strings and reparse. Ugh.
Each permutation of the store (i.e. list of binding operators) is taken to be a possible scoping of quantifiers. We iterate through the binding operators in each permutation, and successively apply them to the current term, starting with the core semantic representation, working from the inside out.
Binding operators are of the form:
bo(\P.all x.(man(x) -> P(x)),z1)