Skip to content

Expose reusable Wikidata Q/P phrase mapping for meta-expression reasoning #28

Description

@konard

meta-expression issue: link-assistant/meta-expression#7

Context:
meta-expression needs human-language-style mapping from input phrases to Wikidata Q/P identifiers. In issue #7, Moon orbits the Sun now records Moon -> Q405, orbits -> P397, and Sun -> Q525, then uses a bounded P397 chain for evidence. This logic should eventually be shared rather than reimplemented in each project.

Proposal:

  • Expose a reusable library API for phrase-to-Q/P mapping with context-aware disambiguation.
  • Support caller-provided context hints such as astronomy, person, country/capital, or relation/property.
  • Return ranked candidates with labels, descriptions, IDs, source URLs, and cache metadata.
  • Keep browser-compatible caching so static apps can use it from workers.

Suggested consumer shape:

mapPhrasesToWikidata({
  phrases: ["Moon", "orbits", "Sun"],
  context: "astronomy",
});

This would let meta-expression reuse human-language disambiguation and linkable Q/P output directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions