Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested Entities #899

Open
jcuenod opened this issue Nov 18, 2021 · 5 comments
Open

Nested Entities #899

jcuenod opened this issue Nov 18, 2021 · 5 comments
Labels

Comments

@jcuenod
Copy link

jcuenod commented Nov 18, 2021

Is it possible to find overlapping/nested entities?

Search for two red balls with dots and the playing cards in an orange bucket

I am new to snips-nlu so I'm not sure whether it can solve my use case but I'm hoping to transform that imperative into something like:

{
    intent: "find",
    entities: [
        {
            text: "two red balls with dots",
            type: "object_to_find",
            subentities: [
                { value: 2, attribute: "number", text: "two" },
                { value: "red", attribute: "color", text: "red" },
                { value: "ball", attribute: "type", text: "balls" },
                { value: "dotted", attribute: "decoration", text: "with dots" },
            ]
        }, {
            text: "playing cards",
            type: "object_to_find",
            subentities: [
                { value: "cards", attribute: "type", text: "playing cards" },
            ]
        }, {
            text: "an orange bucket",
            type: "location_filter",
            subentities: [
                { value: "orange", attribute: "color", text: "orange" },
                { value: "bucket", attribute: "type", text: "bucket" },
            ]
        }
    ]
}

I need to distinguish between multiple search terms ("objects") that each have attributes and other search filters (like the "location_filter"). I have used wit.ai to do this before but I'm wondering whether snips can solve for my use case and where I should look for an example like this or some documentation.

@datta-aerosys
Copy link

I have a similar use-case..

We already have a very complex rhasspy nlu dataset, where we have nesting in entities of certain intents.
And, we are building a custom parser for our use.

Since the "rhasspy-snips-nlu" parser always generates all possible sentences in the data, it is unusable for us and creates millions of utterance sentences for certain intents.

Does SNIPS support such nesting of entities? I could not find any information regarding it.

@jcuenod
Copy link
Author

jcuenod commented Dec 15, 2022

@datta-aerosys FWIW, I moved on to another platform...

@datta-aerosys
Copy link

@datta-aerosys FWIW, I moved on to another platform...

Which NLU tool did you move too?
Does it support nested entities too ?

@jcuenod
Copy link
Author

jcuenod commented Dec 16, 2022

@datta-aerosys Eventually I stopped trying to roll my own and just used Azure's cognitive services. I might return to this in the future, but it was for a side project.

@datta-aerosys
Copy link

@datta-aerosys Eventually I stopped trying to roll my own and just used Azure's cognitive services. I might return to this in the future, but it was for a side project.

Ahh, ok. Online services are not possible for me, since my target edge-device has to be offline and standalone capable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants