For this chart's internal data structure, we use a modified
implementation of the HashSet which adds handling of probabilities.
|
|
__init__(self,
*args,
**kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
_add_existing_value(self,
existing_value,
new_value)
When a value already exists in the table, this is called instead of
adding the value. |
source code
|
|
|
|
|
|
|
append(self,
*args,
**kwargs)
There's no point in applying a beam if nothing's been added to the
set and it's already been applied. |
source code
|
|
|
|
remove(self,
*args,
**kwargs)
Overrides remove() to maintain the index of signs grouped by
category. |
source code
|
|
|
|
_apply_beam(self)
Applies a beam, using the already given threshold, to the set,
pruning out any signs with a probability lower than the given ratio
of the most probable sign. |
source code
|
|
|
|
ranked(self)
Returns the signs in the set ranked by probability (highest first). |
source code
|
|
|
Inherited from cky.chart.SignHashSet:
get_distinct_categories,
get_signs_by_category,
get_signs_grouped_by_category
Inherited from data.HashSet:
__contains__,
__len__,
extend,
values
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|