class documentation

class MinimalSet(object): (source)

Constructor: MinimalSet(parameters)

View In Hierarchy

Find contexts where more than one possible target value can appear. E.g. if targets are word-initial letters, and contexts are the remainders of words, then we would like to find cases like "fat" vs "cat", and "training" vs "draining". If targets are parts-of-speech and contexts are words, then we would like to find cases like wind (noun) 'air in rapid motion', vs wind (verb) 'coil, wrap'.

Method __init__ Create a new minimal set.
Method add Add a new item to the minimal set, having the specified context, target, and display form.
Method contexts Determine which contexts occurred with enough distinct targets.
Method display Undocumented
Method display_all Undocumented
Method targets Undocumented
Instance Variable _contexts Undocumented
Instance Variable _displays Undocumented
Instance Variable _seen Undocumented
Instance Variable _targets Undocumented
def __init__(self, parameters=None): (source)

Create a new minimal set.

Parameters
parameters:list(tuple(str, str, str))The (context, target, display) tuples for the item
def add(self, context, target, display): (source)

Add a new item to the minimal set, having the specified context, target, and display form.

Parameters
context:strThe context in which the item of interest appears
target:strThe item of interest
display:strThe information to be reported for each item
def contexts(self, minimum=2): (source)

Determine which contexts occurred with enough distinct targets.

:rtype list

Parameters
minimum:intthe minimum number of distinct target forms
def display(self, context, target, default=''): (source)

Undocumented

def display_all(self, context): (source)

Undocumented

def targets(self): (source)

Undocumented

_contexts = (source)

Undocumented

_displays: dict = (source)

Undocumented

Undocumented

_targets = (source)

Undocumented