Repository navigation
Match entity types case-insensitively during entity resolution - #180
Conversation
|
This is PR 3 of 3 you may keep open at a time. |
| return out | ||
| index = _entity_index(schema) | ||
| own = index.get(etype) | ||
| own = index.get(etype) or next((t for name, t in index.items() if _ops.entity_type_key(name) == folded), None) |
There was a problem hiding this comment.
canonical_entity_type already does this lookup, please use index.get(canonical_entity_type(etype, schema)) as terms.py does. Insert already fixes the casing before resolution, so the scan is never reached here. Also please add a mixed case resolution case to the conformance pair, and update the plan_resolution docstring, which still says each type is read once.
| if (schema === null) return out; | ||
| const index = entityIndex(schema); | ||
| const own = index.get(etype); | ||
| const own = index.get(etype) ?? [...index.entries()].find(([name]) => ops.entityTypeKey(name) === folded)?.[1]; |
There was a problem hiding this comment.
Same here with canonicalEntityType.
d1b14d7 to
4cae93d
Compare
|
Updated |
Summary
_ops.entity_type_key(ops.entityTypeKeyin TypeScript) everywhere insrc/selfgraph/resolution.pyandtypescript/src/resolution.ts, includingDefaultResolver,LLMResolver,compatible_types, fallback-type handling, andplan_resolution.L_ENTITYwithequals={}and filter viaentity_type_keywhenentities_matchingis not used so stores with exact-match node property filters still surface type-compatible candidates regardless of casing.tests/test_resolution.pyandtypescript/test/resolution.test.tscovering cross-batch, within-batch,default,fuzzy,llm, fallback-type, and schema hierarchy/alias resolution.Linked issue
Closes #163
AI Assistance
Checklist
/approved.Breaking changes
None.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.