wit-ai / wit Goto Github PK
View Code? Open in Web Editor NEWNatural Language Interface for apps and devices
Home Page: https://wit.ai/
Natural Language Interface for apps and devices
Home Page: https://wit.ai/
tried github:id and it's not saving.
I have a "distance" intent, that should contain two wit/location
entities for the following input:
"what is the distance between utah and california"
but it seems to only ever recognize the second location. Do I just need more expression data?
Hello Wit team,
I'm trying to search something in a city/place and I would like to use builtin.
I'm trying to use local_search_query, but don't know if it's the right builtin to use as there's no doc about it.
Here is an example of sentence :
"find restaurants in the 6th arrondissement of Paris"
It should return something like :
action: find
object: restaurants
place: 6th arrondissement
city: Paris
I know I can do this with multiple entities in the same intent, but I think this should be a builtin as it's a common sentence to ask to wit.
As I understood, using a builtin should improve the brain of Wit instead of using multiple combinations of entities. Am I right ?
Is there an existing builtin for this ? Have you some advices about it ?
Thanks a lot Wit team ! :)
It would be fantastic if there was a tool (or API call!) to export expressions. That would help tremendously with those of us trying to build grammars/corpuses (corpii?) for our apps. It would allow easier access to making our apps learn faster, as we add new expressions and verify expressions in our inboxes.
Or, for a better functionality than just returning a list of the expressions (which is really all I need right now, but I enjoy spitballing ideas that could help others), perhaps returning JSON that lists the expressions in the instance and the example entities for that expression (like we can see in the console) would be more useful to devs.
In the end, I'm looking for something I can access in my app on the fly to help my app learn with my wit instance, so I don't have to release updates simply to add support for a few new expressions.
Working on it now.
I think it would be really cool if you guys could open source your speech recognition platform for experimentation
Is there a feature available to do audio streaming for fast speech recognition and comprehension with wit?
Little improvement : the ability to sort intents by name instead of the default behavior by ID.
Suggestion to add 'location' to the context object in the HTTP API. This will allow me to place recording devices in different places and say things like 'Turn on light'. This should then infer the location from the recording device's location.
I have manually created an intent with a sentence.
When I send this exact sentence, it add it in the inbox for validation.
I think it shouldn't if the sentence is exactly the same because it will add spam in the inbox.
Another problem : if I validate it, it add the exact same answer in the intent, so I have the sentence twice.
Hi,
I've recorded an audio file and validated the format using the file command.
$ file test.wav
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz
When I use curl to post the file I get an error instead of JSON:
$ curl -XPOST -F "file=@/tmp/test.wav;type=audio/wav" -H 'Authorization: Bearer __my_token__' 'https://api.wit.ai/message'
Assert failed: (string? query)
Any suggestions? Thanks!
I would like to send requests to the Wit API from a browser application, but without building a server proxy, I can't make cross domain requests to the Wit server. Would it be possible to add CORS support to the API so that we can make cross domain requests?
Then you would be able to do something like this from the browser:
handleResult = function(textResult) {
$.ajax({
url: 'https://api.wit.ai/message',
headers: {'Authorization': 'Bearer mykey'},
data: {
'q': textResult
},
method: 'POST',
})
.done(function(result) {
console.log(result);
})
.fail(function() {
alert("error");
});
}
Right now when you attempt the above request, you get:
XMLHttpRequest cannot load https://api.wit.ai/message. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
Setting Language to anything else than 'fr' or 'en' will produce an error when calling GET /message.
This is not a real issue, more of an enhancement.
As an example here is the following sentence I have entered into the system:
The consumation should be "Salad Dressing" so I select both words, mark them as the 'consumation' entity I have created, resulting in this:
There are 2 consumation entities now instead of just updating the previous one.
Is this done on purpose?
I renamed an intent from "hello" to "chatterbot_hello"
The "chatterbot_hello" is displayed on the console, in the inbox too, but the id in the url is "hello" and the intent returned to me is "hello".
I'm trying to parse the response from wit in C# and I cannot.
I do it for google speech and, it took me a while, but it works. This is what I have:
support class definitions:
public class wit
{
string msg_id {get; set;}
string msg_body {get; set;}
List<witoutcome> outcome;
public wit()
{
outcome = new List<witoutcome>();
}
}
public class witoutcome
{
string intent { get; set; }
List<string> entitites { get; set; }
string confidence { get; set; }
public witoutcome()
{
entitites = new List<string>();
}
}
parsing :
wit r = Newtonsoft.Json.JsonConvert.DeserializeObject<wit>(HtmlResult);
The result is empty after the parsing (but no errors).
The difference I see between the text coming from wit, against the on coming from google is only the presence of new lines.
Here I copy the two responses for comparison:
Coming from google:
{"status":0,"id":"","hypotheses":[{"utterance":"Hola","confidence":0.63361013},{"utterance":"hola"},{"utterance":"ola"},{"utterance":"hola A"},{"utterance":"Hola y"}]}
Coming from wit:
{
"msg_id" : "7bc38e0a-a1ae-4931-bbe6-910f3a0df9e0",
"msg_body" : "what time is it?",
"outcome" : {
"intent" : "search_in_google",
"entities" : { },
"confidence" : 0.503
}
}
Any idea on how to deal with that ??
You guys provide an API for exporting the instance corpus, and suggest that this could be used to build a Pocketsphinx language model, should the user not wish to make use of your provided recognizer (see also #44).
It would be extra useful if you could release the tools you guys use to build language models for your recognizer, such that this could more readily be reproduced client-side.
I have created an entity named "add_block" and used it in an intent in some expressions. Then I renamed the expression in the entities section to a name with a slash in it (interval/add_block). The system showed an alert saying that this was irreversible. I confirmed this and the entity was successfully renamed.
After that I tried to use the intent in another expression. This time I get an error message saying that entity names can not contain slashes (I did not get this error when renaming the entity). So my next thought was "hmm okay, I'll just rename it back then".
When I click the entity in the entities list to rename it I get redirected to the home page, preventing me from accessing it.
So the two problems are:
Hello Wit team !
I'm a little confused with the Wit API to retrieve some infos.
I would like to list my intents.
I found the endpoint /instance in the console seems to return me what I want.
But I'm confused about how API works. Which instance is called when using API (sending a message) ?
Can you improve the API doc with more endpoints please ?
For my app, I need to do some "glue" between the intents and the actions behind (map intent_name => function)
If I can help in any way, let me know !
Thanks !
I love the service, it's great.
The only thing worth mentioning is that when I check the status, it's projected timeline for being clean is off by about 3 minutes.
Example: "Turn the bathroom light off and remind me to take the trash out."
There are two independent intents there:
turn_lights
set_reminder
We don't support that yet, but that's on the short term roadmap. We know you want it! Coming soon.
It instead creates a new entity with underscores replacing the spaces.
It would be excellent if Wit supported an MRCP interface, especially for those of us involved in telephony. The benefits of MRCP over your current API:
Is this something you guys have on the roadmap? Do you have any idea of when it might become available? Do you need assistance implementing it (those of us @mojolingo might be able to lend a hand)?
The possibility to rename user-defined entities would be a nice addition. After a while I realized the name I chose for my entities should be changed to a more general form.
I made an intent with an entity.
I do a curl request on it and it returns me the correct json :
julien@tagada-work:~$ curl -H 'Authorization: XXXXXXXXXXX' 'https://api.wit.ai/message?q=le%20son%20est%20pas%20assez%20fort'
{
"msg_id" : "2c7c37a5-68d1-4f12-9cd4-3509b4858ca1",
"msg_body" : "le son est pas assez fort",
"outcome" : {
"intent" : "volume",
"entities" : {
"action_volume" : {
"end" : 25,
"start" : 11,
"wisp" : "07e67b00-2386-4ec2-ae3b-56ee6d411d86$action_volume",
"value" : "baisse",
"body" : "pas assez fort"
}
},
"confidence" : 0.9945912894138687
}
}
When I do a modification of the entity to match the value "augmente", it returns me the same json result.
The msg_id is different, but all the other fields are the same.
The result expected is a change in the field value to "augmente".
I have a couple of user-defined entities. I am trying to create a couple more entities. I see them appear under my intent, but they do not appear at the top level under entities. When I try to create a new expression using these new entities, they do not appear in the list, it's like I have to create them new every time.
The little light is green and everything, so I think this is either bug, or there is something I'm not understanding about how entities work.
Thanks.
Is it possible to tag different lang in the same intent ?
For example, I have an intent named volume.
I want to match for the same intent :
"augmente le volume"
"increases the volume"
Is it possible to send the lang used in a variable to compute with result tagged with the same language ? (because I don't know if it won't break the nlp to mix languages in the same statistics)
I added an entity named "device/status", which I can't edit afterwards.
The problem is caused by the url: the slash gets indicated by the browser/server/.htaccess as another subdivision in the url-path.
Hello,
Actually, when I type something which have no word in common with my intents it gives me a confidence of 0.72.
I think this confidence is high as no word is in common with my intents.
Which level of confidence is acceptable for an application according your tests ?
Hello Wit team,
Is it possible to implement a metadata field on an intent ?
I need to add a description field on intent to describe what will be the goal of this intent.
In my case, a user will ask my software what it can do. My sofware will list intents and vocalize for each intents the description field.
I think this metadata field should be flexible, I mean I should be able to insert an embedded json dictionnary in this metadata field.
What do you think about it ? I will help filling the gap between wit and ours softwares.
Thanks !
I have defined a wit/location of "San Francisco", and this works. Is it necessary for me to define the many cities and states in US that a user could include in their search string?
Also, in the case that the user types "SF, CA", must I define these scenarios as well?
Thanks for all the help!
Any non read-only call is just asking for abuse in an open-source setting. It'd be great to have a way to block certain calls in my instance to protect it from competitors, users with a grudge, and bored 13 year olds.
I would appreciate the ability to toggle the sort of expressions by their header columns (specifically "name" and "entities") as well as by id. In different circumstances, each sort is useful.
This can be a lower priority, as it is a niceity.
It would be useful to have the message ids of each message in the inbox on the web console herel:
I can't add a user to my wit.ai instance. I type github:user_id or username but nothing happens. I'm using Safari 6.0.4 on OS X 10.7.5
As the title says, the training status indicator has been orange for about 10 hours now. I think something might be wrong.
It might have someting to do with my previous actions. I had about 300 expressions for a certain Intent. One of the entities in each expression is a number, I had made my own 'amount' entity when I realized there was a built-in entity 'wit/number' for that. So I removed the amount entity from the entities list in the expressions view.
The amount entity was removed from all of the already validated expressions so I have re-indicated the wit/number entity in about 100 of them.
Since then the status icon has never been green again.
I am not sure if this has anything to do with it but it might be a lead :)
Thanks
this is my code, simple: string
using (WebClient wc = new WebClient())
{
string URI = "https://api.wit.ai/message?q=what%20time%20is%20it%3F";
wc.Headers[HttpRequestHeader.Authorization] = "Authorization: Bearer BF54VOR3AJ33WKYEXEAYFFAEPJVR726V";
string HtmlResult = wc.UploadString(URI, "");
}
I guess the error comes from bearer but .. no idea how to express it correctly. Is there any documentation beside the cURL ?
Is there a server/service down?
I tried my first work in the console (and actually ran a few tests from my app-code) this morning. When I went back to the console just a few minutes ago (1PM EST), it asked me to login again. But everytime I click "Login with GitHub", it pops-up a new window (using Chrome, FWIW) and shows me a 503 for the url: https://api.wit.ai/github_authorize_url.
Tried from a different PC and same thing happens.
Thanks in advance,
AJ
I'm not sure about your plans for this, but it would be nice if you could do this with a community license (i.e. to make the queries faster) by somehow running a local copy that only "caches" the results, and still shared the actual expressions and intents back to the live server.
So pretty much a local "server" but it passes through all data so that it is shared.
This would be really great for embedding into something like a voice control mechanism for xbmc.
On Chrome Mac OS X 10.8.
Best regards.
A few questions here -
In the case of a search such as "4 bedroom san francisco $3000"
How do I associate the wit/number "4" with the unit "bedroom"?
Likewise, how would one associate the wit/number "3000" with the unit "USD"?
{
"msg_id" : "4d41afb3-0b9c-4691-80f8-e9d0233540d3",
"msg_body" : "4 bedroom san francisco $3000",
"outcome" : {
"intent" : "apartment_search",
"entities" : {
"currency" : {
"end" : 25,
"start" : 24,
"value" : "USD",
"body" : "$"
},
"number" : [ {
"end" : 1,
"start" : 0,
"value" : 4,
"body" : "4"
}, {
"end" : 29,
"start" : 25,
"value" : 3000,
"body" : "3000"
} ],
"unit" : {
"end" : 9,
"start" : 2,
"value" : "bedroom",
"body" : "bedroom"
}
},
"confidence" : 0.71
}
}
To teach the service in the most natural spoken way, I think it would be great to add the speech option to the sentence input field.
This doesn't have to be very complicated: adding 'x-webkit-speech' to the input field is in my opinion enough.
I don't have any option to delete an entity I've just created
It should be great to let an app create an intent with the API, and import automatically a corpus in this intent without passing by the manual validation.
In my case, my app have plugins. Each plugin is a class with some methods.
Each method will define is intent, and I would like to import pre-built sentences for this intent.
Hello,
As the try function is very useful for developers who want to test a sentence, is it possible to display the json which will be returned ? (with the outcomes etc)
It will be easier to debug what WIT will return.
Thanks !
Hi,
I'm trying to get the Android example to work, but get following exception
01-16 12:48:58.208: E/Wit(9564): An error occurred during the request
01-16 12:48:58.208: E/Wit(9564): java.io.FileNotFoundException: https://api.wit.ai/message?q=lights+on
01-16 12:48:58.208: E/Wit(9564): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
01-16 12:48:58.208: E/Wit(9564): at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:246)
01-16 12:48:58.208: E/Wit(9564): at ai.wit.sdk.WitRequestTask.doInBackground(WitRequestTask.java:43)
01-16 12:48:58.208: E/Wit(9564): at ai.wit.sdk.WitRequestTask.doInBackground(WitRequestTask.java:1)
01-16 12:48:58.208: E/Wit(9564): at android.os.AsyncTask$2.call(AsyncTask.java:288)
01-16 12:48:58.208: E/Wit(9564): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-16 12:48:58.208: E/Wit(9564): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
01-16 12:48:58.208: E/Wit(9564): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-16 12:48:58.208: E/Wit(9564): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-16 12:48:58.208: E/Wit(9564): at java.lang.Thread.run(Thread.java:841)
I did provide INTERNET permission as required. Any thoughts for troubleshooting?
Regards,
Tom.
It would be extremely beneficial to have control over the intents used when processing user input, as there are certain circumstances where including all intents can result in incorrect intent selection. There are cases where my application prompts a user, and it knows an appropriate user response should fall into a subset of the intents available in my instance. I could just disregard all intents that aren't in that subset, but it would be better if Wit could select the most appropriate intent within a given a subset of intent names.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.