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

Trim entity filled with another entity #1298

Open
DK013 opened this issue Apr 11, 2023 · 0 comments
Open

Trim entity filled with another entity #1298

DK013 opened this issue Apr 11, 2023 · 0 comments

Comments

@DK013
Copy link

DK013 commented Apr 11, 2023

Lets say there's some entities like this:

     ...
      "Web.SearchEngine": {
        "options": {
          "aol": ["aol"],
          "baidu": ["baidu"],
          "bing": ["bing"],
          "google": ["google"],
          "lycos": ["lycos"],
          "msn": ["msn"],
          "yahoo": ["yahoo", "yahoo!"],
          "youtube": ["youtube"]
        },
      },
      "Web.SearchType": {
        "trim": [
          {
            "position": "afterLast",
            "words": ["search", "aol", "baidu", "bing", "google", "lycos", "msn", "yahoo", "youtube"]
          }
        ]
      },

And let's say the example utternaces are something like these:

...
"intent": "Web.WebSearch",
  "utterances": [
    "search @Web.SearchType for @Web.SearchText in @Web.SearchEngine",
    "search for @Web.SearchText in @Web.SearchEngine @Web.SearchType",
    "search @Web.SearchEngine @Web.SearchType for @Web.SearchText",             
  ],

In this example, the Web.SearchType trim entity needs keywords from Web.SearchEngine which has to be written there individualy.

Describe the solution you'd like
I'm hoping if there can be a solution, where we can put an entity name as dependency for other entity similarly how we mention entites in an utterance using @.
i.e.

"Web.SearchType": {
  "trim": [
    {
      "position": "afterLast",
      "words": ["search", "@Web.SearchEngine"]  // OR {{Web.SearchEngine}}
    }
  ]
},

which will automatically fill the values while training the corpus.
This is a simple example, but in some cases this will be really helpful where a trim entity comes after another trim entity and the nlp can use that reference to identify the entity that comes after.

for example:

"Email.Message": {
  "trim": [
      {
        "position": "afterLast",
        "words": ["saying", "mail", "that", "add", "add,", "about", "@Email.ContactName", "with", "is", "typing", "reply", "response"]
      }
   ]
},

Where Email.Contactname is another trim entity

"Email.ContactName": {
  "trim": [
    {
      "position": "afterLast",
      "words": ["to", "mail"]
    }
  ]
},

I'm not sure if something like this is already possible or not, since the documentions are all over the place. I searched my best but didn't find anything similar. If this can be implemented then creating large corpus with few dozens of domains which depend on each other will be relatively simpler than current solution.

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

No branches or pull requests

1 participant