| 191 | |
| 192 | @dataclass(kw_only=True) |
| 193 | class PhraseConfig: |
| 194 | longest_only: bool = True |
| 195 | include_dobj: bool = True |
| 196 | include_prt: bool = True |
| 197 | include_prep: bool = True |
| 198 | include_attr: bool = True |
| 199 | include_acomp: bool = True |
| 200 | include_det: bool = True |
| 201 | include_amod: bool = True |
| 202 | include_compound: bool = True |
| 203 | |
| 204 | def _enabled(phrase_config, attr): |
| 205 | return not phrase_config or getattr(phrase_config, attr) |