intents.json vs training w/ text file in GPT2 for training a chatbot - json

Forgive me 'cause I'm fairly new to AI and NN stuff. I'm trying to create a chatbot to have conversations with my friends in our discord channel.
I know that an intents.json file can help the chatbot know the intent of the user's message, then reply with an appropriate response, but it seems very static (i.e. you have a tag like 'greetings' then you have maybe 5-6 written responses ready to go such as "Hi", "hey", "hello there", etc). I'm wanting my chatbot to be able to have dynamic responses (based on what the conversation is so far).
I've fiddled with Max Woolf's Google Colaboratory for GPT2 (https://colab.research.google.com/github/sarthakmalik/GPT2.Training.Google.Colaboratory/blob/master/Train_a_GPT_2_Text_Generating_Model_w_GPU.ipynb) and have used simple text files to train a model.
I'm confused on the difference between using an intents.json file to train an AI model vs. using a regular text file in GPT2 to train the model. Where would you use one vs the other or are they accomplishing the same thing? I hope this makes sense. Any help or clarification would be appreciated as well as resources to read up on stuff!

Related

Is it possible to return passages.passage_text in search skill for Watson Assistant

I'm creating an assistant and want to be able to return relevant passages of text from documents uploaded to Watson Discovery via the Search Skill.
When configuring the search response you are only provided with the option to return the full text and various enriched_text.x extracted_metadata.x etc.
None of this is really that useful (for my use case anyway) and what I really need is to point the user to the relevant text within the documents i.e. return passages.passage_text
Am I missing something in the tooling or can you only do this by coding the API call from scratch?

Missing information on Spotify Developer "Audio Analysis for a Track"

On Spotify Developer there is a description of the JSON format that is returned on "Get Audio Analysis for a Track". However, there is no information on "track.codestring", "track.echoprintstring" and "track.rhythmstring". Anyone who knows the definition of the information that is hidden in these long strings?
I'm currently embarking on machine/deep learning applied for Music Information Retrieval.
There seems to be no way to directly adress this question on developer.spotify. So I roamed the web but couldn't find an answer.
This is in the JSON-example on 'https://developer.spotify.com/documentation/web-api/reference/tracks/get-audio-analysis/'
"codestring": "eJxVnAmS5DgOBL-ST-B9_P9j4x7M6qoxW9tpsZQSCeI...",
"code_version": 3.15,
"echoprintstring": "eJzlvQmSHDmStHslxw4cB-v9j_A-tahhVKV0IH9...",
"echoprint_version": 4.12,
"synchstring": "eJx1mIlx7ToORFNRCCK455_YoE9Dtt-vmrKsK3EBsTY...",
"synch_version": 1,
"rhythmstring": "eJyNXAmOLT2r28pZQuZh_xv7g21Iqu_3pCd160xV...",
"rhythm_version": 1
This document for EchoNest seems to be describing the same properties as the Spotify API returns. (For an older version unfortunately)
Analyzer Documentation
I also recommend checking out kaleidosync a visualisation app based on Spotify/EchoNest.
kaleidosync demo
source on github
I'm super late to the party here, but I'll share my findings in case they help someone else. The below is from what looks like an archived version of the original Echo Nest Analyzer Documentation (v3.2). I've extracted a bit of it below and have provided a link to where I was able to browse the document.
Output Data
track data
codestring, echoprintstring: these represent two different audio fingerprints computed on the audio and are used by other Echo Nest services for song identification.
synchstring: a synchronization code that allows a client player to synchronize the analysis data to the audio waveform with sample accuracy, regardless of its decoder type or version. See Synchstring section*.
rhythmstring: a representation of spectro-temporal transients as binary events. This temporal data distributed on 8 frequency channels aims to be independent of timbre and pitch representations. See Rhythmstring section*.
*Echonest API Docs
Synchstring, Rhythmstring
Synchdata decoding - Github

Symfony3, taking user input and saving into mysql

I am new to symfony and open-source in general. Im trying to create a simple product submition page which would store product's information in mysql. So far I've only been able to hard-code all the information and successfully store it (this was my first task to achieve). This is the code for it:
public function createAction()
{
$product = new Product();
$product->setName('Keyboard');
$product->setPrice(15.50);
$product->setDescription('Logitech keyboard v2.00');
$em = $this->getDoctrine()->getManager();
$em->persist($product);
$em->flush();
return new Response("Saved new product with: " .$product->getId() ."Id");
}
Now I want to have a page with couple text boxes and to be able to take this information, validate it and then store it. What would be a clever way to do it? As I'm learning for my internship, I want to be able to do it in a best possible way. Are twig templates the best solution here? What about fetching user's input? I would be really thankful if someone could write step-by-step bullet points on how to achieve my goal in abstract sentences. Thank you and have a great remaining Friday!
1) One of the best and yet simple ways for you to start your mission would be by reading Symfony book chapter about Forms. It contains basic examples about form rendering, validation and submission using twig.
2) If you need to know more about how to save everything to database and would like to use Doctrine (most common way) then this chapter covers it in detail and is also not too deep to make it easy enough.
3) If you would like to deepen your understanding of Validation then you should definitely read about it too
http://symfony.com/doc/current/book/forms.html
http://symfony.com/doc/current/book/doctrine.html
http://symfony.com/doc/current/book/validation.html

Steam Web API : How Can I Get list of all items for game ids(570, 440, 730, 753) with tags & description

Is this possible to get all items with their TAGS like
(Rarity,Quality,Hero,Slot,Type,Description)
for DOTA2(570), TF2(440), CS:GO(730), Steam(753)
I haven't found any api to get response with all items available for particular game.If anyone know how to get this please reply to my question.
There's no official API (e.g. the Web API) to get all information for all games. Web API only supports Dota 2 (IEconItem_570) and TF2 (IEconItems_440). There’s also an interface for CS:GO (IEconItem_730), but it's rudimentary and doesn't include weapon skins.
Because of that lack of official APIs Steam Condenser doesn't include a way to do this.
There's a way to mimic Steam's own web interface and mobile apps which use a JSON interface, e.g. http://steamcommunity.com/id/koraktor/inventory/json/730/2/ (where 730 is the app ID and 2 is the item type). Steam use other types than 2: 3, 6 and 7. The data structure is almost self-explanatory.
The language can be changed by setting the GET parameter l to the name of the language, e.g. english, german or french .

Scraping data after filling out form?

I'm doing a little project for my class and I'm just a beginner, so please forgive me if I mix up some of my terminology.
Basically, I'm creating an interactive journey planner for my city's public transit system. Unfortunately, they haven't made all the data I need publicly available. So instead of putting all my time into gathering the data for personal use, I've opted to do some screen scraping - letting their servers calculate the journey info from a START and STOP variable and then displaying the selected info on my page.
So is it possible to fill out a form's fields remotely, and then scrape the data on the page that subsequently loads? And if so, what would be the quickest, most convenient way? This happens to be a case where the data can't be manipulated via the URL, so it has to access the data by filling out the form first.
The website in question:
http://jp.translink.com.au/travel-information/journey-planner
Here is what you can do:
1.) Send a POST Request to the journey-planner with some data like that (be aware that CORS might jump in, then you could use cURL via PHP or whatsoever):
Start:Wickham Tce, Spring Hill
End:Upper Edward St, Spring Hill
SearchDate:10/05/2013 12:00:00 AM
TimeSearchMode:LeaveAfter
SearchHour:7
SearchMinute:40
TimeMeridiem:AM
TransportModes:Bus
TransportModes:Train
TransportModes:Ferry
MaximumWalkingDistance:1500
WalkingSpeed:Normal
ServiceTypes:Regular
ServiceTypes:Express
ServiceTypes:NightLink
FareTypes:Standard
FareTypes:Prepaid
FareTypes:Free
2.) You will get a new response location. This seems to be a REST link. Important for you is the id at the end. You will have to call that page and parse the HTML and look for a div with the HTML-id option-summaries, where you will find more information within the divs travel-option-1 to travel-option-n. You have to look at it carefully in order to find out which information is stored whee and how you will be able to use it.
In order to find such things you should learn how to use Firebug or Chrome's development tools.
This is one way to solve your problem. Probably not the best but still better than "screen-scraping" anything. But it will ask you for a lot of skills and effort. Furthermore if the data provider is going to change just a bit your solution will not work anymore. Additionally they might prevent your access by CORS or anything else (blocking your IP etc.)