#include <span_factory.h>
Enumerate all the gold spans from a reference dependency tree.
- Parameters
-
[in] | input | The input dependency. |
[in] | reference | The reference dependency. |
[out] | spans | The output spans. |
void ZGen::BestFirst::SpanFactory::create_initial_spans_from_input |
( |
const dependency_t * |
input_ref, |
|
|
std::vector< Span * > & |
spans |
|
) |
| |
Make initial spans from the input data. These spans is used as initial spans to the searching process.
- Parameters
-
[in] | input_ref | The input data's reference. |
[out] | spans | The output spans. |
void ZGen::BestFirst::SpanFactory::create_spans_from_chart |
( |
const Span * |
span, |
|
|
const SpanKMaxHeap * |
charts, |
|
|
std::vector< Span * > & |
spans |
|
) |
| |
Make spans (namely, the transition in the search process) from the charts.
- Parameters
-
[in] | span | The from spans. |
[in] | charts | The current chart. |
[out] | spans | The output spans. |
bool ZGen::BestFirst::SpanFactory::legal_to_left_combine |
( |
const Span * |
head, |
|
|
const Span * |
modifier |
|
) |
| const |
|
protectedvirtual |
legal_to_left_combine and legal_to_right_combine are the functions which needed to be override for different input constrains implementation. Check if it is legal to construct a span by combining the head and the modifier as a left modifier.
- Parameters
-
[in] | head | The pointer to the head span. |
[in] | modifier | The pointer to the modifier span. |
- Returns
- bool Return true when it is legal, otherwise return false.
bool ZGen::BestFirst::SpanFactory::legal_to_right_combine |
( |
const Span * |
head, |
|
|
const Span * |
modifier |
|
) |
| const |
|
protectedvirtual |
Check if it is legal to construct a span by combining the head and the modifier as a right modifier.
- Parameters
-
[in] | head | The pointer to the head span. |
[in] | modifier | The pointer to the modifier span. |
- Returns
- bool Return true when it is legal, otherwise return false.
The documentation for this class was generated from the following files: