How should the Chatbot conversation raw data excel csv look like? - csv

How should the Chatbot conversation raw data excel csv look like?
Now I am building a Chatbot with IBM Watsons. The client would want the chatbot conversation raw data export in excel/csv format. As the conversation is very long, How should we get the most appropriate format for the Chatbot conversation raw data csv?
Thanks!

Based on your question, I guess you should use Logs/ examples on the API Reference for base what you CSV file gonna have, for example: inputText, outputText, conversation_id, dateConversation, intents, entities, context, workspace_id, etc.
In this example using Python that will return these data (you can also use another language that has HTTP request support):
List logs:
list_logs(self, workspace_id, sort=None, filter=None, page_limit=None, cursor=None)
Request:
import json
import watson_developer_cloud
conversation = watson_developer_cloud.ConversationV1(
username='{username}',
password='{password}',
version='2018-02-16'
)
response = conversation.list_logs(
workspace_id = '9978a49e-ea89-4493-b33d-82298d3db20d'
)
print(json.dumps(response, indent=2))
Obs.: Take a look at this example saving inside one txt file the conversation Logs, you can also check this answer to use the same logic to save in one csv file.
Obs.: Nowadays Watson conversation changed the name for Watson Assistant.
Official Watson Conversation API Reference (cURL, Node, Java, Python examples)

Related

How to create Kafka topic from a JSON file and then extract subset of the topic and output to another JSON file

I am new with Kafka tool.
Here are the steps I would like to perform in Kafka:
Connect Kafka and input data from a JSON file (I am familiar with this part)
Publish to a Kafka topic
Extract subset of data from the topic and publish (create) to a new topic
Extract data from that new topic and output to a JSON file
Note: my coding preference is Python.
If you want to use Python, you can use Faust to map data between topics
By default, it uses JSON serialization, and if you want to write to a new file, you want to consume through a stream

RavenDB - HTTP request to return data in format other than CSV or JSON

I'm running RavenDB v3.0. According to the RavenDB documentation, you are able to access an HTTP link to export a list of documents in CSV format. I've followed the instructions and can generate the export by connecting to an address similar to their example:
http://my-server/databases/db-name/streams/query/DocumentsForExtract?resultsTransformer=TransformForExtract&format=excel
The above URL will return the extract in CSV format. If I remove the format parameter from the request, or alter it to anything else, it returns it in JSON. I want to know if there are any other formats available? I'd like to get it in XML if possible, but I can't seem to find any documentation about this which is why I'm asking here on SO.
Thanks in advance.
No, that endpoint supports only CSV and JSON

HTTP request from XQuery code inside MarkLogic pipe

I want to send text using POST method to another HTTP server and receive a JSON file in response from XQuery code of pipe in MarkLogic. The idea is whenever XML or JSON documents are inserted into MarkLogic, it triggers a pipe to read it and sends one element to another web server; in my situation, I want to send to Rosoka server to do natural language processing, after that I want to store the returned data "it is json file" in MarkLogic.
I appreciate if you could help.
marklogic only mentioned that is possible but no further help
There are many ways to do this.
A start is to look at "Triggers"
https://docs.marklogic.com/guide/app-dev/triggers
There is also Content Processing Framework ( "CPF" which is a higher level workflow based on triggers).
https://docs.marklogic.com/guide/cpf
if you read those guides you should be able to ask more specific questions if needed.

Appcelerator Requesting and using Json file

I'm learning how to use a third party API called Wunderground and I don't know how to request, receive, and use their results which is in a Json format.
If you see their website a developer can sign up for free and receives an API KEY. You can then request weather data in the following URL format.. http://api.wunderground.com/api/KEY/FEATURE/[FEATUREā€¦]/[SETTINGā€¦]/q/QUERY.FORMAT
So I have tried it in my web browser by typing some parameters and I received a very long Json file with the correct information (I checked). Problem is I don't have the slightest idea of how to create a variable which can make this request, and even if I was able to do that I don't know where should I receive the file and how to get only the results I want (in this case current weather).
You have to use Titanium.Network.HTTPClient to make request.
For code examples related to Json parsing you can use:
Appcelerator: Using JSON to Build a Twitter Client
HTTPClient()

Where can I find a pre-populated json file for testing?

I am building an application that can import JSON data, I want to test about 10k entries, and I don't feel like building a JSON string with that many entries.... so does anyone have a location where I could find some generic populated JSON files? (Music Albums / Movie Listings / Animal Kingdom / Census data / Car Models... I'm not horribly picky, I just need some good data to test with.)
This is a site that is in beta that can give you data in JSON, XML or CSV. All lists are customizable. This is a sample call: http://mysafeinfo.com/api/data?list=englishmonarchs&format=json
Documentation here: http://mysafeinfo.com/content/documentation ; See a full list under Datasets on the main menu
There are few websites that have raw data that can be customized to a JSON format. Here is a link for some raw data information Data
Vienna's Open Data website provide various databases. For example, their Tree register
Edit:
The old link is dead. A great place to find test data is Socrata which aggregates government data. There's plenty of data to test with:
https://dev.socrata.com/data/
If you look through the catalogs, there's usually a JSON export option. Here's an example from the National Service for Age Group and volunteering.