Skip to content

How to reference semantic descriptors with hierarchical structures #110

Description

@koriym

ALPS documents use semantic descriptors to define the meaning of words, but these words can be what the user intends them to be, depending on what they are included in.

For example, name is defined as "The name of the item." in schema.org. But the name is the name of a person if it is included in "person", or the name of a product if it is included in "product". Thus, the exact meaning of a phrase depends on the combination of what it belongs to.

See ALPS document.

{
    "$schema": "https://alps-io.github.io/schemas/alps.json",
    "alps": {
        "descriptor": [
            {"id": "name", "def": "https://schema.org/name"},
            {"id": "product", "descriptor":[{"href": "#name"}]}
            {"id": "person", "descriptor":[{"href": "#name"}]}
        ]
    }
}

ALPS allows you to define the position of those hierarchical words, but what if you want to use those words outside of ALPS?

For example, HTML forms cannot have such hierarchical meanings.
Instead of a hierarchy, you would have a flat structure like this

<form>
    <input name="productName" type="text">
    <input name="personName" type="text">
</form>

Or how to express those context-sensitive words in a plain English sentence?

Example.

"The order requires product.name and person.name."

or

"The order requires product/name and person/name."

Is there a better way to describe a word when you want to deliberately reference a word used in ALPS, rather than just using ordinary English as a "product name"?

I thought it would be good if there was an ALPS recommended expression to answer these questions.

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