Giter Site home page Giter Site logo

microsoft / cognitive-luis-windows Goto Github PK

View Code? Open in Web Editor NEW
134.0 104.0 82.0 86 KB

Windows (.Net) SDK for the Microsoft Language Understanding Intelligent Service API, part of Congitive Services

Home Page: www.microsoft.com/cognitive-services/en-us/language-understanding-intelligent-service-luis

License: Other

C# 99.78% Batchfile 0.22%

cognitive-luis-windows's Introduction

This SDK is being deprecated and is no longer maintained. Please go here for the latest .NET SDK.

LUIS

LUIS is a service for language understanding that provides intent classification and entity extraction. In order to use the SDK you first need to create and publish an app on www.luis.ai where you will get your Application Id and Subscription Key.

The solution contains the SDK and a sample application that allows you to enter your appId and appKey, and to perform the two actions "predict" and "reply".

Cloning The Repo

Please note that the repo depends on a submodule, so in order to clone it you'll have to attach --recursive option to the clone command: git clone --recursive https://github.com/Microsoft/Cognitive-LUIS-Windows.git

License

All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.

Developer Code of Conduct

Developers using Cognitive Services, including this client library & sample, are required to follow the “Developer Code of Conduct for Microsoft Cognitive Services”.

cognitive-luis-windows's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cognitive-luis-windows's Issues

Implement Intent and utterances management

Reply does't take in 3 arguements

This just doesn't want to work. When I try to download it either via github or zip files are missing. When I finally get it compiling. I get all sorts of errors from 400 Badly formed request to binding issues.

It just wont work for multiple reasons. What's going on?

Training and publishing applications

[Question] Extracting entitites from Phrase List

I have some hierarchical entity in my app (e.g. Breakfast Sandwiches), which more than 10 values (the allowed number of children for the hierarchical entity in LUIS app). What I understand is, you can use Phrase List (e.g. Breakfast PhraseList) so that LUIS model can detect the entities that are not children from the 'Breakfast' hierarchical entity; I created that Phrase List and the app can't recognize entities that are not children from the hierarchical entity, although they are defined inside the phrase list.

If the information I know is wrong, so how should one plan his app if it has some entity that has more than 10 values (more than what the hierarchical entity can hold)?

Target .NET Standard 2.0

Hi all,

Are there any plans to target .NET Standard 2.0 with this package instead of keeping it as a PCL? If not, then why? :) I am more than glad to help with a PR if that's the only blocker.

Thanks,
Péter

[Question] Get the numeric value of an entity

In the JSON response below:
capture

In the 'entities' array, there is a 'value' property inside the 'resolution' property; I tried to access that 'value' property from my C# code but it not shown to me, the only properties shown are shown in the image below:
capture

How can I access that property?

Missing prebuilt entities

Hi,
I found that the prebuilt entity for cities (builtin.geography) does not recognize "Bali" and a few other locations. What can I do about it?

[LUIS] Continuous Queue for Training

I've been trying to train my luis application but every time I hit the train button it just says "Queued for training" continuously. Has microsoft found a fix for this bug?

Having issues with composite Entities

1
2

I am getting the error "Unable to deserialize the LUIS response." and surprisingly there are no samples provided for hierarchical and composite entities usage.

Also there is no documentation for List entities.

And when trying to explore and build some demonstrators, I see LUIS is very unstable for the following reasons

  1. Exceptions thrown [attached images]
  2. Intents - I create utterances for each intent, but it internally says it belongs to other intent, if so I would like to know how you create intents in detail, the documentation is at very high level and does not guide how to use your API effectively
  3. Very poor documentation and LUIS is live from beta, how would I use them effectively so that I can sell LUIS to clients???

/Naren
[email protected]

Null Reference Exception if result["topScoringIntent"] doesn't exist

In LuisResult.Load(), if JToken result["topScoringIntent"] does not exist (which it did not in my case - not sure why), Intent.Load() will throw a null reference exception.

LuisResult.Load() requires a null check of the topScoringIntent:

if (Intents.Length == 0)
{
    JObject topScoringIntent = (JObject)result["topScoringIntent"];
    if (topScoringIntent != null) {
        var t = new Intent();
        t.Load(topScoringIntent);
        TopScoringIntent = t;
        Intents = new Intent[1];
        Intents[0] = TopScoringIntent;
    }
}

Max number of utterances per LUIS app/intent

Hi there,

We're in the process of developing a bot for the Fintech sector. We're using LUIS and the MS Bot framework. A question we have at the moment is - is there a maximum number of utterances that LUIS can handle per app/per intent? We'd like to train our models very thoroughly, well, in the range of a thousand or so utterances per intent at the moment & we are concerned that we might overload things/degrade the performance.

Any advice would be much appreciated.

Not able to configure keys in LUIS

How to publish in the new UI of Luis? The tenant id is not getting listed in my account. I have generated keys in the azure portal but not able to configure it in LUIS. Any help on this?

image

Is Luis right for this problem?

I'm building a fintech banking bot by using Bot Framework and by understanding user intents via LUIS.

And now I'm currently facing the following problem: some user inputs that may refer to the same thing could differ in the way of being written. But they re not intents that refer to actions, they are just differente ways of naming same entities. For instance, if the user wants to refer to the entity CreditCard, he could say:

BOT: Yes sir, from what product do you want to see your balance?
User: Credit Card
OR
User: From my Credit Card
OR
User: Cred card
OR
User: Card

I was thinking of defining an intent like 'SayProductType', and associate an entity 'Credit Card' to it. Of Course, this is a really bad solution in the way that if the number of product types starts to grow, I'd need to define more entities in LUIS.

So, is this LUIS right for this problem? Or should I just handle it by code?

XamarinStudio support

I have tried to run the project in Sample/ in Xamarin, but it seems that this project is VisualStudio only. Is it possibile to add a Xamarin iOS/Droid or just a SharedLibrary example? It would make a lot of sense as for the new .NET standard library xamarin integration!

Thank you

DateTimeV2 support

It seems that DateTimeV2 is not available in pt-br although it says here that it is supported.

Any plans on this?

LUIS Stopped Working

When trying to publish a LUIS App, its throwing the following error:
"An item with the same key has already been added."

Do we need to have a separate azure metered key for each LUIS app?

MS LUIS.ai | Our app stopped returning matches for some entities

So we have a luis app with the intent RequestFundFact, and we have the hierarchical entities Fund and FundFact used in several utterances mapped to this intent.

Our calls to the endpoint were returning correct results for queries such as "give me the investor profile for the managed fund", which return something like:

RequestFundFact/0.9936668. Entities: Fund, managed fund; FundFact: investor profile

However, as of this afternoon our endpoint for RequestFundFact is no longer returning the Fund entity, for the exact same data.

In fact none of the utterances mapped to that intent are returning the Fund entity. The FundFact entity still returns however.

We have done some additional training today, but surely that shouldn't cause the whole thing to have fallen over?

Any help much appreciated.

Where is this SDK going?

This repository hasn't seen a commit in 8 months, while the LUIS service is moving forward. The API hardly covers a tiny bit of the features available from the LUIS web service. Should we expect this SDK to be developed, or should we make direct calls to the web service instead?

LUIS: how to specify the mandatory words in utterance? Is it possible by using phrase list features?

Issue Description

I am using phrase list features of LUIS. i am adding my mandatory words in my phrase list.(correct me if i am wrong)
For single mandatory word my intent works fine. But in my another intent i have 2 mandatory words in single intent which is not working fine.

##Behaviour
My phrase list- product: [moisturizer,anti wrinkle cream,laugh lines,anti aging skin treatment]
target area: [face,my face,neck,forehead]
Intent name- ste1
utterance- do you have moisturizer?
user enters- "do you have bla bla"- as expected its going to none intent.
Intent name- ste2
utterance- do you have moisturizer for my face?
user input- "do you have moisturizer for my bla bla"- As here "moisturizer" is present bt "my face" is not! This should also hit none intent but its hitting to ste1 intent because "do you have moisturizer?" is completely present in ste1.

##Expected Result- I want to validate that my these two words(moisturizer, face) should my mandate to hit the ste2 intent otherwise i want it to hit none intent.

Additional properties missing on LUIS prediction result via Api in SDK

Hi there. So we've enabled Bing spellchecker, and it seems to be working well. The json for a test looks like this:

{
  "query": "waht is teh core incoem fund TER",
  "alteredQuery": "what is the core income fund TER",
  "topScoringIntent": {
    "intent": "RequestFundFact",
    "score": 0.520578444
  },
  "intents": [
    {
      "intent": "RequestFundFact",
      "score": 0.520578444
    },
    {
      "intent": "RequestMoreInfo",
      "score": 0.43879506
    },
    {
      "intent": "SelectFund",
      "score": 0.06737144
    },
    {
      "intent": "WantToInvest",
      "score": 0.0494651981
    },
    {
      "intent": "SelectSomething",
      "score": 0.0235987846
    },
    {
      "intent": "RequestGenericApplicationForm",
      "score": 0.00424610637
    },
    {
      "intent": "None",
      "score": 0.00134105864
    },
    {
      "intent": "ListFunds",
      "score": 0.00039434986
    },
    {
      "intent": "Help",
      "score": 5.701306E-05
    },
    {
      "intent": "NavigateBack",
      "score": 8.556254E-06
    }
  ],
  "entities": [
    {
      "entity": "core income fund",
      "type": "Fund::Income Fund",
      "startIndex": 12,
      "endIndex": 27,
      "score": 0.9179078
    }
  ]
}

That's all good and well, but we'd like the ability to access the alteredQuery prop as well, in our c# code. At the moment the LuisResult returned by a call to LuisClient.Predict does not return the alteredQuery prop in any way, only the OriginalQuery, & some others.

Is there a timeframe on adding this at all?

Destination IP details of LUIS server required

Hi,

In my office network when i trying to connect to LUIS model URL getting time out error. We need destination IP details range along with port details of LUIS ,Having the same we will raise a firewall request in my office network to allow the traffic.

Request you please help me in this regard.

Thanks

builtin.x object parsing

It would be really useful to have a way to parse builtin objects such as number, ordinals etc to the actual type they represent.

builtin.ordinal::first = 1
etc

Bug or Feature MIA | Import utterances endpoint

The old version of the LUIS console used to have an "import utterances" function. The new console does not seem to have this function anymore.

In addition, the API (I think) used to have this option, but now it does not seem to be there.

Am I missing something, or is this a feature that is being added back-in at a later stage?

Missing SampleUserControlLibrary in the sample Solution

I get a load failed for the referenced library meaning the sample cannot be run out of the box and cannot find any files that might correspond in the respository. Was this missed from the Git commit?

To replicate, clone the project into a fresh directory and try to open and run the sample app.

How to check, if Utterances are exists/not?

How do we check, whether there are duplicates?
That is, a single Utterance is occurring in how many Indents.
Using with the C# windows SDK or any API end points.
Any other work around also much appreciated.

Facing issue with composite entities

Hi

I am facing issues with composite entities. I have a utterance like this:
get all contracts going to expire { [$datetimeV2 ]} (Composite entity)
When I use the query: "get all contracts which are going to expire tomorrow", I am not getting composite entity in the response. I am just getting entity.

I am attaching the JSON response that I am getting from the LUIS

{
"query": "get all contracts that are going to expire tomorrow",
"topScoringIntent": {
"intent": "SearchContract",
"score": 0.9933323
},
"intents": [
{
"intent": "SearchContract",
"score": 0.9933323
}
],
"entities": [
{
"entity": "tomorrow",
"type": "builtin.datetimeV2.date",
"startIndex": 43,
"endIndex": 50,
"resolution": {
"values": [
{
"timex": "2017-09-01",
"type": "date",
"value": "2017-09-01"
}
]
}
}
]
}
As you can see above, I am not able to see the composite entity. This was used to work some time back and now I am not getting composite entities

Response status code does not indicate success: 400 (Bad Request) on Azure

When I calls LUIS api with the following code on Azure
var ret = await lc.Predict(activity.Text);

There is an error

Response status code does not indicate success: 400 (Bad Request)

But the LUIS api response correctly with Bot framework Channel emulator or thru uri
https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/{id}?subscription-key={key}&timezoneOffset=0.0&verbose=true&q=XXXX

Here is my Cognitive Api setting in Azure

Exception tracestack

2017-04-12T03:54:47  PID[4792] Error       Response status code does not indicate success: 400 (Bad Request).
2017-04-12T03:54:47  PID[4792] Error       Source : System.Net.Http
2017-04-12T03:54:47  PID[4792] Error       StackTrace :    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Microsoft.Cognitive.LUIS.HttpClientRestExtensions.<RestGet>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Cognitive.LUIS.LuisClient.<Predict>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LotoBot.Rest.Controllers.MsgController.<createLuisReplyMsg>d__2.MoveNext()

Appreciate any help and suggestion, thank you very much!

Not able to open www.luis.ai website.

Hi,

I am facing issue in opening LUIS Website. It hangs right on the account login page with message - Please wait a few moments... Initializing. Is there some issue in LUIS or I am missing something?. We have tried it on latest IE and chrome version but nothing helped.

how to get composite entity?

I have got simple entity from LuisClient.Predict. Is there any way to get the composite entity?Can you show me the way to do that

SDK usage with Azure standard pricing tier

I'm using the SDK since some time now with no issue.
I created a few Applications on luis.ai and I'm accessing using AppId and AppKey as per luis.ai site.

I'm now moving into a S0 paid subscription for LUIS on Azure portal, hence I replaced former "AppKey" with the new "Key" value found on Azure Portal. Doing so, I'm getting a request to authenticate myself (if exercising from a browser) or a code 401 {"Response status code does not indicate success: 401 (This application cannot be accessed with the current subscription)."} if using the SDK.

How can I leverage the Azure Key and Subscription details to use the SDK? I need as it allows higher thrughput (10 requests/second) and unlimited usage.

In summary:

https://api.projectoxford.ai/luis/v1/application?id={AppId}&subscription-key={LUIS Key from portal}&q=aaa -> works just fine

https://api.projectoxford.ai/luis/v1/application?id={AppId}&subscription-key={LUIS Key from Azure}&q=aaa -> raise a code 401

I'm missing something? Appears I need to authenticate somehow, but I'm not getting how I can do so through the SDK.

Having Issue in adding the utterances

image

I'm getting the information message whenever I add the new utterance and the utterance is not getting added. The message "Predicting utterance" pops up but the utterance doesn't get added.
If we refresh the page it is directly taking to the sign-in page even though we are signed in.

[LUIS] Can't add phrase list to my app

I can't add phrase list to my app. The save button is not highlighting, although I am separating the entities by commas. screenshot

What is the required field 'APP.FEATURE.PHRASELIST.MODAL.ADD.LABEL'?

[LUIS] Response to user query

I am using LUIS and Bot Framework (C# Bot Application). Sometimes I call LUIS from my app and don't get a response from LUIS (this happens when I start project without debugging), while I check for this issue in debug mode, I get the response (although it was the same query). What is the reason for this?

Guidance on parsing the resolution of the builtin.datetime.duration entity

I get an entity of type builtin.datetime.duration returned corresponding to 'last week'. This is resolved to 'P1W' which I assume means 'past one week' however I don't know for sure and I can't seem to find docs detailing what other values are possible.

Is there existing code to parse this into usable .NET DateTime objects? Or a guide on how to interpret the returned strings?

How to unable Enable bing spell checker in Luis?

Hi Folks,

I am facing the issue with the spell checker option in LUIS, As i am checked it and published. When i see again its showing as unchecked. I had purchased Bing spell check key too.

Please help me with this...

Thank you...!!

Unable to add Bing Spell Check

When trying to add the bing spell check, the key value field is a dropdown so am unable to paste the azure key in. This is for a bot created in eu.luis.ai.
Thanks in advance for helping

luis_bing

Support Staging URL

Please add support for Staging URL. It would help allot to run a dev version against the Staging URL, while the production version runs with the Production URL.

Staging URL is the one with an extra staging=true parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.