Alignment¶
bcql_py.models.alignment
¶
Alignment queries use the ==> operator to find cross-field alignments
between versions of a parallel corpus (e.g. English -> Dutch).
Similar to models/relation but with different operators and semantics.
AlignmentOperator
¶
Bases: BCQLNode
The operator in an alignment query: =type=>field or ==>field?.
See https://github.com/instituutnederlandsetaal/BlackLab/blob/dev/site/docs/guide/040_query-language/030_parallel.md
Attributes:
| Name | Type | Description |
|---|---|---|
target_field |
str
|
The target field name (e.g. |
optional |
bool
|
|
relation_type |
str | None
|
Optional type filter (e.g. |
capture_name |
str | None
|
Override for the capture group name (default |
AlignmentConstraint
¶
Bases: BCQLNode
One alignment constraint: operator target
Multiple alignment constraints are separated by ;.
Attributes:
| Name | Type | Description |
|---|---|---|
operator |
AlignmentOperator
|
The AlignmentOperator. |
target |
BCQLNodeUnion
|
The target sub-query. |