The node's `rationale` attribute normalized like a label (diacritics folded, lower-cased) for substring matching. Semantic cleanup writes it as one string (several sources joined with blank lines); an extractor may hand over a list — join it. Missing or empty -> "" so callers can `if rat
(data: dict)
| 704 | |
| 705 | |
| 706 | def _node_rationale_text(data: dict) -> str: |
| 707 | """The node's `rationale` attribute normalized like a label (diacritics |
| 708 | folded, lower-cased) for substring matching. Semantic cleanup writes it as |
| 709 | one string (several sources joined with blank lines); an extractor may hand |
| 710 | over a list — join it. Missing or empty -> "" so callers can `if rationale`. |
| 711 | """ |
| 712 | raw = data.get("rationale") |
| 713 | if not raw: |
| 714 | return "" |
| 715 | if isinstance(raw, (list, tuple)): |
| 716 | raw = " ".join(str(part) for part in raw if part) |
| 717 | return _strip_diacritics(str(raw)).lower() |
| 718 | |
| 719 | |
| 720 | def _node_search_text(data: dict, nid: str) -> str: |
no test coverage detected