class documentation

class Slots(object): (source)

Constructor: Slots(target_sentence_length)

View In Hierarchy

Represents positions in a target sentence. Used to keep track of which slot (position) is occupied.

Method __init__ Undocumented
Method __len__ Undocumented
Method occupy No summary
Method vacancies_at No summary
Instance Variable _slots Undocumented
def __init__(self, target_sentence_length): (source)

Undocumented

def __len__(self): (source)

Undocumented

def occupy(self, position): (source)
Returns
Mark slot at position as occupied
def vacancies_at(self, position): (source)
Returns
Number of vacant slots up to, and including, position

Undocumented