MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _node_attributes_text

Function _node_attributes_text

graphify/serve.py:536–548  ·  view source on GitHub ↗

The node's `attributes` key-value pairs normalized and tokenized for search.

(data: dict)

Source from the content-addressed store, hash-verified

534
535
536def _node_attributes_text(data: dict) -> tuple[str, str]:
537 """The node's `attributes` key-value pairs normalized and tokenized for search."""
538 attrs = data.get("attributes")
539 if not isinstance(attrs, dict) or not attrs:
540 return "", ""
541 parts: list[str] = []
542 _flatten_attr_text(attrs, parts)
543 if not parts:
544 return "", ""
545 raw_text = " ".join(parts)
546 norm = _strip_diacritics(raw_text).lower()
547 tokens = " ".join(_search_tokens(norm))
548 return norm, tokens
549
550
551

Callers 2

_node_fieldsFunction · 0.85
_node_search_textFunction · 0.85

Calls 5

_flatten_attr_textFunction · 0.85
_search_tokensFunction · 0.85
_strip_diacriticsFunction · 0.70
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected