Is there any way to export intents for watson conversation? - watson-conversation

You can import intents for watson conversation in CSV format, but there doesn't appear to be a way to export them (and really, I'm looking for the exact format that is needed to import them, but I would also like to know how to export).

There is no direct way to export. The best way to do it is to go to your project menu, and export as JSON.
After that, if you check in the JSON file, you will find the questions and intents. You can also get access to your entities this way as well (easier way to import entities).
example:
"intents":[{
"intent":"conditions",
"created":"2016-08-17T12:52:08.806Z",
"examples":[{
"text":"Are the winds dangerous?",
"created":"2016-08-17T12:52:08.859Z"
},
{
"text":"Are we expecting sunny conditions?",
"created":"2016-08-17T12:52:08.859Z"
},
{
"text":"How much rain will fall today?",
"created":"2016-08-17T12:52:08.859Z"
},
{
"text":"How much snow are we expecting?",
"created":"2016-08-17T12:52:08.859Z"
},
...

Oh of course I find the answer in the official documentation seconds after posting this question:
https://www.ibm.com/watson/developercloud/doc/conversation/intent_ovw.shtml
Essentially, it's a big list of:
example, intent-name
...
exampleN, intent-nameN

There is a subtlety here; the JSON download does provide all of the configuration details and can be edited programmatically, but when you upload the edited JSON to use changes, it creates a new workspace with the same name as the one you downloaded from. I'm too new to know if there's a way around this or if it even matters, but just thought I'd share. :)

Related

Next.js building timings

I am currently looking for a way to track time (in ms/sec) spent on Next.js building steps and write this information into json file. So in the end I would like to have something like
{
"js": 10000,
"css": 5000,
...
}
I could not find any tools available for solving this task.
There is also a /.next/trace file created during "next build" and containing some data like
[{"traceId":"0350c99bb05551a7","parentId":"2071643884994g71","name":"build-module-json","id":"89936a6d306d4411","timestamp":13930168804,"duration":6869574, ...}]
but Im not sure if its data could be useful as there is no detail information on this file in docs.
Thanks for any help in advance
found a solution speed-measure-webpack-plugin

Import "text" strings, to create, automatically, empty pages in MediaWiki

I am using MediaWiki (Sometimes I think that it could be better to use Drupal) to create a wiki.
I have tried to find out a correct api or something similar to import a table (csv, xml, or another format) with text fields.
The idea is to bring a document with "name-pages" and "tags" to create automatically empty pages.
Finally, the users will see that there are new empty pages to fill!.
And every day pass a scheduler (something like Feed Import in Drupal) to bring new pages. I mean, if the text exists, don't do anything; however, it the text is new, create a new wikimedia page!
I don't find the correct api to do this. Somebody knows any way to do this?
Thank you
Regards!

Playing soundcloud stream on multiple clients with meteor

I'm attempting to create a collaborative jukebox as a little project to learn Meteor, so apologies for this very high-level noob question.
I need to be able to call the soundcloud SC.stream (see https://developers.soundcloud.com/docs/api/sdks#streaming) function on multiple clients. The template all clients are looking at is binded to a object that looks something like:
room: {
title: "roomname"
currentlyPlaying: {
trackName: "track name"
trackStreamURL: "http://soundcloud/12345"
}
}
I can't seem figure out a way so that when a client, say the admin, sets a new currentlyPlaying to trigger all client to run SC.stream and start the new song.
I'm just not sure what the right meteor features are to use in this scenario, so i'm not looking for a code solution exactly, just a point in the right direction.
Thanks in advance.
Save the currently playing url in a document in a collection. Then use cursor.observe() or cursor.observeChanges() on the client to watch the document with the url in it. Do this inside a Tracker.autorun in block.
When the url changes, stop playing the previous tune and start playing the new one.
See here for documentation on cursor.observe().

Confusion over TopoJSON Format

I am attempting to follow mbostock's "Let's Make a Map" Tutorial here: http://bost.ocks.org/mike/map/. At a certain point in the tutorial, he writes:
d3.json("uk.json", function(error, uk) {
svg.append("path")
.datum(topojson.feature(uk, uk.objects.subunits))
.attr("d", d3.geo.path().projection(d3.geo.mercator()));
});
Without seeing the format of his topoJSON file, it is hard to determine what the equivalent "uk.objects.subunits" line is for my code (my topoJSON can be viewed here: https://gist.github.com/jcahan/e1772766f01b68b00dc9).
Would someone please help clarify how I (and future readers) can determine the inner property (eg uk.objects.subunits) of my topojson file?
Thanks for your time!
Use the web console in your browser (I use the Firebug extension in Firefox) to view Mike's example page and you can watch the browser pull down the uk.json file and view its format. Here's the relevant snippet:
{"type":"Topology","transform":{"scale":
[0.001546403012701271,0.0010939367048704803],"translate":
[-13.69131425699993,49.90961334800009]},"objects":{"subunits":
{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","id":"ENG","arcs":[[[0]],
[[1]],[[2]],[[3]],[[4]],[[5]],[[6,7,8,9]]],"properties":{"name":"England"}},
You can see the hierarchy of uk.objects.subunits
subunits contains the GeometryCollection. Have a look at your json file and do the same.
Double check that this instruction from Mike is working:
d3.json("uk.json", function(error, uk) {
console.log(uk);
});
Now if you peek at your JavaScript console, you should see a topology object that represents the administrative boundaries and populated places of the United Kingdom.
If you get it to work, let me know, as I cannot get my personal TopoJSON file to load, although I can get all of Mike's to do so. I've come to the conclusion that my TopoJSON file must be wrong somehow.
Sure.
That JSON file happens to be close friend (actually a neightboor) of the example. So you can see it atthe http://bost.ocks.org/mike/map/uk.json
Regards.

Using XLS files to store JBehave stories

I have based my new project with JBehave, Selenium, Maven and Spring from the etsy sample here : https://github.com/jbehave/jbehave-tutorial/tree/master/etsy-selenium/java-spring
I'm really new to JBehave and I would like to know if there is a way to get it reading stories from XLS files ?
I think there is something to do with the String[] storyPaths() method that returns the stories name but I don't know how JBehave manages their content.
Thanks a lot for the help !
I need to change the storyPaths() method to be able to read stories title.
I also have my answer : I need to extend from org.jbehave.core.io.LoadFromClasspath or org.jbehave.core.io.LoadFromURL classes to get stories content.

Resources